get sqrt twap price will be incorrect if tick become negative
Summary
Twap price will be larger than it should be when ticks diff become negative and if
int24( (tickCumulatives[1] - tickCumulatives[0]) / int32(twapInterval) ) ! = 0
Vulnerability Detail
uniswap implementation for handling negative ticks
However protocol didn't decrease the tick when ticks diff become negative and if int24( (tickCumulatives[1] - tickCumulatives[0]) / int32(twapInterval) ) ! = 0
OMEN
medium
get sqrt twap price will be incorrect if tick become negative
Summary
Twap price will be larger than it should be when ticks diff become negative and if
int24( (tickCumulatives[1] - tickCumulatives[0]) / int32(twapInterval) ) ! = 0
Vulnerability Detail
uniswap implementation for handling negative ticks However protocol didn't decrease the tick when ticks diff become negative and if
int24( (tickCumulatives[1] - tickCumulatives[0]) / int32(twapInterval) ) ! = 0
Impact
price will be bigger than it should be
Code Snippet
https://github.com/sherlock-audit/2024-04-teller-finance/blob/main/teller-protocol-v2-audit-2024/packages/contracts/contracts/LenderCommitmentForwarder/extensions/LenderCommitmentGroup/LenderCommitmentGroup_Smart.sol#L580-L592
Tool used
Manual Review
Recommendation
pls implement handling ticks like in uniswap
Duplicate of #283