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

Value Checked but Not Considered in Asset Calculation

Summary

The contracts StrategyArb.sol, StrategyOp.sol, and StrategyMainnet.sol contain a similar function named _harvestAndReport. This function is intended to calculate the total assets available within the system. However, it does not take all relevant variables into account when performing this calculation.

Vulnerability Details

The _harvestAndReport function is designed to account for "all applicable assets, including loose assets." During this process, it defines a claimable variable as follows:

uint256 claimable = transmuter.getClaimableBalance(address(this));

This claimable variable represents the assets available in the transmuter for the contract. However, the claimable variable is not included in the calculation of the _totalAssets variable, which aggregates the system's total assets.

Impact

By excluding the claimable variable from the calculation of _totalAssets, any transmuter assets available to the contract remain unaccounted for and unused. This can result in suboptimal utilization of the system's resources.

Tools Used

Manual review.

Recommendations

To address this issue:

  1. Include the claimable variable in the calculation of _totalAssets to ensure all relevant assets are accounted for.

  2. Alternatively, if the claimable variable is not necessary, remove it entirely to avoid confusion and redundancy in the code.

Updates

Appeal created

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
player Submitter
6 months ago
inallhonesty Lead Judge
6 months ago
inallhonesty Lead Judge 6 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.