LendingPool does not check the timestamp returned by RAACHousePrices#getLatestPrice
.
RAACHousePrices has only global lastUpdateTimestamp
, and does not provide a way to determine if individual _tokenIds' price is fresh or not.
To determine the price of NFT collateral, LendingPool uses getLatestPrice
The purpose of lastUpdateTimestamp
is to make sure the price is not stale (which is utilized by LendingPool for calculating the value of NFT collateral).
However, each time price of any tokenId is updated, lastUpdateTimestamp
is updated. Therefore, prices of all tokens except the last updated one could be stale, but their price will still be considered fresh by the LendingPool.
Moreover, lastUpdateTimestamp is never validated in getNFTprice, therefore stale prices can be accepted even if the issue with lastUpdateTimestamp
is fixed.
Old price can be consumed for NFT collateral calculation.
LendingPool#getNFTPrice should validate that returned timestamp from getLatestPrice
is not too old.
In RAACHousePrices, lastUpdateTimestamp
should be a tokenId => timestamp mapping.
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.