Submitted by Ruhum
Oracle.sol#L124
The two-day feature of the oracle can be gamed where you only have to manipulate the oracle for ~2 blocks.
The oracle computes the day using:
Since were working with uint values here, the following is true:
1728799 / 86400 = 1
172800 / 86400 = 2
Meaning, if you manipulate the oracle at the last block of day X, e.g. 23:59:50, and at the first block of day X + 1, e.g. 00:00:02, you bypass the two-day feature of the oracle. You only have to manipulate the oracle for two blocks.
This is quite hard to pull off. Im also not sure whether there were any instances of Chainlink oracle manipulation before. But, since you designed this feature to prevent small timeframe oracle manipulation I think its valid to point this out.
If you increase it to a three-day interval you can fix this issue. Then, the oracle has to be manipulated for at least 24 hours.
08xmt (Inverse) acknowledged and commented:
