DarkPool Mechanics

Deposit Flow

  1. User deposits USDC.

  2. DarkPool Vault mints indexed shares at current PPS (price per share).

  3. Funds are split:

    • 50% → Execution venue wallet

    • 50% → Custody buffer in middleware on-chain.

Trade Execution Flow

  1. The Engine receives signals and runs risk validation.

  2. Approved trades execute under vault address on venue.

  3. PnL and balances sync via adapters.

  4. Vault’s totalAssets() reflects updated portfolio value.

Withdrawal Flow

Snapshot-Based Accounting

When a withdrawal request is made:

  • The system snapshots the USD-equivalent value of the user’s shares.

  • That amount is locked as the user’s claim.

  • User no longer participates in new PnL.

  • The vault has a fixed liability, simplifying liquidity planning.

This eliminates “timing” attacks and ensures fairness.

Withdrawal Paths

Type
Cooldown
Cap
Fee/Penalty
Description

Standard Exit

7 days

100%

1%

Full exit, allows clean unwind

Priority Exit

1 day

50%

1%

Partial, from custody buffers

Instant Exit

Instant

100%

25% + 1%

Immediate full withdrawal

Anti-Gaming Logic

  • Users can only execute 1 priority exit (≤50%) per rolling 7 days.

  • Multiple requests trigger auto-routing to standard queue.

  • Pending exits are excluded from further calculations.

  • Snapshots fix payout value regardless of post-request PnL.

Last updated