Impermanent Loss Protector
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Impermanent Loss Protector gives DeFi liquidity providers and yield farmers real-time insight into impermanent loss on their LP positions. It reads live on-chain data including pool reserves, token prices, user LP positions, fee accrual, pool state, and historical price data. You can calculate impermanent loss percentages, token-level IL breakdowns, price ratio changes, and compare IL against price movements. The tool shows you in real time how much value you have lost (or gained) relative to simply holding the tokens, what the current price ratio is, and how IL scales with price changes—so you can make informed decisions about whether to stay in a pool or withdraw.
HOW TO USE
Connect your EVM wallet (optional—the tool can work in read-only mode with a manually entered address). Enter the pool contract address, token 0 address, and token 1 address. Provide a user address to analyze (defaults to your connected wallet). Click "Calculate impermanent loss" to fetch current data from the chain. The tool displays the user's token 0 and token 1 balances in the pool, initial and current price ratios, price change percentage, impermanent loss percentage, and IL expressed in token 0 and token 1 terms. A visual dashboard shows the IL percentage, price change, and IL-to-price-change ratio with progress bars.
TECHNICAL APPROACH
This tool queries live contract state using ethers v5.7.2. It calls getReserves() on the pool contract to fetch current token reserves, and balanceOf() and totalSupply() to compute the user's share of the pool. It reads token decimals to format amounts correctly. The tool calculates the user's actual token balances by multiplying reserves by the user's LP share. It computes the current price ratio from reserves and uses a simulated or user-provided initial price ratio to calculate impermanent loss using the standard formula: IL = 2 * sqrt(r) / (1 + r) - 1, where r is the ratio of current price to initial price. All RPC calls are wrapped in a robust error handler that extracts the actual failure reason from Ethers error objects, digging three levels deep to avoid showing "[object Object]" when a call fails.
WHAT IT CANNOT SEE
This tool cannot predict future price movements, cannot account for impermanent loss from off-chain factors, and cannot guarantee that displayed IL calculations match all pool implementations. It cannot detect whether a pool uses a different AMM formula (e.g., stable swap, concentrated liquidity) that changes IL calculations. It cannot account for fees earned that offset impermanent loss. It cannot see historical price data without an oracle or historical reserve tracking. It cannot detect changes in pool composition from external factors not reflected in reserves. The tool calculates IL based on current state and a reference price, but it does not guarantee that the calculation matches all pool implementations or that IL is the only factor affecting LP returns.
PLEASE NOTE
This tool supports EVM‑compatible chains only (Ethereum, Goerli, Sepolia, Arbitrum, Optimism, Polygon). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is read‑only and does not require signing transactions—connect is optional for auto-filling your address. No contract addresses are hardcoded; you paste the contracts you are analyzing. The tool is free and open under the BotGentz PLAYBOOK‑C specification.