BeginnerInteractive Tools

DeFi Calculators

Two interactive tools to help you make informed decisions in DeFi. Estimate gas costs before transacting and understand impermanent loss before providing liquidity.

What You Will Learn

  • How gas costs differ dramatically between Ethereum mainnet and Layer 2 networks
  • How impermanent loss affects liquidity providers when token prices diverge

1. Gas Cost Estimator

Gas fees are the cost of executing transactions on the blockchain. They vary significantly by chain and transaction complexity. Use this calculator to compare costs before choosing which chain to transact on. Layer 2 networks like Arbitrum, Base, and Optimism can reduce gas costs by 99% compared to Ethereum mainnet.

Gas Cost Estimator

Estimate transaction costs across chains. Adjust the parameters below to see how gas costs compare between Ethereum and Layer 2 networks.

Estimated cost for a Swap on Ethereum
$21.00
0.00600000 ETH
Cost = 200,000 gas x 30 gwei x $3,500 / 1e9 = $21.00

Cost Comparison: Swap (200,000 gas) Across Chains

ChainGas PriceCost (ETH)Cost (USD)
Ethereumselected~30 gwei0.00600000$21.00
Arbitrum~0.1 gwei0.00002000$0.07
Base~0.005 gwei0.00000100< $0.01
Optimism~0.05 gwei0.00001000$0.04

2. Impermanent Loss Calculator

When you provide liquidity to a 50/50 pool (like ETH/USDC), your position is subject to impermanent loss if the relative price of the tokens changes. The greater the price divergence from your entry point, the larger the loss compared to simply holding the tokens.

This loss is called "impermanent" because it only becomes permanent when you withdraw. If prices return to their original ratio, the loss disappears. In practice, trading fees earned by the pool can offset impermanent loss, but it is critical to understand the risk before depositing.

Impermanent Loss Calculator

Calculate the impermanent loss for a 50/50 liquidity pool (e.g., ETH/USDC). Adjust the token price to see how price divergence affects your position.

$0Current: $3,500$10,000
Price ratio: 1.0000x
Value if Held
$10000.00
Value in Pool
$10000.00
Impermanent Loss
$0.00 (0.00%)
If Held
$10000
In Pool
$10000
IL = 2 * sqrt(priceRatio) / (1 + priceRatio) - 1

IL Quick Reference

Price ChangeImpermanent Loss
1.25x-0.6%
1.5x-2.0%
2x-5.7%
3x-13.4%
4x-20.0%
0.5x-5.7%

Related Articles

Understanding Gas Fees

Deep dive into how gas fees work on Ethereum and Layer 2 networks, including EIP-1559 and strategies to minimize costs.

Impermanent Loss Explained

Comprehensive guide to impermanent loss in liquidity pools, including concentrated liquidity and multi-asset pools.