Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

n33k - Vault: should have a grace period after sequencer is up #176

Closed
sherlock-admin opened this issue Jul 5, 2023 · 0 comments
Closed
Labels
Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Jul 5, 2023

n33k

medium

Vault: should have a grace period after sequencer is up

Summary

Oracle only checks if sequence is up but does not check for how long it has been up. If sequencer went down and prices changed significantly. Mass liquidation could happen when it goes up. Should provide a grace period to allow customers to react to such an event.

Vulnerability Detail

Only checks if sequencer is active.

def _sequencer_up() -> bool:
    # answer == 0: Sequencer is up
    # answer == 1: Sequencer is down
    answer: int256 = ChainlinkOracle(ARBITRUM_SEQUENCER_UPTIME_FEED).latestRoundData()[1]
    return answer == 0

Impact

Unfair liquidation to borrowers when this happens.

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

Have a grace period for customers to react to such event.

Duplicate of #124

@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jul 10, 2023
@sherlock-admin sherlock-admin added Non-Reward This issue will not receive a payout and removed Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

1 participant