code-423n4 / 2024-04-revert-mitigation-findings

1 stars 1 forks source link

H-05 MitigationConfirmed #26

Open c4-bot-3 opened 4 months ago

c4-bot-3 commented 4 months ago

Lines of code

Vulnerability details

TEMPLATE

C4 Issue

H-05: _getReferencePoolPriceX96() will show incorrect price...

Issue Details

V3Oracle.sol was calculating the TWAP price incorrectly, leading to distorted prices and potential DOS of different functions.

The problem stemmed from the fact that V3Oracle::_getReferencePoolPriceX96() did not round down in case tickCumulativesDelta is negative as uniswap lib does.

Mitigation

PR-10 successfully mitigates the original issue by adding the negative round down check present in the Unsiwap library

Conclusion

Mitigation Confirmed

c4-judge commented 4 months ago

jhsagd76 marked the issue as satisfactory