get_token0_amount_in_range
Documentation for eth_defi.uniswap_v3.utils.get_token0_amount_in_range function.
- get_token0_amount_in_range(liquidity, sp, sb)[source]
Returns token0 (base token) amount in a liquidity range
This is derived formula based on: https://atiselsts.github.io/pdfs/uniswap-v3-liquidity-math.pdf
- Parameters
liquidity – current virtual liquidity
sp – square root current price
sb – square root upper price