What Is an Example of a Smart Contract Logic Flaw Exploitable by a Flash Loan?
A common flaw is a contract that uses a single, easily manipulated DEX for its price reference, such as a low-liquidity pool. An attacker uses a flash loan to buy a large amount of the asset on that DEX, artificially inflating the price.
The contract then reads this inflated price, allowing the attacker to, for example, borrow an excessive amount of a different asset using the temporarily overvalued collateral. The attacker repays the loan and keeps the borrowed assets.