https://github.com/giveth/univ3-liquidity-calc
Some back-of-the envelope calculation for uniV3 liquidity and liquidity ratio calculation
https://github.com/giveth/univ3-liquidity-calc
Last synced: 10 months ago
JSON representation
Some back-of-the envelope calculation for uniV3 liquidity and liquidity ratio calculation
- Host: GitHub
- URL: https://github.com/giveth/univ3-liquidity-calc
- Owner: Giveth
- License: gpl-3.0
- Created: 2022-02-10T18:13:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-10T18:21:34.000Z (over 4 years ago)
- Last Synced: 2024-12-20T23:32:40.542Z (over 1 year ago)
- Language: Python
- Size: 14.6 KB
- Stars: 1
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# univ3-liquidity-calc
Some back-of-the envelope calculation for uniV3 liquidity and liquidity ratio calculation.
## Computed values
Let:
- **rL** - liquidity in-range
- **tL** - total liquidity in the pool (all positions)
We find:
- **cR** - concentration ratio
cR = rL/tL
## Usage
Just run the `calc-liq-ratio.py` script, the output will be printed to stdout.
The script is configured to query the GIV/WETH 0.3% pool on UniV3 at `0xc763b6b3d0f75167db95daa6a0a0d75dd467c4e1`.
You can pass an alternative pool address as the first parameter.