The strategyMainnet.sol contract fails to validate that the underlying token returned by the transmuter contract matches the expected WETH address. This missing validation introduces vulnerabilities and risks, such as failed swaps, security exploits, or misconfigurations, leading to potential financial losses.
In the constructor:
The underlying token is assigned as:
The underlyingToken of the transmuter contract determines the underlying token address.
There is no explicit validation to ensure that the underlying token is what the protocol expects (e.g., WETH).
The syntheticToken of the transmuter is validated against _asset:
This ensures the synthetic token in transmuter matches _asset.
However, no similar validation is applied to the underlying token.
The issue exists in the constructor of strategyMainnet.sol:
The underlying token is set directly using the value returned by the transmuter.underlyingToken().
No explicit validation is performed to ensure that this token matches the expected WETH address.
The protocol assumes that the underlying token returned by the transmuter contract is always WETH. However, this assumption is not enforced programmatically, leaving the system vulnerable to misconfiguration of the transmuter contract and potential exploitation by malicious actors using a rogue transmuter contract.
Swaps May Fail or Misbehave. If the underlying is not WETH, swaps on Curve could fail, misroute, or result in significant financial loss due to incorrect token handling.
Failed token transfers because any logic assuming the underlying token is WETH (e.g., swap parameters, pricing assumptions, etc.) will be incorrect.
If transmuter.underlyingToken() points to an unexpected or malicious token, attackers might exploit this by draining funds.
Vscode, Manual analysis
Add a validation step in the constructor to ensure that the underlying token returned by transmuter.underlyingToken() matches the canonical WETH address.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.