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

Use inherited _deployFunds function to maintain compatibility instead of reusing transmuter.deposit

Summary

Use inherited _deployFunds function to maintain compatibility instead of reusing transmuter.deposit

Vulnerability Details

https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyMainnet.sol#L80-L81

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

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

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

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

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

function _deployFunds(uint256 _amount) internal override {
transmuter.deposit(_amount, address(this));
}
function claimAndSwap(
......
transmuter.deposit(asset.balanceOf(address(this)), address(this));
}

If the parent contract or interface specifies specific behavior or calling rules for _deployFunds , using this function directly can ensure that you follow these rules and keep the contract's behavior consistent with the parent contract or interface.

Impact

Does not comply with code design principles, and the logic is complicated.

Tools Used

Manual review

Recommendations

Always Use the Inherited _deployFunds Function

function claimAndSwap(
......
_deployFunds(asset.balanceOf(address(this)));
}
Updates

Appeal created

inallhonesty Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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