DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: medium
Invalid

Missing balance validation in strategy contracts during token swap

In all three strategy contracts, the claimAndSwap function claims WETH from the transmuter and immediately attempts to swap it for alETH. However, there's no validation that the claimed WETH was actually received before proceeding with the swap:

function claimAndSwap(uint256 _amountClaim, uint256 _minOut, IRamsesRouter.route[] calldata _path) external onlyKeepers {
transmuter.claim(_amountClaim, address(this));
uint256 balBefore = asset.balanceOf(address(this));
_swapUnderlyingToAsset(_amountClaim, _minOut, _path);
// ...
}

If the transmuter claim fails silently or returns success without transferring tokens, the subsequent swap would fail or use old token balances, potentially leading to unintended behavior or stuck transactions.

https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyArb.sol#L71

Updates

Appeal created

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.