DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: low
Invalid

Inverted Sequencer Status Check Allows Trading During Sequencer Downtime

Description

The KeeperProxy contract contains a critical logic error in its sequencer status validation that inverts the intended behavior, allowing trades when the sequencer is down and blocking trades when it's up.

Location

(
/*uint80 roundID*/,
int256 answer,
uint256 startedAt,
/*uint256 updatedAt*/,
/*uint80 answeredInRound*/
) = AggregatorV2V3Interface(sequencerUptimeFeed).latestRoundData();
bool isSequencerUp = answer == 0;
require(isSequencerUp, "sequencer is down");

Impact

Price Manipulation Risk

When the sequencer is down:

  • Trades can execute with stale/incorrect prices

  • No reliable price feed updates

  • Potential for significant price manipulation

Financial Loss Scenarios

  • Users could have positions opened/closed at incorrect prices

  • Vault could execute trades at stale prices during sequencer downtime

  • Liquidations could occur based on incorrect price data

  • Profit/loss calculations would be inaccurate

System-Wide Impact

  • Affects all vault operations that rely on price validation

  • Impacts position management across all supported assets

  • Could lead to cascading failures in automated strategies

  • Compromises the core risk management system

Quantifiable Impact Example

If ETH price is $2,000 and sequencer goes down:

  • Stale prices could be used

  • 3x leveraged position could be opened/closed at wrong price

Affected Protocol Components

function run(
address perpVault,
bool isOpen,
bool isLong,
MarketPrices memory prices,
bytes[] memory _swapData
) external onlyKeeper {
_validatePrice(perpVault, prices);
IPerpetualVault(perpVault).run(isOpen, isLong, prices, _swapData);
}

The vulnerability affects:

  • Position opening/closing

  • Price validation for all actions

  • Risk management systems

  • Automated strategy execution

Proof of Concept

The Arbitrum sequencer feed returns:

  • 0 when sequencer is DOWN

  • 1 when sequencer is UP

Current implementation:

bool isSequencerUp = answer == 0; // This is incorrect
require(isSequencerUp, "sequencer is down");

This means:

  • When sequencer is down (answer = 0):

    • isSequencerUp becomes true

    • require check passes

    • Trades execute with stale prices

  • When sequencer is up (answer = 1):

    • isSequencerUp becomes false

    • require check fails

    • Trades are blocked

Recommended Fix

bool isSequencerUp = answer == 1; // Change to check for 1 instead of 0
require(isSequencerUp, "sequencer is down");

Tools Used

  • Manual code review

  • Static analysis

This vulnerability represents a critical failure point that could lead to substantial financial losses and system-wide disruption, particularly during periods of high market volatility when the sequencer is more likely to experience downtime.

Updates

Lead Judging Commences

n0kto Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
Assigned finding tags:

Suppositions

There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.