The getNFTPrice
function in the LendingPool
contract retrieves the latest price and timestamp of an NFT from the price oracle but does not validate whether the price is stale. If the lastUpdateTimestamp
is significantly behind the current block timestamp, the price could be outdated, leading to incorrect NFT valuation. This vulnerability can result in incorrect borrowing, liquidation, and collateralization calculations, potentially compromising the integrity of the lending protocol.
The current getNFTPrice
function retrieves the price and timestamp from the oracle but does not check if the timestamp is recent enough:
Stale prices can lead to overvaluation or undervaluation of NFT collateral, affecting borrowing limits and liquidation thresholds. Malicious users could exploit stale prices to borrow more than their collateral is worth or avoid liquidation when their collateral value has dropped. Incorrect valuations can destabilize the protocol, leading to financial losses for lenders and other participants.
The impact is High, the likelihood is Low, so the severity is Medium.
Maunal Review
To mitigate this issue, we can introduce a maximum allowed age for the price data. If the lastUpdateTimestamp
is older than this threshold, the function should revert, indicating that the price data is stale.
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.