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

Asset Accounting Discrepancies Due to Calculation Errors in Harvest and Report Functions total assets

Summary

The harvest and report function is critical to the strategy's operation as it facilitates the harvesting of rewards and ensures their redeployment for yield generation. However, an issue has been identified in calculating the total assets during this process, potentially leading to inaccurate accounting and suboptimal reinvestment.

Vulnerability Details

The following contracts were affected by this error:
#StrategyArb.sol

#StrategyMainet.sol

#StrategyOp.sol

The total assets (_totalAssets) were calculated as follows

_totalAssets = unexchanged + asset.balanceOf(address(this)) + underlyingBalance;

This computation omits the exchange amount, which represents claimable rewards. As a result, the reported _totalAssets value is lower than expected, directly impacting the amount available for harvesting and redeployment.

Impact

Underestimated Total Assets:
The omission of the exchange amount causes _totalAssets to understate the actual holdings of the strategy.

  • Reduced Harvested Rewards:
    Since total assets influence harvesting, fewer rewards are harvested than available.

  • Suboptimal Redeployment:
    The strategy redeploys fewer assets, leading to a reduction in potential yield

Recommendations

The calculation of _totalAssets should be updated to include the claimable exchange amount. The corrected computation would appear as:

_totalAssets = unexchanged + asset.balanceOf(address(this)) + underlyingBalance + claimable balance;

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.