The RAACHousePriceOracle
that inherits from BaseChainlinkFunctionsOracle
contracts currently does not support multiple simultaneous requests. The system is designed to handle only one request at a time, as evidenced by the use of a single s_lastRequestId
variable to track the most recent request.
Since RAACHousePriceOracle
relies on lastHouseId
to associate oracle responses with specific house price updates, concurrent requests could lead to mismatched or incorrect price updates.
This limitation introduces data inconsistencies and race conditions, potentially causing house prices to be assigned to the wrong properties if multiple requests are made before a response is received.
Affected Contracts
The system currently assumes that only one oracle request will be active at any given time. This is evident in the BaseChainlinkFunctionsOracle
contract, where the s_lastRequestId
variable is used to track the most recent request. However, if multiple requests are sent before the first one is fulfilled, there is no mechanism to differentiate between responses.
Additionally, the RAACHousePriceOracle
contract relies on lastHouseId
to associate responses with house price updates. Since this value is overwritten every time a new request is sent, multiple pending requests can cause incorrect price assignments, leading to data inconsistencies.
The lack of per-request tracking means that responses from Chainlink Functions may be misapplied, potentially setting house prices for the wrong properties. This could be exploited if an attacker floods the system with multiple requests, creating unpredictable behavior in how house prices are recorded.
The absence of support for multiple concurrent oracle requests introduces a critical data integrity issue. Since responses are not linked to their respective requests, incorrect house prices may be recorded, leading to inaccurate valuations. This can result in financial losses for users relying on these prices for lending, borrowing, or investment decisions.
Manual review
Store Requests in a Mapping Instead of a Single Variable
Replace s_lastRequestId
with a mapping to track multiple requests:
Modify sendRequest to store the house ID against the request ID
Verify Request ID in fulfillRequest
Update _processResponse to use the correct house ID:
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.