Liquidity Pools & Liquidity Provision

Liquidity Pool Structure

Each liquidity pool consists of one or several perpetuals that share the same collateral currency. Collateral currency is the currency in which the margin is held and payments are made (e.g., a BTCUSD and ETHBTC perpetual can both be collateralized in BTC and share a liquidity pool). The capital structure of a liquidity pool is illustrated in the figure below.

Each perpetual has a margin account like a regular trader, which we term "AMM margin". The AMM margin is the first capital tranche used in the system. For a regular trader, the initial margin determines the amount they have to deposit to initiate a trade. For the AMM, the initial margin acts as a "target margin". The target margin is obtained by exchanging funds between AMM margin and the liquidity pool. This process of balancing towards the initial margin is called rebalancing. Rebalancing occurs with every action that a participant can perform (such as trade, withdrawal, deposit).

Each liquidity pool consists of a a participation fund, out of which each perpetual is allocated a certain amount of funds, and a default fund, which is used to cover the losses of defaulting traders, as well as sharing in the PnL of the AMM, and there is a broker fund that contains the funds obtained from brokers purchasing the broker access. If the AMM margin is below the initial margin (a loss), capital is taken from the broker fund, and if used up, from the participation and default funds and added to the AMM margin of the perpetual that incurs the loss. Hence the broker fund serves as first tranche for AMM losses. If the AMM margin is above the initial margin (a profit), capital is sent to the participation fund and default fund.

A certain proportion of liquidity provision fund is allocated to each perpetual, termed "alloc" in the diagram above. This proportion is relevant for the risk-based pricing that the pricing engine applies to set the AMM price.

Liquidity Provision

Anyone can deposit into the participation fund in the collateral currency of its liquidity pool. Depositors are termed PnL participants, because they participate in profit and loss of the perpetuals and earn trading fees. PnL participants can add and withdraw funds.

When profit/loss is re-balanced between the AMM margin account and its connected liquidity pool, the profit/loss is shared between the participation and default funds proportionally to the respective sizes. E.g., 0.01 ETH of the inverse perpetual ETHUSD are sent to the liquidity pool, then the default fund receives/pays a share equal to max[a/(a + p), c], where a is the size of the default fund, and p the PnL participation fund size. The participation fund receives/pays min[p/(a + p), 1-c]. The cap c is a liquidity pool parameter typically set between 1% and 25%.

Last updated