Skip to content
3F Docs

Net Deposit Flow

The net deposit flow occurs when a deposit intent and a withdrawal intent are resolved together, with the deposit amount being larger than the withdrawal amount. By netting the two, the protocol significantly reduces the bridge loan required — lowering entry costs for depositors.

sequenceDiagram
    participant D as Depositors
    participant W as Withdrawers
    participant FD as Deposit Intent
    participant FW as Withdrawal Intent
    participant Req as Request
    participant Fund as Fund
    participant PM as Position Manager

    D->>FD: 1a. Deposit USDC
    FD-->>D: ERC-6909 LP tokens
    W->>FW: 1b. Deposit PM shares
    FW-->>W: ERC-6909 LP tokens

    Note over FD,FW: 2. Facilitator locks both intents

    FD->>Req: 3. Pull bridge loan (net amount)
    Req-->>FD: Bridge capital

    FD->>Fund: 4. Subscribe (net capital + bridge loan)
    Note over Fund: 5. Settlement wait
    Fund-->>FD: 6. Wrapped receipt tokens

    FD->>PM: 7. Deposit collateral & borrow
    PM-->>FD: Mint PM shares

    FD->>Req: 8. Repay bridge loan

    FD->>FW: 9. Swap USDC for PM shares
    FW->>FD: PM shares

    Note over FD,FW: 10. Both intents resolved
    D->>FD: Claim PM shares
    W->>FW: Claim USDC

Instead of processing the deposit and withdrawal independently, the protocol nets them:

  1. Deposit phase — Users deposit capital (e.g., USDC) into the deposit intent. Separately, withdrawers hold LP tokens in the withdrawal intent
  2. Lock — The facilitator locks both intents and begins resolution
  3. Bridge loan — The Facility pulls bridge capital from a Request. The borrowed amount is based on the net difference (deposits minus withdrawals) rather than the full deposit amount, multiplied by leverage minus 1
  4. Fund subscription — The Facility commits the bridge loan plus the net new capital to the Fund wrapper for RWA subscription
  5. Settlement wait — The external protocol processes the subscription
  6. Unlock — The Fund wrapper mints wrapped receipt tokens
  7. Position creation — The Facility deposits the new collateral into the Position Manager and borrows against it
  8. Repayment — The borrowed funds repay the bridge loan via the Request
  9. Swap — After repayment, the deposit intent holds leftover USDC equivalent in value to the Position Manager shares owed to the withdrawal intent. The two intents swap: USDC goes to the withdrawal intent, PM shares go to the deposit intent
  10. Resolution — Both intents are resolved. Deposit LP holders claim PM shares, withdrawal LP holders claim USDC

The bridge loan is not fixed at (deposit − withdrawal) × (n − 1). That value is the minimum needed to cover the net new leverage, but the actual amount also accounts for retargeting the existing Position Manager:

  • Above target LTV — the existing PM is over-leveraged, so less bridge capital is needed. The deposit itself helps bring the LTV down
  • Below target LTV — the existing PM is under-leveraged, so more can be borrowed to bring it closer to target

The bridge loan is always capped at (n − 1) × deposit, the same as a standalone deposit flow. The protocol nets three intents together: the depositor going from 1x to nx, the withdrawer exiting, and the existing PM holders retargeting back to nx.

The bridge facilitator fees (the cost of the bridge loan) are shared proportionally among depositors and withdrawers. Both sides benefit from the reduced loan size — withdrawers because the bridge loan is smaller than a standalone withdrawal would require, and depositors because they are not bearing the full cost alone.