The getNFTPrice()
function retrieves the latest price of an NFT using an external price oracle. However, it does not check if the price is stale, which means outdated prices can be used for calculations, leading to inaccurate collateral valuations.
The function does not check whether lastUpdateTimestamp
is recent. If the oracle stops updating prices or experiences delays, the function might return outdated NFT prices.
This can result in incorrect collateral valuations, leading to liquidations based on outdated prices or allowing undercollateralized loans.
Users may be liquidated unfairly if the oracle price is outdated.
Borrowers can take loans with insufficient collateral if the price was higher when last updated.
Manual Review
The function should validate that the price is recent by comparing lastUpdateTimestamp
with block.timestamp
.
Introduce a maximum price age (staleThreshold
) to define when a price is considered outdated.
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.