All Projects → chunza2542 → uniswapv3-calculator

chunza2542 / uniswapv3-calculator

Licence: other
An all-in-one platform for Uniswap liquidity providers (prev Uniswap Calculator)

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to uniswapv3-calculator

awesome-uniswap-v3
A curated list of awesome Uniswap v3 resources
Stars: ✭ 375 (+186.26%)
Mutual labels:  uniswap, uniswap-v3
descent-app
Top of descent path calculator. Let's calculate your descent!
Stars: ✭ 28 (-78.63%)
Mutual labels:  calculator, create-react-app
Kelvin
A powerful language for symbolic computation written in Swift.
Stars: ✭ 23 (-82.44%)
Mutual labels:  calculator
react-snake
React Snake (Functional Style)
Stars: ✭ 128 (-2.29%)
Mutual labels:  create-react-app
parksben.github.io
parksben's blog
Stars: ✭ 46 (-64.89%)
Mutual labels:  create-react-app
v3-staker
Canonical liquidity mining contract for Uniswap V3
Stars: ✭ 289 (+120.61%)
Mutual labels:  uniswap
fireship-js
Custom CRA template for Fireship loaded up with useful Firebase boilerplate, React Firebase Hooks, routing, and source code explorer for analyzing bundle sizes
Stars: ✭ 21 (-83.97%)
Mutual labels:  create-react-app
react-redux-hackernews
React Redux Hackernews Application
Stars: ✭ 19 (-85.5%)
Mutual labels:  create-react-app
CubeMail
CubeMail is a webmail client built using React and Chakra UI, It runs in the browser and uses the Gmail's public Javascript API.
Stars: ✭ 25 (-80.92%)
Mutual labels:  create-react-app
mathpad
Interactive scratchpad calculator for VS Code
Stars: ✭ 20 (-84.73%)
Mutual labels:  calculator
availability-calculator
Calculate how much downtime should be permitted in your Service Level Agreement or Objective
Stars: ✭ 60 (-54.2%)
Mutual labels:  calculator
attribute-depends-calculator
Automatically calculate a collection of depends attribute of ActiveRecord
Stars: ✭ 41 (-68.7%)
Mutual labels:  calculator
react-styled-components-example
React Styled Components Example
Stars: ✭ 35 (-73.28%)
Mutual labels:  create-react-app
react-mobx-local-state-example
React MobX (for Local State) Example
Stars: ✭ 27 (-79.39%)
Mutual labels:  create-react-app
caeroc
☴🖩 Compressible Aerodynamics Calculator for Python
Stars: ✭ 25 (-80.92%)
Mutual labels:  calculator
react-typescript-starter
Minimalist React 18 starter template with TypeScript ⚛
Stars: ✭ 72 (-45.04%)
Mutual labels:  create-react-app
workshop
React Workshop
Stars: ✭ 13 (-90.08%)
Mutual labels:  create-react-app
bem-react-boilerplate
DEPRECATED! A bare minimum frontend boilerplate based on create-react-app and bem-react-core.
Stars: ✭ 32 (-75.57%)
Mutual labels:  create-react-app
asm-docs
Documentation about native assembly programming on the TI CE calculators (84+CE / 83PCE)
Stars: ✭ 41 (-68.7%)
Mutual labels:  calculator
top100token-ape-bot
UniSwapV2 compatible EVM Ape trading bot, customizable and support multiple blockchain: BSC,Ethereum,DogeChain,Polygon,Fantom,Avax
Stars: ✭ 123 (-6.11%)
Mutual labels:  uniswap

🦄 UniswapCalculator

Uniswap V3 Fee Calculator, Visit: uniswap.fish, @uniswapdotfish

Disclaimer: please do your own research, this website is intended to be used and must be used for informational purpose only. It is very important to do your own analysis before making any investment based on your personal circumstances.

Report a bug or request a feature

Donate this project on Gitcoin Grant

Features

  • Fee calculation: select pair and pool, input deposit amount (USD), and adjust your lower and upper price
  • Liquidity position histogram and correlation chart to help you plan your strategy better
  • It's 100% open source! hope that Uniswap community will bring a lot more ideas and features to this project

Calculation Breakdown

1. Calculate deposit amount of token0 and token1

  • Refer to Uniswap V3 Whitepaper (Formula: 6.29, 6.30, P.8), we can calculate total amount of each token by using these formulas: (if il <= ic < iu; where il = lowerTickId, ic = currentTickId, iu = upperTickId, Pl = lower price, Pu = upper price)
    • deltaY = deltaL * (sqrt(P) - sqrt(Pl))
    • deltaX = deltaL * (1 / sqrt(P) - 1 / sqrt(Pu))
  • For estimation of the amount of token0 (deltaX) and token1 (deltaY) we need to know deltaL that make:
    • deltaY * priceUSDY + deltaX * priceUSDX = depositAmountUSD
  • So we can write a equation like this:
    • deltaL * (sqrt(P) - sqrt(Pl)) * priceUSDY + deltaL * (1 / sqrt(P) - 1 / sqrt(Pu)) * priceUSDX = depositAmountUSD
    • Then: deltaL = depositAmountUSD / ((sqrt(P) - sqrt(Pl)) * priceUSDY + (1 / sqrt(P) - 1 / sqrt(Pu)) * priceUSDX)
  • After we've calculated deltaL, we can calculate deltaX and deltaY using these formulas mentioned in Uniswap v3 Whitepaper
    • deltaY = deltaL * (sqrt(P) - sqrt(Pl)) (Formula: 6.29, P.8)
    • deltaX = deltaL * (1 / sqrt(P) - 1 / sqrt(Pu)) (Formula: 6.30, P.8)

2. Calculate estimated fee

  • Estimated fee (daily) can be calculated by this equation:
    • fee = feeTier * volume24H * (deltaL / (L + deltaL)) where:
      • volume24H = average of 24h volume from [currentDay - 7, currentDay - 1]
      • L = total liquidity (cumulative of liquidityNet from all ticks that il <= ic)
      • deltaL = delta liquidity, can be calculated from:
        • liquidityAmount0 = amount0 * (sqrt(pu) * sqrt(pl)) / (sqrt(pu) - sqrt(pl))
        • liquidityAmount1 = amount1 / (sqrt(pu) - sqrt(pl))
        • if ic < il; deltaL = liquidityAmount0
        • if ic > iu; deltaL = liquidityAmount1
        • if ic >= il && ic <= iu; deltaL = min(liquidityAmount0, liquidityAmount1)

Crafted with 🧡 by @chunza2542.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].