My uncertainty about this implementation stems from the fact that getChainedPrice returns an int256 instead of a int24 that is required for getQuoteAtTick.
My second question is: why is the synthetic tick returned by getChainedPrice an int256? Should I be asserting that the synthetic tick doesn't overflow before casting to an int24?
Hello, I'm trying to utilise
getChainedPrice
to get the TWAP of a token route and was just wondering if I'm using it correctly:My uncertainty about this implementation stems from the fact that
getChainedPrice
returns anint256
instead of aint24
that is required forgetQuoteAtTick
.My second question is: why is the synthetic tick returned by
getChainedPrice
anint256
? Should I be asserting that the synthetic tick doesn't overflow before casting to anint24
?