Ranges.fi public libraries
Uni_v3_funcs.py:
- Python wrapper for Uniswap_v3 SDK library LiquidityAmounts.sol
- Additional function for calculate token relation required to add liquidity on a price range
PriceImpact.py:
- Python script to calculate price impact of a given swap in a Uniswap_v3 pool
- Additionally, a intermediate function can be used to obtain actual liquidity distribution of a uniswap_v3 pool
- Find a commented test as example at the end of the code
Calculate_IL_range.py:
- Python script to calculate impermanent loss across a given pricerange
- Find a commented test as example at the end of the code