The LendingPool
contract fails to validate the freshness of NFT price feeds when performing critical lending operations. While it retrieves both price and timestamp from RAACHousePrices::getLatestPrice
, it only checks if the price is non-zero, ignoring the lastUpdateTimestamp
. This allows stale prices to be used in critical operations like borrowing, liquidations, and collateral valuations.
The LendingPool::getNFTPrice
function retrieves price data but doesn't validate the timestamp:
This function is used in critical operations that affect the protocol's solvency, particularly:
Oracle updates NFT price:
Price becomes stale but getUserCollateral
still uses it:
Stale prices accepted in critical lending functions:
borrow()
- Could allow borrowing against outdated collateral values
withdrawNFT()
- May permit withdrawals based on stale valuations
initiateLiquidation()
- Could delay/prevent liquidations if using outdated prices
Manual review
Add staleness checks in getNFTPrice
:
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.