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

Potential Misalignment Between Comments and Code

Description

In some instances, the comments in the code may not accurately reflect the code's functionality or intended behavior.

Example:

  • The comment in _deployFunds mentions swapping WETH to alETH, but the code only deposits alETH into the transmuter.

    /**
    * @param _amount The amount of 'asset' that the strategy can attempt
    * to deposit in the yield source.
    * Here alETH is deposited directly to the transmuter
    * Note we could also swap WEETH to alETH here if available to claim but making this call permissioned due to sandwiching risk
    */
    function _deployFunds(uint256 _amount) internal override {
    transmuter.deposit(_amount, address(this));
    }
  • The comment may confuse readers into thinking that a swap operation is occurring in _deployFunds, which is not the case.

Impact

  • Misunderstanding: Inaccurate comments can lead to misconceptions about how the contract functions, potentially causing issues during maintenance or audit.

  • Documentation Errors: Discrepancies between code and comments reduce the reliability of the documentation.

Recommendation

  • Align Comments with Code: Review all comments to ensure they accurately reflect the code's behavior.

    /**
    * @param _amount The amount of 'asset' that the strategy can attempt
    * to deposit in the yield source.
    * Deposits alETH directly to the transmuter.
    */
    function _deployFunds(uint256 _amount) internal override {
    transmuter.deposit(_amount, address(this));
    }
Updates

Appeal created

inallhonesty Lead Judge 8 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.