evm_get_impermanent_loss
Calculate impermanent loss for liquidity providers by comparing current LP position value against holding the tokens separately, including fee earnings, to assess net LP risk.
Instructions
Calculate impermanent loss for liquidity providers.
Compares current LP position value vs holding assets separately. Essential for LP risk management.
PARAMETERS:
chain: Target EVM chain
token0: { symbol, initialPrice, currentPrice, amount }
token1: { symbol, initialPrice, currentPrice, amount }
poolAddress: Pool address for live data (optional)
includeFeesEarned: Include estimated fees in calculation (optional)
feeRate: Pool fee rate as percent (e.g., 0.3 for 0.3%) (optional)
CALCULATION: • Compares LP value vs holding tokens • Accounts for price divergence • Includes fee earnings offset • Shows IL percentage
Returns IL amount, percentage, fee earnings, and net position.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"token0": "<token0>",
"token1": "<token1>"
},
"name": "evm_get_impermanent_loss"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | ||
| token0 | Yes | ||
| token1 | Yes | ||
| feeRate | No | Pool fee rate (e.g., 0.3 for 0.3%) | |
| poolAddress | No | Pool address for live data (optional) | |
| includeFeesEarned | No | Include estimated fees in calculation |