-
Notifications
You must be signed in to change notification settings - Fork 5
ZanyBonzy - No check for active L2 Sequencer #2
Comments
Valid, good suggestion |
Just to further avoid any potential escalations (if it helps), I am aware of the recent sherlock rule changes here:
Imo, this constitutes a valid medium given considered network (Arbitrum) was explicitly mentioned in the contest README and external admins are restricted as seen below here
and here:
|
Fixed in PR 76 |
ZanyBonzy
medium
No check for active L2 Sequencer
Summary
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 according to their recommendation
Vulnerability Detail
The
SingleSidedLPVaultBase
andCrossCurrencyVault
contracts make thegetOraclePrice
external call to theTradingModule
contract. However, thegetOraclePrice
in theTradingModule
makes no check to see if the sequencer is down.Impact
If the sequencer goes down, the protocol will allow users to continue to operate at the previous (stale) rates and this can be leveraged by malicious actors to gain unfair advantage.
Code Snippet
https://github.com/sherlock-audit/2023-10-notional/blob/7aadd254da5f645a7e1b718e7f9128f845e10f02/leveraged-vaults/contracts/vaults/common/SingleSidedLPVaultBase.sol#L323
https://github.com/sherlock-audit/2023-10-notional/blob/7aadd254da5f645a7e1b718e7f9128f845e10f02/leveraged-vaults/contracts/vaults/CrossCurrencyVault.sol#L131
https://github.com/sherlock-audit/2023-10-notional/blob/7aadd254da5f645a7e1b718e7f9128f845e10f02/leveraged-vaults/contracts/trading/TradingModule.sol#L71C1-L77C6
Tool used
Manual Review
Recommendation
It is recommended to follow the Chailink example code
The text was updated successfully, but these errors were encountered: