SC07:2025 - Flash Loan Attacks
Description:
Flash loan attacks exploit the ability to borrow large sums of funds without collateral within a single transaction. These attacks leverage the atomic nature of blockchain transactions, where all operations must succeed or fail together. By combining flash loans with other vulnerabilities like oracle manipulation, reentrancy, or faulty logic, attackers can manipulate contract behavior and drain funds.
Examples of Flash Loan Exploits:
- Oracle Manipulation: Using borrowed funds to skew price oracles, triggering under-collateralized liquidations.
- Liquidity Pool Draining: Leveraging flash loans to remove liquidity or exploit poorly designed AMM mechanics.
- Arbitrage Exploits: Exploiting price discrepancies across platforms by manipulating liquidity.
Impact:
- Loss of Funds: Exploiters can drain protocol reserves or manipulate collateralized loans to steal assets.
- Market Disruptions: Temporary price manipulation or liquidity depletion affecting users and platforms.
- Ecosystem Damage: Loss of trust in protocols, resulting in reduced user adoption and financial impact.
- Avoid reliance on flash loans in critical logic: Restrict sensitive functions to operate only within validated and predictable conditions.
- Robust Oracle Design: Use time-weighted average prices (TWAP) or decentralized oracles resistant to manipulation.
- Comprehensive Testing: Include tests simulating flash loan scenarios and edge cases.
- Access Control: Limit access to critical functions to prevent unauthorized or malicious transactions.
Examples of Flash Loan Exploits:
- UwUlend Hack: A Comprehensive Hack Analysis
- Doughfina Hack: A Comprehensive Hack Analysis