This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
stopthecap - Sequencer is incorrectly validated without checking for the GRACE_PERIOD #11
Labels
Non-Reward
This issue will not receive a payout
stopthecap
medium
Sequencer is incorrectly validated without checking for the GRACE_PERIOD
Summary
Sequencer is incorrectly validated without checking for the GRACE_PERIOD
Vulnerability Detail
According to Chainlink docs about the sequencer in Arbitrum: https://docs.chain.link/data-feeds/l2-sequencer-feeds :
As you can see in
unstoppable
code, it is checked that the sequencer is up:https://github.com/sherlock-audit/2023-06-unstoppable/blob/94a68e49971bc6942c75da76720f7170d46c0150/unstoppable-dex-audit/contracts/margin-dex/Vault.vy#L588-L592
but it is not checked that the GRACE_PERIOD_TIME has passed, which will cause
unstoppable
to get incorrect/stale prices while theGRACE_PERIOD_TIME
has not yet been overImpact
GRACE_PERIOD_TIME
has not yet been over will causeunstoppable
to get stale prices.Code Snippet
https://github.com/sherlock-audit/2023-06-unstoppable/blob/94a68e49971bc6942c75da76720f7170d46c0150/unstoppable-dex-audit/contracts/margin-dex/Vault.vy#L588-L592
Tool used
Manual Review
Recommendation
This is how it would look to check the grace period in solidity:
Duplicate of #124
The text was updated successfully, but these errors were encountered: