We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, great lib!
I have hard time getting getAmountsForCurrentLiquidity to return me correct numbers.
getAmountsForCurrentLiquidity
POOL: https://etherscan.io/address/0x7b12d855445073987D45ea97B1af3554f05E4ef4
const tickSpacing = await factoryV3.methods.tickSpacing().call(); const slot0 = await factoryV3.methods.slot0().call(); const liquidity = await factoryV3.methods.liquidity().call(); const [token0Reserves, token1Reserves] = univ3prices.getAmountsForCurrentLiquidity( [18, 18], liquidity, slot0.sqrtPriceX96, tickSpacing, );
At the moment I checked the liquidity the values were as follows:
liquidity = '245601860687069854565223' slot0.sqrtPriceX96 = '278325983107464703780213223' tickSpacing = 200
This resulted in:
token0Reserves = '110134.75101' token1Reserves = '7.23672'
However there was 82.19160422 WETH and 23658181.1760672 WOOL.
82.19160422 WETH
23658181.1760672 WOOL
Am I missing something?
The text was updated successfully, but these errors were encountered:
BUMP. Similar issue.
Sorry, something went wrong.
So any other ways to calculate token0Reservesand token1Reserves
No branches or pull requests
Hi, great lib!
I have hard time getting
getAmountsForCurrentLiquidity
to return me correct numbers.POOL: https://etherscan.io/address/0x7b12d855445073987D45ea97B1af3554f05E4ef4
At the moment I checked the liquidity the values were as follows:
This resulted in:
However there was
82.19160422 WETH
and23658181.1760672 WOOL
.Am I missing something?
The text was updated successfully, but these errors were encountered: