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

The strategy always assumes a 1:1 ratio between ETH and alETH which will create issues

Summary

In multiple sections of the code, the code treats ETH and alETH as if they are always interchangeable at a 1:1 ratio. However, alETH may trade at a premium or discount relative to actual ETH. This discrepancy will lead to incorrect accounting of total assets.

Vulnerability Details

The strategy handles both ETH and alETH but assumes they have equivalent value in several places:

  • In the balanceDeployed() function:

function balanceDeployed() public view returns (uint256) {
return transmuter.getUnexchangedBalance(address(this)) +
underlying.balanceOf(address(this)) +
asset.balanceOf(address(this));
}
  • In the _harvestAndReport() function:

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

The strategy simply adds ETH and alETH balances together without any price adjustment using oracle prices, which would lead to incorrect total value calculations.

  • In claimAndSwap(), when comparing minimum output:

require(_minOut > _amountClaim, "minOut too low");

In this example, the slippage protection is incufficient as even if _minOut > _amountClaim, the price of alETH might be priced lower than ETH. Which would mean that the actual value swapped will be lower.

Impact

  1. Because of the assumption that WETH and alETH remain at parity, accounting for gains or losses will be inaccurate.

  2. Insufficient slippage protection in swaps:

    • The _minOut > _amountClaim check assumes 1:1 pricing

    • Could allow unfavorable swaps if alETH is trading below ETH

Tools Used

Manual review

Recommendations

Consider using a robust price feed that provides the current market rate between ETH and alETH

Updates

Appeal created

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