Settlement<COLLATERAL> object. Multiple depositors share an anonymity set; the vault (not the depositors) is the trader on DeepBook V3 pools.
Vault
Receipt
Lifecycle functions
Create (admin)
VaultAdminCap to the keeper. See scripts/create-darkpool-vault.ts.
Deposit
vault.state == OPEN, attribution_hash.length() == 32, coin_in.value >= min_deposit_micro.
Keeper: pull + mint accounting
settlement::mint_pair to BM deposit to record_mint.
Settlement
receive_settlement accepts the post-redeem DUSDC payout and flips state to SETTLED. Users then call redeem to claim their pro-rata share.
Pro-rata math
Errors
Tests
tests/dark_pool_tests.move. 6 tests: full lifecycle with pro-rata payout, min-deposit abort, redeem-before-settlement abort, admin-gated record_mint, double-settle abort, receipt views.
