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

_harvestAndReport assumes ALETH is 1:1 with ETH

Summary

_harvestAndReport and balanceDeployed gets the totalAssuets by adding the unexchanged balance, the current asset balance and the underlying balance of the contract.

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

The issue is that unexchanged (transmuter.getUnexchangedBalance(address(this))) and asset.balanceOf is in ALETH, whereas the underlying balance is in ETH.

Also, ETH and ALETH is not 1:1 yet (although the ideal case it is supposed to be). The total assets calculated will be slightly different.

For example, if ALETH is worth 0.95WETH, and the contract has 100 ALETH and 100 WETH, the total assets would return 200 when it should be 195.

Impact

Calculation of total assets will be slightly different from actual.

Tools Used

Manual Review

Recommendations

Use an oracle to convert ALETH to WETH price.

Updates

Appeal created

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

balanceDeployed() and _harvestAndReport() add WETH and alETH, but they have different prices

Support

FAQs

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