-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Keep3rV2Oracle is not to using FixedPoint library and it's using solc 0.8.x, this introduces a possible revert.
Last price cumulative's in uniswap / sushiswap pairs are accumulators, and they are designed to overflow.
When doing the calculations with these queried value, Keep3rV2Oracle does a priceLast * e10 / Q112 .
If the cumulative price is big enough * e10 will throw an overflow because of checked math in solidity 0.8.x, therefore reverting.
Very rough branch demonstrating that it will fail: link.
It does not represent an immediate risk but it depends a lot on pair's volume and tokens decimals. So, I'd strongly suggest to deprecate the oracle / fix this issue.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working