home / 06 / 15 · defilocal
06 // category
DeFi tools
DeFi maths: swap output, slippage, impermanent loss, lending health factor, pool share, farm APR, APR and APY.
20 tools · runs in your browser
featured
Slippage Calculator
Work out the minimum you will receive when selling, or the maximum you will pay when buying, for a slippage setting.
open →Uniswap v2 Swap Output Calculator
Calculate the output, price and price impact of a swap in a constant-product (x*y=k) pool.
open →APR to APY Converter
Convert between APR and APY for a given number of compounding periods per year.
open →all defi tools
Impermanent Loss Calculator
Estimate impermanent loss in a constant-product pool for a given price change between the two assets.
defiCrypto Profit and Loss Calculator
Work out profit or loss, return and break-even price for a trade, including fees. Just the maths.
defiUniswap v3 Tick and Price Calculator
Convert between Uniswap v3 tick, sqrtPriceX96 and price, with token decimals taken into account.
defiUniswap v3 Liquidity Range Calculator
Token amounts, liquidity and capital efficiency for a concentrated liquidity range, given price, range and deposit value.
defiLending Health Factor and Liquidation Calculator
Health factor, borrowing power and liquidation price for a loan on Aave-style lending protocols.
defiLiquidity Pool Share Calculator
How much of the second token you need to add, your share of the pool and the LP tokens you get, for 50/50 pools.
defiYield Farm APR Calculator
APR and APY of a farm from daily rewards, reward token price and pool size, plus your own rewards and the APR after you join.
defiUniswap sqrtPriceX96 to Price Converter
Convert Uniswap v3 and v4 sqrtPriceX96 to a human price and tick, and back, with token decimals.
defiVote-Escrow (veToken) Lock Calculator
Voting power for veCRV-style locks: amount × lock time ÷ maximum lock, and how it decays each week.
defiLiquid Staking Token APR Calculator
Work out the real APR and APY of wstETH, rETH, jitoSOL and other liquid staking tokens from two exchange rates.
defiCrypto Loan to Value (LTV) Calculator
Work out LTV, how much more you can borrow and the liquidation price for a crypto-backed loan on Aave or similar.
defiStablecoin Depeg Calculator
See what a stablecoin depeg costs: value lost, distance from the peg in basis points and the gain if it returns.
defiLiquidity Pool Fee Earnings Calculator
Estimate daily, monthly and annual fees from providing liquidity, from pool TVL, volume and fee tier.
defiCurve StableSwap Price Impact Calculator
Work out the output and price impact of a swap in a 2-coin Curve-style stable pool from balances and the A factor.
defiWeighted Pool Swap Calculator (Balancer 80/20)
Spot price and swap output for weighted pools like 80/20 or 60/40, using the Balancer formula.
defiConstant-Sum AMM Swap Calculator
Compare a swap in a constant-sum pool (x + y = k) with a constant-product pool (x * y = k).
defiStaking Validator APR from Rewards
Work out the APR and APY you actually earned from your stake and the rewards over a period.