Flash loans on Aave are uncollateralised loans offered by the Aave lending protocol that must be borrowed and repaid, with a fee, within one blockchain transaction. If the borrowed funds and the fee are not back in the protocol by the end of that transaction, the network reverses every step, so the lending pool never loses its money. Aave introduced the feature when its first version launched in January 2020 and it has been part of every version since.
Aave is one of the largest lending markets in decentralized finance, running on the Ethereum blockchain and several Ethereum-compatible blockchains. Its flash loans are a building block that developers plug into their own smart contracts. This entry focuses on how Aave's product works; the most common trading use is described in Flash Loan Arbitrage.
Flash loans on Aave in plain terms
Think of a hardware shop that lends out a ladder only if you use it at the counter and hand it back before you leave the shop. Because you never take it out of the door, the shop does not need your deposit or your name. It charges a small fee for each use.
Aave's pools work like that shop. A program can borrow millions of dollars' worth of tokens, use them for something in the same moment, and give them back with a fee. The blockchain checks the till at the end. If the tokens are missing, it rolls back everything that happened, so the borrower ends up exactly where it started, minus the network fee. People who deposit into the pool earn part of the fee, and the pool is never left short.
How Aave flash loans work
A flash loan is requested by a contract, not by a person clicking a button. The sequence, as described in Aave's developer documentation for version 3, is:
- The borrower's contract calls the Aave pool and asks for one or more assets.
- The pool sends the assets to the borrower's contract.
- The pool calls a function on the borrower's contract named
executeOperation, where the borrower's own logic runs: swaps, repayments, collateral moves or anything else. - When that logic finishes, the pool pulls back the amount lent plus the premium, which the borrower must have approved.
- If the pull fails, the entire transaction reverts.
Aave version 3 offers two functions. flashLoanSimple borrows a single asset and uses less gas. flashLoan can borrow several assets at once and also lets the borrower, instead of repaying, keep the funds as an ordinary variable-rate debt position, provided it has enough collateral or has been granted credit by another user.
Fees and who receives them
Aave charges a premium on every flash loan. In version 3 the default premium is 0.05% of the amount borrowed, and Aave's governance can change it; earlier versions charged 0.09%. The fee formula is:
where is the amount borrowed and is the premium rate as a decimal. Borrowing 2,000,000 USDC at 0.05% therefore costs USDC, plus the network gas fee.
The premium is split between the depositors who supplied the pool's liquidity and the protocol treasury, with the treasury's share set by a separate parameter. Addresses that governance approves as "flash borrowers" can borrow through the multi-asset function without paying the premium. All of these settings are decided through Aave's on-chain governance process, in which holders of the AAVE token vote.
What flash loans on Aave are used for
- Arbitrage. Traders borrow to buy a token where it is cheap and sell where it is dear across decentralized exchanges, repaying in the same transaction.
- Liquidations. When a borrower's position becomes unsafe, liquidators can flash-borrow the debt asset, repay the loan, receive the discounted collateral and sell it, carrying out a forced liquidation without their own capital.
- Collateral swaps. A user can replace one collateral asset with another, for example ETH with a stablecoin, by borrowing, repaying, withdrawing and re-depositing in one step.
- Refinancing. Debt can be moved from another lender, such as Compound, to Aave (or the reverse) when interest rates differ, without first finding cash to close the old loan.
- Self-liquidation and deleveraging. Holders of a leveraged position can unwind it in one transaction rather than in many manual steps.
Risks and limits
For the Aave pool itself, the design keeps credit risk close to zero, because a loan that is not repaid never happens. The wider risks lie elsewhere. Flash loans let anyone briefly control large sums, and attackers have used flash loans from Aave and other lenders to manipulate prices or votes on weaker protocols, a form of market manipulation that has cost DeFi projects hundreds of millions of dollars. The weakness in those cases was the target's code or price feed rather than the flash loan.
Borrowers carry their own risks. A bug in their contract can lose funds held by it, a failed transaction still costs gas, and fast-moving markets can turn an expected profit into a revert. Flash loans also require programming skill, so they are mostly used by developers, trading firms and DeFi tools that wrap them in user interfaces. Like other uncollateralised loans in crypto, they sit outside traditional lending rules, and how regulators would treat them under cryptocurrency regulation has not been settled in most countries. Aave's own contracts and parameters are public, and changes are announced through its governance forum.