CvxCrvRewardsLocker implements a swap without a slippage check that can result in a loss of funds through MEV
The CvxCrvRewardsLocker contract performs a token swap through the CRV cvxCRV pool without any slippage protection, because the minimum output value is set to zero. An attacker could front-run or sandwich the swap to extract value, causing a loss of funds for the contract.
Submitted by Ruhum
The CvxCrvRewardsLocker contract swaps tokens through the CRV cvxCRV pool. But, it doesn’t use any slippage checks. The swap is at risk of being frontrun / sandwiched which will result in a loss of funds.
Since MEV is very prominent I think the chance of that happening is pretty high.
Proof of Concept
Here’s the swap: CvxCrvRewardsLocker.sol#L247-L252.
Recommended Mitigation Steps
Use a proper value for minOut instead of 0.
chase-manning (Backd) confirmed
gzeon (judge) decreased severity to Medium and commented:
According to C4 Judging criteria:
Unless there is something uniquely novel created by combining vectors, most submissions regarding vulnerabilities that are inherent to a particular system or the Ethereum network as a whole should be considered QA. Examples of such vulnerabilities include front running, sandwich attacks, and MEV.
However since there is a configurable
minOutthat is deliberately set to 0, this seems to be a valid issue. I am judging this as Medium Risk.
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
The swap call passes a minimum output of zero instead of a real slippage limit, so the trade accepts any price.
Impact
The swap could be front-run or sandwiched, resulting in a loss of funds; the judge rated it Medium because the minimum output is configurable but deliberately set to zero.
What the attacker needed
Contract performs a token swap; attacker can front-run or sandwich
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.
When a program trades one token for another, it can state the least it is willing to receive. Here that minimum was left at zero, so anyone watching the trade can step in front of it, shift the price, and take the difference. The program still completes the trade but gets less value than it should.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.