DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: low
Invalid

Reliance on External Contracts Without Interface Validation

Description

The StrategyOp contract interacts with external contracts like ITransmuter and IVeloRouter based on assumed interfaces. If these external contracts change their interfaces or implementations, it could lead to unexpected behaviors or failures.

Impact

  • Compatibility Issues: Changes in external contracts' interfaces may cause the strategy contract to malfunction.

  • Security Risks: If external contracts are upgraded to malicious versions, it could pose security threats.

Recommendation

  • Implement Interface Checks: Use mechanisms to ensure that the external contracts conform to the expected interfaces.

    constructor(
    address _asset,
    address _transmuter,
    string memory _name
    ) BaseStrategy(_asset, _name) {
    transmuter = ITransmuter(_transmuter);
    require(transmuter.syntheticToken() == _asset, "Asset does not match transmuter synthetic token");
    // Add interface validation
    require(transmuter.supportsInterface(type(ITransmuter).interfaceId), "Invalid Transmuter interface");
    // ...
    }
Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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