Skip to content
Audit finding Intermediate

no validation to ensure the arbitrum sequencer is down

The protocol reads Chainlink oracle prices on Arbitrum without checking whether the L2 sequencer is down, so stale prices can be used. A malicious actor could exploit sequencer downtime to force the protocol into rebalancing at a loss.

0x007 Follow with Bauer, BugBusters and 9 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2023-05-Index-judging/issues/262

Found by

0x007, Bauer, BugBusters, MohammedRizwan, Phantasmagoria, Saeedalipoor01988, ShadowForce, hildingr, jasonxiale, kutugu, rvierdiiev, sashik_eth

Summary

There is no validation to ensure sequencer is down

Vulnerability Detail

Solidity
 int256 rawCollateralPrice = strategy.collateralPriceOracle.latestAnswer();
        rebalanceInfo.collateralPrice = rawCollateralPrice.toUint256().mul(10 ** strategy.collateralDecimalAdjustment);
        int256 rawBorrowPrice = strategy.borrowPriceOracle.latestAnswer();
        rebalanceInfo.borrowPrice = rawBorrowPrice.toUint256().mul(10 ** strategy.borrowDecimalAdjustment);

Using Chainlink in L2 chains such as Arbitrum requires to check if the sequencer is down to avoid prices from looking like they are fresh although they are not.

The bug could be leveraged by malicious actors to take advantage of the sequencer downtime.

Impact

when sequencer is down, stale price is used for oracle and the borrow value and collateral value is calculated and the protocol can be forced to rebalance in a loss position

Code Snippet

https://github.com/IndexCoop/index-coop-smart-contracts/blob/317dfb677e9738fc990cf69d198358065e8cb595/contracts/adapters/AaveLeverageStrategyExtension.sol#L889-L907

Tool used

Manual Review

Recommendation

recommend to add checks to ensure the sequencer is not down.

Discussion

ckoopmann

Seems to be correct however I'm not sure regarding validity / severity since this is specific to L2 and not relevant for our current deployment strategy on Ethereum.

The original report as published on Sherlock, by 0x007. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the oracle price fetch does not verify the Chainlink L2 sequencer uptime feed before using the latest answer.

Impact

When the sequencer is down, stale oracle prices are used to calculate borrow and collateral values, and the protocol could be forced to rebalance in a loss position.

What the attacker needed

Deployment on an L2 with a sequencer; sequencer downtime

The fix

Checks should be added to ensure the sequencer is not down before using oracle prices.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

On a layer-2 network like Arbitrum, a central sequencer orders transactions. If it goes offline, prices from an oracle can be old but still look current. The code never checks for this, so someone could use the stale prices to push the protocol into a bad trade.

More by 0x007

View all

25 more disclosed reports, best first.

More from Index Update

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.