raw_price = (sqrtPriceX96 * sqrtPriceX96 * 10 ** den1 >> (96 * 2)) / ( 10 ** den0 ) DAI USDT The calculation results is 0?
Activity
YANGXIAO-LI commentedon Aug 5, 2022
sqrtPriceX961 = pool_contract.functions.slot0().call()[0]
sqrtPriceX961 is 79224306130848112672356
YANGXIAO-LI commentedon Aug 5, 2022
DAI decimal is 18
USDT decimal is 6
ytoast commentedon Oct 14, 2022
I believe the calculation is correct though, seems like
den0andden1might have been switched in your calculationsshakibaei65 commentedon Oct 14, 2022
fix: correct integer-shift price floor and odd-tick TVL bounds
fix: correct integer-shift price floor and odd-tick TVL bounds