The getNFTPrice function in the LendingPool contract fails to implement oracle price staleness validation, allowing outdated NFT prices to be used in critical financial calculations. This could lead to incorrect collateralization ratios and potentially unfair liquidations.
The following function retrieves NFT prices but fails to validate the lastUpdateTimestamp against a maximum acceptable age. This means that prices that could be hours, days, or even weeks old would be considered valid.
This function is used in several critical contexts:
getUserCollateralValue() - For calculating total collateral value
calculateHealthFactor() - For determining liquidation eligibility
withdrawNFT() - For validating collateralization after NFT withdrawal
The vulnerability could lead to:
Incorrect Collateralization:
Users could borrow against overvalued collateral if prices have decreased
System could prevent legitimate withdrawals if prices have increased
Unfair Liquidations:
Users could be liquidated based on outdated low prices
Users could avoid liquidation despite being undercollateralized
Manual code review
Add a staleness check with a configurable maximum age for prices:
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.