Pool Exit
The process of withdrawing liquidity from an AMM pool by redeeming LP tokens for underlying assets.
Pool exit (or liquidity withdrawal) is the process of removing liquidity from an AMM pool. Liquidity providers burn their LP tokens and receive the underlying assets in return. The exit mechanism directly impacts user funds and is a critical security surface in DeFi protocols.
Exit Types
Proportional Exit
Receive tokens in the pool's current ratio:
1Pool: 60% ETH / 40% USDC2Exit: 1000 LP tokens3Receive: 60% of value in ETH, 40% in USDC
Single-Asset Exit
Receive only one token (incurs swap fees/slippage):
1Pool: 60% ETH / 40% USDC2Exit: 1000 LP tokens → All in USDC3Protocol swaps your ETH portion to USDC
Custom Exit
Specify exact amounts of each token (Balancer specialty).
Exit Calculation
1User LP tokens / Total LP supply × Pool reserves = Exit amount23Example:4- User LP: 1,000 tokens5- Total supply: 100,000 tokens6- Pool reserves: 500 ETH + 1,000,000 USDC78Exit: (1,000/100,000) × reserves9 = 1% × 500 ETH + 1% × 1,000,000 USDC10 = 5 ETH + 10,000 USDC
Security Considerations
Reentrancy: Exit functions that send ETH can be exploited for reentrancy attacks.
Oracle manipulation: Price-based exits can be manipulated via flash loans.
Rounding: Integer division in share calculations can be exploited at scale.
Fee extraction: Exit fees must be calculated correctly to prevent drain.
Exit Fees
Many protocols charge exit fees:
- Swap fee on single-asset exits
- Protocol fee on all exits
- Time-based fees (early exit penalties)
Best Practices for Auditors
- Verify LP token burn happens before asset transfer
- Check share calculations for rounding exploitation
- Test exits with dust amounts and maximum values
- Verify reentrancy guards on external calls
- Test exit during extreme pool states
Related Terms
Proportional Exit
LP withdrawal method receiving tokens in the pool's current ratio, avoiding swap fees and price impact.
LP Token
ERC-20 token representing a liquidity provider's proportional share of a pool's reserves and fees.
Impermanent Loss
The temporary loss in value experienced by liquidity providers when the price ratio of deposited assets changes compared to holding them.
Liquidity Pool
Smart contract holding reserves of two or more tokens that enable decentralized trading without order books.
Need expert guidance on Pool Exit?
Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.
Get a Quote
