Skip to main content
Position-privacy vault for V3 binary markets. Sits in front of a per-market binary Settlement<COLLATERAL> object. Multiple depositors share an anonymity set; the vault (not the depositors) is the trader on DeepBook V3 pools.

Vault

States:

Receipt

Lifecycle functions

Create (admin)

Shares the vault; returns VaultAdminCap to the keeper. See scripts/create-darkpool-vault.ts.

Deposit

Gates: vault.state == OPEN, attribution_hash.length() == 32, coin_in.value >= min_deposit_micro.

Keeper: pull + mint accounting

Pair them in the same PTB: pull to 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.