Submitted by WatchPug
https://github.com/code-423n4/2022-02-anchor/blob/7af353e3234837979a19ddc8093dc9ad3c63ab6b/contracts/money-market-contracts/contracts/oracle/src/contract.rs#L106-L113
The implementation only takes two attributes: asset and price. And the last_updated_time of the record will always be set to the current block.time.
This makes it possible for the price feeds to be disrupted when the network is congested, or the endpoint is down for a while, or the feeder bot handled the message queue inappropriately, as a result, the transactions with stale prices get accepted as fresh prices.
Since the price feeds are essential to the protocol, that can result in users positions being liquidated wrongfully and case fund loss to users.
Given:
Change to:
bitn8 (Anchor) disputed and commented:
Alex the Entreprenerd (triage) commented:
Albert Chon (judge) commented:
