Lively Glossy Goat - Attacker will redeem tokens at stale prices #46
Labels
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
Lively Glossy Goat
High
Attacker will redeem tokens at stale prices
Summary
There are no staleness checks on the pyth oracle used to value tokens, which will lead to attackers using very stale prices at the expense of other participants.
Root Cause
In
PythOracle.sol:98
, the oracle is usinggetPriceUnsafe()
which does not have any staleness checks, and could potentially return the very first oracle value (assuming there have been no updates since then).Internal Pre-conditions
PriceOracleAggregator
needs to have been configured to use aPythOracle
External Pre-conditions
PythOracle
's feed will need to not have been updated recentlyAttack Path
Impact
Protocol insolvency, since the solvency checks will essentially be bypassed
PoC
No response
Mitigation
Use
getPriceNoOlderThan()
and store a max age for each Pyth oracleThe text was updated successfully, but these errors were encountered: