Stale Price Vulnerability
A stale price vulnerability exists when a smart contract uses outdated market data to execute financial decisions, such as liquidating a position. This happens when the oracle responsible for updating the price fails to function correctly or the refresh rate is insufficient to keep up with rapid market movements.
If a borrower notices that the on-chain price is lower than the actual market price, they might be able to withdraw collateral before the system catches up. Conversely, if the price is higher than the market, they might be unfairly liquidated.
This vulnerability can be exploited by sophisticated actors who monitor the lag between off-chain and on-chain prices. Protocols mitigate this by implementing checks that invalidate trades if the data is deemed too old.