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.

What Is the Risk of Using Only DEX Data for an Oracle Price Feed?
What Is a “Flash Loan” and How Does It Relate to Market Manipulation Risks on DEXs?
What Is a ‘Flash Loan Attack’ and How Does It Exploit DEX Protocols?
What Is ‘Slippage’ on a DEX and How Can It Be Exploited?
What Is a Flash Loan and How Does It Enable a Price Feed Attack?
How Does the Concept of ‘Time Preference’ Relate to Paying a Higher Fee or Accepting Slippage?
What Are the Operational Risks Associated with Relying on a Single Exchange’s Data Feed?
What Is the Risk of a “Flash Loan Attack” on a DEX’s Price Feed?

Glossar