BaseChainlinkFunctionsOracle::fulfillRequest
function contains critical flaws in its error handling and state management. The function can revert under certain conditions, which is problematic since Chainlink Functions DON does not retry failed fulfillments. Additionally, the function lacks proper request ID validation and event emissions for tracking state changes.
Reversion on Empty Response:
The function reverts if there's no error but an empty response, which can lead to permanent state lock.
Missing Request ID Validation:
The function fails to verify that the incoming requestId matches s_lastRequestId, potentially processing responses from unexpected requests.
Unsafe External Call:
The call to _processResponse lacks error handling, which could cause the entire fulfillment to revert.
Missing Event Emissions:
The contract lacks events for tracking response fulfillment and error states, reducing transparency and making it difficult to monitor the contract's state changes off-chain.
Also refer to Cyfrins report on this issue with fulfillRequest
Complete DoS of the oracle functionality if a fulfillment reverts, as s_lastRequestId will not be reset
Processing of invalid or unexpected responses due to missing request ID validation
Permanent state lock requiring manual intervention
Limited ability to monitor and debug issues due to lack of event emissions
Manual Review
Implement Non-Reverting Error Handling & State Resetting:
Add Required Events:
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.