https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyOp.sol#L79-L89
The claimAndSwap function's deadline protection is inadequate, making it susceptible to exploitation by front-runners or any parties capable of manipulating transaction sequencing to gain an unfair advantage over legitimate keepers.
claimAndSwap
function uses _swapUnderlyingToAsset
function to swap underlying asset. Accordingly, _swapUnderlyingToAsset
function interacts with router using swapExactTokensForTokens
function:
block.timestamp
is utilized in purpose of slippage control.
By depending on the current timestamp to enforce deadlines, the system inadvertently weakens the intended purpose of establishing a strict time limit, as this timestamp can be delayed or manipulated at will.
In the absence of a clearly defined and immutable deadline determined by the keeper, this mechanism unintentionally creates opportunities for malicious actors, such as front-runners and MEV bots, to exploit the system. These entities can manipulate transaction timing and sequence to act in their own interest, thereby compromising the fairness and efficiency intended for honest participants.
The reliance on block.timestamp for slippage control undermines the integrity of the system, enabling malicious actors like front-runners to manipulate transaction timing and sequencing, leading to unfair advantages, compromised security, and potential financial losses for honest participants.
Manual Review
Add a strict and user-chosen deadline parameter to the claimAndSwap()
to ensure proper slippage control.
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.