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

claimAndSwap Function Does Not Align with BaseStrategy Implementation

Summary

The claimAndSwap function is designed to claim tokens from the transmuter, swap them for the asset token, and deposit the swapped tokens back into the transmuter. However, these operations are expected to be carried out by the tend function according to the BaseStrategy implementation.

Vulnerability Details

The BaseStrategy defines the tend function operations as follows "This can be used to harvest and compound rewards, deposit idle funds,perform needed position maintenance or anything else that doesn't need a full report for." Hence , the operations of the claimAndSwap function, which should logically be part of the tend operations, is implemented as a separate function.

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

Impact

Non-conformity with the BaseStrategy contract.

Tools Used

Code Review

Recommendations

Integrate the operations of the claimAndSwap into the tend function

Updates

Appeal created

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

Support

FAQs

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