How Does a Flash Loan Attack Exploit a Simple Spot Price Oracle?
A flash loan attack involves a malicious actor taking a massive, uncollateralized loan and using it to briefly manipulate the price of an asset on a low-liquidity DEX. If the smart contract uses this single, simple spot price oracle, the manipulated price is fed to the contract.
The attacker then executes a profitable trade (like a liquidation or arbitrage) based on the false price before repaying the loan in the same transaction.