This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
TheNaubit - Not waiting for a grace period after the Sequencer is up can lead to wrong oracle prices #124
Labels
Non-Reward
This issue will not receive a payout
Sponsor Disputed
The sponsor disputed this issue's validity
TheNaubit
medium
Not waiting for a grace period after the Sequencer is up can lead to wrong oracle prices
Summary
Not waiting for a grace period after the Sequencer is up can lead to wrong oracle prices, causing several issues in the protocol.
Vulnerability Detail
There are two things to check in the Sequencer based in the official Chainlink docs and examples:
The
Vault
contract uses the Chainlink price feeds to get the USD values for different tokens and thus it checks first if the sequencer is up. But the problem it is not also checking if the grace period is over:Similar issues: sherlock-audit/2022-11-sentiment-judging#3
Impact
It can lead to wrong and stale data, causing different issues in the protocol.
Code Snippet
https://github.com/sherlock-audit/2023-06-unstoppable/blob/main/unstoppable-dex-audit/contracts/margin-dex/Vault.vy#L588-L592
Tool used
Manual Review
Recommendation
Check also if the grace period is over:
The text was updated successfully, but these errors were encountered: