You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: