The swap functions in StrategyArb.sol
and StrategyOp.sol
use block.timestamp
as a fixed deadline for swaps, which is particularly vulnerable to manipulation on Arbitrum due to its unique timestamp handling. This implementation provides inadequate protection against transaction delays and potential front-running attacks.
The vulnerability exists in two key functions:
StrategyArb.sol::_swapUnderlyingToAsset()
StrategyOp.sol::_swapUnderlyingToAsset()
Current implementation:
The issue is compounded by several factors:
Arbitrum's Timestamp Mechanics:
Arbitrum's L2 block timestamps are derived differently from L1
Sequencers have significant control over transaction ordering and timestamp assignment
There can be substantial delays between transaction submission and execution
Validator Front-running Risk:
In PoS networks, validators know their block proposal slots in advance
Malicious validators can hold transactions and execute them at advantageous moments
No effective maximum delay is enforced, allowing indefinite transaction holding
MEV Impact:
Lack of deadline control enables MEV (Maximal Extractable Value) opportunities
Transactions can be sandwiched or reordered to extract value from swaps
The vulnerability can lead to:
Execution of stale trades at unfavorable prices
Increased exposure to MEV attacks
Financial losses due to excessive slippage
Potential denial of service through transaction delays
Consider allowing function caller to specify swap deadline input parameter.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.