Impermanent Loss Explained in Detail
Impermanent loss compares two outcomes: providing assets to an AMM pool versus holding those assets outside the pool. When relative prices move, the pool rebalances the LP's exposure.
Fees can offset the loss, but the loss matters when protocols value LP positions or promise returns.
Smart contract example
LP value after price move < hold value after price move
This comparison is economic, but it can affect smart contract accounting.
Impermanent Loss in Auditing
Impermanent loss becomes a security issue when protocols use LP tokens as collateral, calculate strategy profits, or promise principal protection without accounting for price movement.
Auditors review whether LP valuation can be manipulated or misunderstood.
Red flags in code
-
LP tokens are valued only from spot reserves.
-
Principal preservation is assumed without proof.
-
Fees are counted as profit while price exposure is ignored.
-
Withdrawal accounting hides losses.
-
Oracle design does not handle pool manipulation.
How to test or review it
-
Simulate large price moves in both directions.
-
Compare LP value with hold value.
-
Manipulate reserves before deposit, withdrawal, or borrow actions.
-
Test low-liquidity and high-volatility cases.
-
Review how fees, losses, and share price are reported.
Keep learning this topic
AMM
An AMM, or automated market maker, is a decentralized exchange design where smart contracts quote trades from liquidity and formulas instead of an order book.
Liquidity Pool
A liquidity pool is a smart contract reserve of assets used for swaps, lending, liquidations, pricing, or vault accounting.
Price Manipulation
Price manipulation is the intentional movement of an asset, pool, share, or collateral price so a protocol values assets incorrectly.
Practice this in real audit scenarios
Definitions help, but auditors need reps. SCH turns concepts like Impermanent Loss into exploit labs, code review habits, and report-writing practice.
Start the free trial or see the full smart contract auditing course.