The FeeConversionKeeper contract implements the IAutomationCompatible interface from Chainlink but introduces a state mutability restriction that violates the Liskov Substitution Principle (LSP). This creates a technical contract incompatibility, though the implementation's behavior aligns with Chainlink's intended design.
In Solidity's type system, state mutability follows a strict hierarchy where pure functions are most restrictive, followed by view functions, and functions without modifiers being least restrictive. This hierarchy directly impacts interface compliance and substitutability of contract implementations.
The implementation introduces a view modifier absent from the interface specification. While this appears to be a simple modifier addition, it fundamentally alters the contract's type guarantees. Any contract interacting with IAutomationCompatible expects to potentially modify state during checkUpkeep calls, but the FeeConversionKeeper implementation prevents this capability through its view restriction.
The complexity of this issue stems from Chainlink's architectural design choices. The checkUpkeep function serves as a simulation mechanism, intended to be called frequently by Chainlink nodes to determine automation timing. This design inherently suggests view behavior would be appropriate, as state modifications during simulation could lead to race conditions and unexpected state changes.
The mismatch between interface specification and implementation creates a situation where:
Type-level guarantees provided by the interface are violated
Integration contracts may fail when attempting state modifications
Runtime behavior, while safer, doesn't match compile-time contracts
The resolution path should align implementation contracts with the underlying architectural intent. The interface should be modified to explicitly declare checkUpkeep as view, reflecting its simulation nature:
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.