Skip to content

Latest commit

 

History

History
37 lines (19 loc) · 1.17 KB

File metadata and controls

37 lines (19 loc) · 1.17 KB

Cold Canvas Tortoise

Medium

Calls to Oracles don't check for stale prices

Summary

Oracle price feeds can become stale due to a variety of reasons. Using a stale price will result in incorrect calculations in the key functionalities SWAP and REDEEM, Since a transaction can spend hours in the mempool.

Root Cause

No response

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

No response

Impact

No response

PoC

No response

Mitigation

It is recommended that the _latestRoundData function implement a validation check comparing the timestamp returned by the oracle with the timeout stored in the TokenOracle struct. This will ensure that only fresh and valid data is utilized in crucial functionalities such as SWAP and REDEEM