Submitted by Jeiwan
Oracle.sol#L91
Oracles viewPrice function doesnt report a dampened price until getPrice is called and todays price is updated. This will impact the public read-only functions that call it:
These functions are used to get on-chain state and prepare values for write calls (e.g. calculate withdrawal amount before withdrawing or calculate a users debt that can be liquidated before liquidating it). Thus, wrong values returned by these functions can cause withdrawal of a wrong amount or liquidation of a wrong debt or cause reverts.
Consider this change:
0xean (judge) commented:
08xmt (Inverse) confirmed and commented:
