Crypto glossary

Flash loan

Definition

A flash loan is an uncollateralized DeFi loan that must be borrowed and repaid within the same blockchain transaction, or the whole operation is reversed.

A flash loan lets anyone borrow large sums from a lending pool with no collateral, on one condition: the money, plus a small fee, must come back before the transaction ends. If it does not, the smart contract makes the entire transaction fail, as if it never happened, so the lender takes no credit risk.

Aave helped popularise the feature, and traders use it for arbitrage between DEXs, to refinance or close loans in one step, or to swap collateral without first repaying debt. The same tool has also powered many DeFi exploits: attackers borrow huge amounts to move a manipulable price oracle or to buy governance votes, as in the Beanstalk attack of 2022.

Flash loans do not create vulnerabilities by themselves; they remove the need for capital to exploit existing ones. Protocols defend against them with robust oracles, time-weighted prices and governance delays.

Example

A trader borrows 1,000,000 USDC in a flash loan, buys a token on one DEX, sells it on another for a 0.3% gain and repays the loan plus fee, all in a single transaction.

Related terms

Latest articles on Flash loan