LP Token
ERC-20 token representing a liquidity provider's proportional share of a pool's reserves and fees.
LP Tokens (Liquidity Provider tokens) are ERC-20 tokens minted by automated market maker protocols to represent a liquidity provider's proportional ownership of a liquidity pool's reserves and accumulated trading fees. These tokens serve as receipts proving the provider's claim on the underlying assets and function as the accounting mechanism enabling decentralized, permissionless liquidity provision without requiring trusted intermediaries to track individual positions.
When users deposit assets into an AMM pool, the smart contract mints LP tokens proportional to their contribution relative to the pool's total reserves. If a pool contains $1 million in total liquidity and a user deposits $10,000 (1% of the pool), they receive 1% of the total LP token supply. These tokens can be transferred, used as collateral in lending protocols, staked for additional rewards, or burned to redeem the underlying assets at any time.
Minting and Burning Mechanics
The initial deposit into an empty pool establishes the fundamental LP token pricing. Many implementations mint LP tokens equal to the geometric mean of deposited amounts: sqrt(amountX * amountY). For a first deposit of 10 ETH and 50,000 USDC, the contract mints sqrt(10 * 50,000) = sqrt(500,000) ≈ 707.1 LP tokens. This geometric mean approach prevents manipulation through unbalanced initial deposits.
Subsequent deposits must match the pool's current ratio. If the pool now contains 100 ETH and 500,000 USDC (1:5,000 ratio), new providers deposit assets in that proportion. The LP tokens minted equal (deposited_amount / pool_reserves) * existing_LP_supply. A deposit of 1 ETH and 5,000 USDC (1% of pool reserves) mints tokens equal to 1% of the existing LP token supply.
Burning LP tokens reverses the process. When providers redeem their position, they send LP tokens back to the pool contract. The contract burns these tokens and calculates the redeemer's proportional share: (burned_tokens / total_LP_supply) * reserve_balance. If someone holds 10% of LP tokens, burning them returns 10% of both token reserves, regardless of how much they initially deposited. The ratio of assets received typically differs from the deposit ratio due to trading activity and impermanent loss.
Fungibility and Composability
LP tokens' fungibility as standard ERC-20 tokens enables powerful DeFi composability. Yield farming protocols accept LP tokens as deposits, distributing additional governance tokens as incentives. Users provide liquidity to Uniswap ETH/USDC, receive UNI-V2 LP tokens, then stake those in SushiSwap's Onsen program to earn SUSHI tokens—earning fees from both protocols simultaneously.
Lending protocols like Aave and Compound accept LP tokens as collateral, enabling leveraged yield farming. Users provide liquidity, receive LP tokens, deposit those as collateral to borrow assets, then loop the position multiple times. This leverage amplifies both returns and risks—market volatility can trigger liquidation cascades where collateral value drops, forcing liquidations that further depress prices.
LP token markets exist where these tokens trade directly. While designed as receipts redeemable for underlying assets, LP tokens can trade at premiums or discounts to net asset value (NAV) during extreme market conditions or if redemption is temporarily disabled. Arbitrageurs profit from these discrepancies, buying discounted LP tokens to redeem for full underlying value.
Concentrated Liquidity and NFT Positions
Uniswap V3 fundamentally changed LP token mechanics by introducing concentrated liquidity. Rather than providing liquidity across the entire price curve (0 to infinity), V3 LPs specify custom price ranges for their positions. This capital efficiency improvement means positions are no longer fungible—each has unique parameters (lower bound, upper bound, liquidity amount).
To represent these non-fungible positions, Uniswap V3 uses ERC-721 NFTs instead of ERC-20 LP tokens. Each position is a unique NFT with metadata encoding its bounds and liquidity. While this enables superior capital efficiency, it sacrifices composability—NFT positions cannot be used as collateral in most lending protocols or easily integrated into yield aggregators designed for fungible tokens.
The DeFi ecosystem has developed solutions. Uniswap's NonfungiblePositionManager provides a standard interface for NFT positions. Protocols like Gamma Strategies and Arrakis Finance create fungible wrappers around concentrated liquidity positions, managing the underlying NFTs while issuing fungible tokens to depositors—restoring composability at the cost of some flexibility.
Security Vulnerabilities and Exploits
LP tokens face unique security challenges. Inflation attacks target newly deployed pools with no liquidity. An attacker deposits 1 wei of each token, receives some small amount of LP tokens, then directly transfers a huge amount to the pool without minting more tokens. This drastically inflates LP token price. When victims deposit, rounding in the minting calculation causes them to receive 0 LP tokens despite their assets entering the pool. The attacker redeems their LP tokens for the full balance.
Mitigations include minimum first deposit requirements and burning initial LP tokens to a dead address (similar to ERC-4626 protections). OpenZeppelin's implementation recommends burning 1000 wei of the first LP tokens minted, establishing a minimum total supply that prevents economically viable inflation attacks.
Reentrancy during LP token transfers can compromise pool accounting. If LP token transfers trigger callbacks to malicious contracts (ERC-777, tokens with hooks), attackers might reenter the pool contract during mint() or burn() operations before state updates complete. Proper reentrancy guards using OpenZeppelin's ReentrancyGuard prevent these attacks by blocking reentrant calls.
Fee-on-transfer token exploits occur when pools integrate tokens that deduct fees during transfers. If a user claims to deposit 100 tokens but the contract receives only 99 (1% fee), yet credits LP tokens for 100, the pool's accounting breaks. Attackers exploit the discrepancy to drain pools. Safe implementations verify actual received amounts using balance checks: uint received = token.balanceOf(address(this)) - balance_before;
LP token flash loan attacks exploit pools that don't properly validate LP token usage. Flash loans of LP tokens can temporarily grant huge proportional ownership, enabling attacks on governance (snapshot-based voting) or manipulating LP-token-weighted rewards distribution. Protocols must implement time-weighted or locked-position mechanisms to prevent instant LP token flash loan exploits.
Economic Considerations and Taxation
LP token value derives entirely from the underlying pool reserves plus accumulated fees. If a pool contains $1M in assets and 1M LP tokens exist, each token represents $1 of underlying value. As trading fees accumulate, per-token value increases. However, impermanent loss can reduce this value if asset prices diverge significantly.
Taxation of LP tokens presents complexity in many jurisdictions. Depositing assets for LP tokens might be a taxable event (disposition of assets) or a non-taxable exchange (similar to stock for stock). Fee accumulation likely represents taxable income, but when is it realized—continuously as fees accrue, or only upon redemption? Regulatory guidance remains unclear in most jurisdictions, creating compliance challenges.
Impermanent loss affects LP token holders even before redemption. While IL is only "realized" upon withdrawal (hence "impermanent"), accounting standards in some jurisdictions might require marking LP positions to market value including unrealized IL. This creates tax reporting challenges for active LPs who never redeem but theoretically suffer IL as prices fluctuate.
Understanding LP tokens is essential for DeFi security professionals. These tokens represent billions in TVL and serve as composable primitives throughout the ecosystem. Vulnerabilities in LP token mechanics—inflation attacks, reentrancy, accounting bugs—can compromise not just individual pools but all protocols accepting LP tokens as collateral or deposits. The article's explanation of LP token minting/burning as core AMM primitives provides foundation for analyzing whether implementations handle edge cases safely and resist adversarial manipulation.
Articles Using This Term
Learn more about LP Token in these articles:
Related Terms
Liquidity Pool
Smart contract holding reserves of two or more tokens that enable decentralized trading without order books.
Liquidity Provider (LP)
A user who deposits assets into a liquidity pool to facilitate trading, earning fees in return.
Impermanent Loss
The temporary loss in value experienced by liquidity providers when the price ratio of deposited assets changes compared to holding them.
NFT LP Positions
ERC-721 non-fungible tokens representing unique concentrated liquidity positions in Uniswap v3.
Need expert guidance on LP Token?
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

