Olive Docs
Liquidity Pool

LP Tokens and Target Ratio

Liquidity providers mint and burn pool-specific LP tokens. Holding LP tokens means participating as market-making liquidity for the pool's options, expiry futures, perpetual futures, and token swaps.

Every trading pool is composed of custodies. In the normal two-asset market, that means one underlying custody and one USDC custody. For example, the SOL pool contains SOL custody and USDC custody.

Each custody has ratio configuration. The target ratio is the desired share of pool value held in that custody. For example, a 70% SOL target means the pool is balanced when roughly 70% of its value is in SOL and 30% is in USDC.

SOL collateral is used for covered calls, expiry-future longs, and perpetual longs. USDC collateral is used for cash-secured puts, expiry-future shorts, and perpetual shorts.

Minting LP Tokens

When liquidity is added, the pool values the deposit against current oracle prices and mints LP tokens for the depositor. The LP token supply represents claims on pool value, not a fixed quantity of one asset.

Adding liquidity can be cheaper or more expensive depending on whether the deposit improves the pool's custody ratio. Deposits that move a custody closer to its target ratio receive the favorable side of the dynamic liquidity fee. Deposits that move the pool farther from target receive the unfavorable side.

LP share pricing uses LP-priced AUM, not raw vault balance.

LP-priced AUM=raw AUMopen position entry claims\text{LP-priced AUM} = \text{raw AUM} - \text{open position entry claims}

Raw AUM values the pool-owned custody balances. Pending limit-order escrow is excluded before raw AUM is computed, because escrow belongs to pending order owners until execution. Open position entry claims are then subtracted for LP share mint/burn pricing, because trader principal inside active positions is not a free LP claim.

The add-liquidity mint formula uses a virtual offset:

LP minted=deposit USD(LP supply+virtual shares)LP-priced AUM+virtual assets\text{LP minted} = \frac{\text{deposit USD}\cdot(\text{LP supply}+\text{virtual shares})} {\text{LP-priced AUM}+\text{virtual assets}}

The virtual shares and virtual assets are equal to the minimum order value. They protect the first-depositor share math without minting dead shares or locking real LP value.

Burning LP Tokens

When liquidity is removed, LP tokens are burned and pool assets are returned according to the withdrawal path and available custody balances.

Assets locked for open positions are not freely withdrawable until the corresponding positions, orders, or settlement obligations are closed. The target ratio shapes fees and incentives; it is not a promise that every asset is always withdrawable at the target ratio.

The remove-liquidity redemption formula uses the same virtual offset:

redeem USD=LP burned(LP-priced AUM+virtual assets)LP supply+virtual shares\text{redeem USD} = \frac{\text{LP burned}\cdot(\text{LP-priced AUM}+\text{virtual assets})} {\text{LP supply}+\text{virtual shares}}

Because add and remove use the same offset, normal LP round trips remain symmetric while first-depositor inflation attacks are blocked.

Escrow and Position Claims

Limit-order escrow and active-position principal are accounted separately:

BucketIncluded in vault balance?Free liquidity?LP share-priced AUM?
Pool-owned unlocked liquidityYesYesYes
Locked position collateralYesNoRaw AUM yes; LP-priced AUM subtracts trader entry claims
Pending limit-order escrowYesNoNo

When a limit order is placed, its refundable escrow is held in the custody vault but excluded from free liquidity, utilization, dynamic ratios, and AUM. When the order executes, escrow is consumed into the live position accounting. When the order is cancelled, escrow is refunded and removed from the escrow bucket.

Target Ratio Is Not a Hard Limit

The target ratio and fee-band anchors shape the dynamic liquidity fee curve. They are not hard deposit or withdrawal limits by themselves. The smart contract still validates custody balances, locked collateral, token accounts, oracle reads, and arithmetic before minting or burning LP tokens.

On this page