For the complete documentation index, see llms.txt. This page is also available as Markdown.

LP Vault

The LP Vault — also known as AFX Provider (ALP) — is the protocol-level liquidity vault. It serves as the backbone of the AFX exchange, providing liquidity for trading, handling liquidation takeovers, and absorbing market-making risk.

Overview

  • Operator Fee: 0% (no management fee)

  • Profit Share: 0% (all returns go to depositors)

  • Deposit Currency: USDC

  • Lock Period: Deposits are locked for 4 days before becoming withdrawable.

How It Works

The LP Vault consists of multiple sub-vaults, each serving a specific function:

  • Market Making Sub-Vaults: Execute market-making strategies to provide liquidity on the order book and earn the bid-ask spread.

  • Liquidation Takeover Sub-Vaults: Absorb positions from liquidated users and close them at a discount, earning the liquidation fee and any favorable price difference.

A strategy smart contract manages the trading signals and returns for each sub-vault. The Vault manager (protocol team) configures strategy allocation and risk parameters but cannot directly withdraw user funds.

Revenue Sources

  1. Trading fees: After deducting the Referral commission from the AFX-wide fee revenue, 50% of the remaining amount will be transferred to the LP Vault as earnings.

  2. Liquidation takeover margin: Remaining maintenance margin from liquidated positions.

  3. Liquidation fees: 0.5% of the maintenance margin collected during position takeover.

  4. Strategy earnings: The LP Vault will be managed by professional traders who implement trading strategies. Any profits generated will also remain within the LP Vault.

Since the LP Vault has multiple sub-vaults with different performance, the main Vault NAV is a weighted average of each sub-vault's NAV:

For example, if Sub-Vault 1 has NAV = 1.1 (weight 40%), Sub-Vault 2 has NAV = 1.2 (weight 30%), Sub-Vault 3 has NAV = 1.4 (weight 20%), and Sub-Vault 4 has NAV = 1.3 (weight 10%), then:

Deposits

  • Minimum deposit: No minimum beyond what is required by the blockchain transaction.

  • No maximum deposit limit.

  • Deposits are locked for 4 days before they can be withdrawn.

  • Shares are minted at the current NAV at the time of deposit.

Withdrawals

All withdrawals are processed from the main Vault. If the main Vault has sufficient available balance, the withdrawal is processed immediately. If not, sub-vaults contribute funds proportionally based on their configured ratios.

Each sub-vault reserves 20% of min(Balance, Available Balance) as a liquidity buffer. If sub-vault funds are still insufficient after using the buffer, the system may cancel orders or close positions (starting from smallest margin) to free up capital.

Last updated