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
This condition only validates if the price.publishTime is earlier than a certain time but does not ensure that the timestamp is within the acceptable range. The correct approach should be:
This ensures the price is recent enough to be considered valid.
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Using an incorrect stale price validation may allow outdated prices to pass through, leading to incorrect calculations, trades, or fund mismanagement. This oversight can adversely affect the protocol's reliability, especially in volatile markets where precise and current prices are critical.
Zealous Black Grasshopper
High
Inadequate Check for Stale Price in
currentValue
FunctionSummary
The
currentValue
function uses an incorrect logic to verify if the price fetched from thepythOracle
is stale. The current implementation checks:This condition only validates if the price.publishTime is earlier than a certain time but does not ensure that the timestamp is within the acceptable range. The correct approach should be:
This ensures the price is recent enough to be considered valid.
Root Cause
No response
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
Using an incorrect stale price validation may allow outdated prices to pass through, leading to incorrect calculations, trades, or fund mismanagement. This oversight can adversely affect the protocol's reliability, especially in volatile markets where precise and current prices are critical.
PoC
No response
Mitigation
Update the stale price check logic to:
The text was updated successfully, but these errors were encountered: