Easily calculate and track fees generated from Uniswap V3 positions as well as get meaningful insights on volume, prices and investment returns including APR.
Hey, this tool has got a massive upgrade! Try out Unispark, which gives you everything this tool does and a lot more, including more accurate backtests, detailed analysis and more!
What is Uniswap V3 Calculator & Simulator?
Uniswap V3 Calculator is an exploration tool for Uniswap V3 providing insights and fee estimates which are usually abstracted away from the UI. Uniswap doesn't show returns or APR for any new liquidity position that you create, which makes it hard to judge how well a position would do.
You can use this tool to get an idea of which tokens and how much would you want to invest, and estimate what your income from fee could be based on historical data. All the data is directly fetched from Uniswap V3, and is accurate to the current block and subgraph sync time.
This tool is also helpful if you are new to Uniswap and would like to learn how it works.
What do these numbers and charts represent?
This tool uses historical data from the selected pool to show a simple ideal case scenario on how much fee you could potentially earn for providing liquidity to Uniswap V3 for the selected tokens and fee tier. Although, this tool has several assumptions. For the sake of the calculations, this tool assumes no change in the swap ratio (price), the volume or the liquidity positions. This is most certainly the ideal case scenario. This tool also does not account for Impermanent Loss and any honeypot mechanics.
All functions, formulas and assumptions are the same as in the Uniswap codebase, including percentages, liquidity and the price calculations.
How does this tool work?
*technical stuff ahead*
Uniswap V3 Fee Calculator uses the formulas as described in the Uniswap V3 Whitepaper to calculate specific token amounts as well as liquidity and uses the current swap volume and liquidity to create an estimate of future fee potential based on historical values.
The prices for the tokens are calculated by using
derivedETH values for
token and multiplying with the USD price for Ethereum taken from a weighted average of the stablecoin pools. The
depositAmount is then used to calculate token splits using the liquidity formulas below, using current global liquidity.
The pool volume is calculated from the average of the last 7 days, not including the present day.
24hVolume = avg([volumeT1...volumeT8])
User liquidity is calculated as an addition to the total liquidity pool:
liquidity0 = amount0 * (sqrtRatioBX96 * sqrtRatioAX96) / (sqrtRatioBX96 - sqrtRatioAX96)
liquidity1 = amount1 / (sqrtRatioBX96 - sqrtRatioAX96)
P <= Pa, then
userTotalLiquidity = liquidity0.
Pa < P < Pb, then
userTotalLiquidity = min(liquidity0, liquidity1).
P >= Pb, then
userTotalLiquidity = liquidity1.
Finally using Liquidity from Uniswap V3, we can calculate the following:
computedFee = feeTier * 24hVolume * (userTotalLiquidity / (existingLiquidity + userTotalLiquidity))
computedFee is plugged back into the Uniswap V3 formula to calculate the actual fee for the selected tokens and fee tier.
This tool is great to visualize and simulate any Uniswap V3 position, but please do your own research before investing. Nothing on this website is investment advice, and you bear all responsibility from investing. All of this is based on historical data, and nobody can predict the future.
Metacrypt is a blockchain solutions company providing innovative and powerful decentralized services across several different blockchains.
© 2023 Metacrypt. All rights reserved.