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

The issue of mistakenly depositing all alETH into the transmuter contract.

Summary

Storing all the alETH in the contract may not be the intended behavior for the user.

Vulnerability Details

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

require((balAfter - balBefore) >= _minOut, "Slippage too high");
transmuter.deposit(asset.balanceOf(address(this)), address(this));

There is an issue with depositing assets into transmuter; the contract is currently depositing all alETH, not just the alETH obtained from the swap.

Impact

If these alETH are user funds, rather than the contract's own funds, incorrect deposits could lead to fund loss or mismanagement of funds.

Tools Used

Manual review

Recommendations

Modify the deposit logic to ensure only the alETH obtained from the swap is deposited:

require((balAfter - balBefore) >= _minOut, "Slippage too high");
transmuter.deposit(balAfter - balBefore, address(this));
Updates

Lead Judging Commences

inallhonesty Lead Judge
10 months ago

Appeal created

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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