The RAACHousePriceOracle
contract updates house prices using a single storage variable lastHouseId
, which gets overwritten if multiple oracle requests are processed concurrently and fulfilled out of order. When the wrong houseId
is used in a fulfillment callback, the price for one house can overwrite the price for another. This leads to incorrect collateral valuations in LendingPool
, allowing for unauthorized or inaccurate borrowing/repayment actions.
In RAACHousePriceOracle
, the _beforeFulfill
function stores the requested house ID in lastHouseId
:
When another request is sent before the first is fulfilled, lastHouseId
gets overwritten by the second request’s ID.
And then the _processResponce
function sets the incorrect pricing related to lastPriceId
:
In LendingPool
, collateral valuation relies on priceOracle.getLatestPrice(tokenId)
. A mismatched or wrong price can either allow borrowers to over-borrow (leading to protocol shortfall) or cause unnecessary liquidations (hurting honest users).
Under/Over-Collateralization
An NFT’s real price might be replaced by another NFT’s price, skewing the user’s health factor. This can systematically undermine the lending system.
Systemic Risk
Because LendingPool
uses the mispriced collateral across borrowing, liquidation, and withdrawal processes, widespread concurrency issues can degrade the entire protocol’s solvency and trust.
Manual Review.
Add the test bellow at the end of the file "test/unit/core/oracles/RAACHousePriceOracle.test.js".
Logs:
The test shows that the House #1
price didn't get updated and price of House #2
is the price of House #1
One possible mitigation in RACCHousePriceOracle
is to pass as input the requestId
in _beforeFulfill
and _processResponse
, and have a mapping to store requestId -> houseId
.
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.