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

Commented-Out Claims in Harvest

Description

In _harvestAndReport, the strategy retrieves a claimable amount of WETH from the transmuter but does not actually claim it (the code is commented out). If the intention is to routinely claim and convert WETH to the strategy’s main asset, this omission prevents that automatic process from happening.

Impact: Medium/High

  1. Unrealized Yield

    • The contract may accumulate large amounts of claimable WETH without actually harvesting it. This results in lower realized returns for depositors.

  2. Manual Intervention Required

    • Operators or keepers might need to invoke a separate function (e.g., claimAndSwap) instead of relying on a fully automated harvest cycle.

  3. Inefficiency & Opportunity Cost

    • Funds remain idle in the transmuter instead of being redeployed, potentially missing out on additional yield opportunities.


Evidence from Code

function _harvestAndReport()
internal
override
returns (uint256 _totalAssets)
{
uint256 claimable = transmuter.getClaimableBalance(address(this));
// The actual claim call is commented out:
// transmuter.claim(claimable, address(this));
// ... rest of the function
}

Here, claimable is calculated but never utilized, meaning no WETH is claimed.


Potential Scenario / Impact

  1. Continued Accumulation of Unclaimed WETH

    • If _harvestAndReport is expected to automatically manage all yield, the unclaimed WETH grows over time, delaying or preventing accurate profit realization.

  2. Missed Compounding

    • When left unclaimed, that WETH can’t be swapped to asset (alETH) or otherwise reinvested, impairing the compounding effect.


Suggested Mitigation

  1. Reactivate the Claim Logic

    uint256 claimable = transmuter.getClaimableBalance(address(this));
    if (claimable > 0) {
    transmuter.claim(claimable, address(this));
    }
    • This ensures any accumulated WETH is collected and can be redeployed or swapped automatically during harvest.

  2. Optional: Integrate With _swapUnderlyingToAsset

    • If the strategy aims for automated reinvestment, consider swapping the claimed WETH to the main asset directly in _harvestAndReport, or schedule a secondary function call to do so.

  3. Add Parameters or Conditions

    • Strategically claim WETH only if it meets a minimum threshold, reducing unnecessary gas costs while still ensuring the majority of profits are harvested over time.

Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Incorrect accounting in `_harvestAndReport` claimable should be included

Support

FAQs

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