除非您做好损失全部投资资金的准备,否则请勿投资。 花 2 分钟了解更多我们可能通过链接获得佣金。不构成财务建议。

Flash loans: what they are, what they are used for, and the risk to lenders

A flash loan is a DeFi loan with no collateral that must be borrowed and repaid within a single blockchain transaction; if it is not repaid by the end of that transaction, the whole transaction is reversed as if it never happened. It is a tool for developers and bots doing arbitrage, collateral swaps and liquidations, not a way for a person to borrow money, and it has supplied the capital in many attacks on DeFi protocols.

作者:Dean Fankhauser · 最后审核:2026年11月30日

How a flash loan works

An ordinary crypto loan needs collateral because the lender cannot be sure you will pay it back. A flash loan removes that doubt with code. Everything happens inside one transaction: the protocol sends you the coins, your smart contract does something with them, and the coins plus a fee must be back before the transaction ends. Aave’s documentation puts it simply: if the amount owed is not there, the “transaction reverts” (Aave). The lender never takes a credit risk, because a loan that is not repaid never happened.

  1. Your contract asks a pool, such as Aave or Balancer, for the coins.
  2. The pool sends them and calls your contract back.
  3. Your contract runs its steps: trades, repayments, swaps.
  4. Your contract returns the loan plus any fee to the pool.
  5. If step 4 fails, every step is undone and you lose only the network fee you paid to send the transaction.

The idea is usually credited to Marble Protocol in 2018 (CoinDesk), and Aave made it widely used. Flash loans are written for developers: Morpho describes them as “primarily meant for developers and advanced users” (Morpho). There is no app where you type in an amount and receive a flash loan into your wallet. To borrow for days or months, you need a collateralised loan; see how crypto loans work.

Where flash loans come from, and what they cost

From each protocol’s own documentation, viewed 30 November 2026. Fees are set by each protocol’s governance and can change.
ProviderWhat it offersFee, as documented
Aave v3flashLoan (several assets at once) and flashLoanSimple (one asset, cheaper to run)“Set to 0.05% at deployment and can be changed by governance vote”; waived for approved borrowers (Aave)
Balancer v2Flash loans from its shared vault“Currently there are 0 fees for flash loans” (Balancer)
Uniswap v2Flash swaps: take tokens out of a pool and pay for them at the end of the transactionReturn the tokens plus “a small fee” (Uniswap)
MorphoFlash loans from its lending marketsNo fee stated on its concept page (Morpho)
Sky (formerly Maker)Flash Mint: mint Dai up to a limit set by governance, then burn it in the same transactionSet by governance; not stated on the page (Sky)

The fee is not the main cost. A flash loan bundles many steps into one transaction, so the network fee is high, and the trade only works if the opportunity is still there when the transaction is included in a block. Bots compete for the same opportunities, which is why profitable flash-loan arbitrage is rare for anyone without fast, specialised infrastructure.

What flash loans are used for

Most flash-loan use is routine. Aave’s documentation lists arbitrage “without holding the principal needed for the trade” and liquidating loans “without holding the debt amount”, and Aave uses flash loans in its own features (Aave).

  • Arbitrage. Buy a token where it is cheap and sell it where it is dear, all in one transaction. Chainlink calls this the most common use (Chainlink).
  • Liquidations. Liquidators repay an unhealthy borrower’s debt with borrowed coins, receive the collateral at a discount, sell some of it and repay the flash loan. This keeps lending pools solvent, which protects lenders.
  • Collateral swaps. Change a loan’s collateral, say from ETH to wBTC, without first repaying the loan.
  • Refinancing and closing positions. Move a loan from one protocol to another, or unwind a leveraged position, in one step. DeFi Saver’s recipe tool lists these uses and the flash-loan sources it draws on (DeFi Saver).

Tools such as DeFi Saver let people use these features without writing code. You are still using a smart contract, so the risks of the protocols involved apply.

Flash loan attacks

Flash loans let anyone command millions for a few seconds. That matters when a protocol has a flaw that only pays off at scale, such as a price it reads from a single pool that can be pushed around, or a bug in its own accounting. The flash loan is rarely the flaw itself; it supplies the money to exploit one. Chainalysis counted $403.2 million lost in 41 oracle manipulation attacks in 2022 and noted that the funds are “often sourced through a flash loan” (Chainalysis). Researchers describing flash loans in 2020 analysed two early attacks with returns “beyond 500k%” (Qin et al.).

Amounts as reported at the time. The cause is the protocol’s flaw; the flash loan supplied the capital.
DateProtocolLostWhat went wrong
Feb 2020bZxAbout $350,000The attacker borrowed 10,000 ETH and repaid it in the same transaction to exploit a logic bug (The Block)
May 2021PancakeBunny$45 millionA pricing bug, exploited with flash loans (The Block)
Oct 2021Cream Finance$115 million to $130 millionA large flash loan used to manipulate the value of collateral (The Block)
Apr 2022Beanstalk$182 millionGovernance attack: a flash loan from Aave bought enough votes to pass a malicious proposal (CoinDesk)
Mar 2023Euler FinanceAbout $197 million, all recoveredA function “lacked a health check” (Euler); reported as a flash-loan attack (The Block)
Sep 2025Bunni$8.4 millionA rounding error, exploited with a 3 million USDT flash loan (The Block)

The defence is better design rather than banning flash loans. Chainlink recommends that developers “avoid manipulatable DEX spot prices” and use price feeds drawn from the wider market (Chainlink). Euler’s own account of its exploit traces it to a patch for an earlier bug that “created the vector” for the attack, which is why repeated audits of every change matter.

What this means if you lend into DeFi

You will probably never take a flash loan. But if you deposit into a DeFi pool, flash loans change the risk you carry. A flaw that would once have needed a well-funded attacker can now be exploited by anyone who can write the code. Before you lend into a protocol, look at:

  • Its price feeds. Does it use a market-wide oracle, or the price in a single pool?
  • Its audits and age. How many audits, of which version, and how long has the code held real money?
  • Its record. Has it been exploited, and were lenders made whole?
  • Bad-debt backstops. Does it hold a fund that absorbs losses before lenders do? Is crypto insured? explains what those funds and DeFi cover do.

Our risk methodology scores DeFi platforms on these points, and CeFi vs DeFi sets out how the risks differ from lending through a company.

Bitcompare 实时利率

Best standard USDC DeFi lending rate on 2026年12月1日: 5.89% APY on Fluid, among 7 providers we track.

USDC 出借标准利率排名前 5 的非赞助条目
#平台标准利率As APY
1Fluid5.89% APY5.89% APY
2Maple5.25% APY5.25% APY
3Morpho4.5% APY4.5% APY
4Spark4.45% APY4.45% APY
5Kamino4.2% APY4.2% APY
  • Median standard rate: 4.45% APY (APRs converted with daily compounding) across 7 platforms we track.

Best standard ETH DeFi lending rate on 2026年12月1日: 1.85% APY on Euler Finance, among 10 providers we track.

ETH 出借标准利率排名前 5 的非赞助条目
#平台标准利率As APY
1Euler Finance1.85% APY1.85% APY
2Fluid1.68%—
3Compound V31.58% APR1.59% APY
4Gearbox1.49% APR1.5% APY
5Aave V31.26% APR1.27% APY
  • 共有 10 家平台公布标准利率。由于计算口径不同(APR 或 APY),此处不显示中位数。

仅显示标准利率,与我们利率表采用相同规则:即无需促销、会员等级或锁定期即可获得的利率。利率经常变化,请在决定前查看完整对比。

利率由各平台设定,经常变动且不作保证。标有"Sponsored"的行是付费展示位。不构成财务建议。 我们如何盈利 →

常见问题

What is a flash loan in crypto?

A loan from a DeFi protocol that is borrowed and repaid within one blockchain transaction, with no collateral. If it is not repaid by the end of the transaction, the whole transaction is reversed.

Why don’t flash loans need collateral?

Because the lender cannot lose. Repayment is checked before the transaction finishes, and if the coins are not back, the blockchain undoes every step, including the loan.

Can I take out a flash loan to buy something?

No. The coins must come back within the same transaction, so you cannot keep them or spend them on anything that is not repaid in that transaction. To borrow for longer you need a collateralised crypto loan.

How much does a flash loan cost?

It depends on the provider and on governance votes. Aave’s documentation says its fee was 0.05% when deployed and can be changed by governance vote. Balancer v2’s documentation says it charges no fee. You also pay the network fee for what is usually a large transaction.

Are flash loans legal?

Using a flash loan for arbitrage or liquidations is ordinary DeFi activity. We found no regulator guidance specific to flash loans. Using one to exploit a protocol has led to criminal charges, depending on the facts.

Can you make money with flash loans?

Bots do, through arbitrage and liquidations, but they compete with each other for the same opportunities. For most people, a failed attempt costs the network fee and a successful one is hard to find.

What is a flash loan attack?

An exploit where an attacker uses borrowed millions to take advantage of a flaw in a protocol, such as a manipulable price feed or an accounting bug, then repays the loan and keeps the profit, all in one transaction.

Are flash loans a risk to my deposits?

Indirectly. A flash loan cannot take your deposit by itself, but it gives attackers the capital to exploit any flaw in the protocol you lent to. Check how a protocol prices collateral, how it has been audited and whether it has a bad-debt fund.

风险提示

通过加密货币(包括稳定币)赚取收益不是银行存款。它不受美国 FDIC 或英国 FSCS 等存款保险保障,你可能损失部分或全部资金。本指南仅为一般信息,不构成财务建议。

阅读我们关于加密货币收益风险的完整指南

比较当前利率

来源

  1. Flash loans (Aave v3 guide) — Aave
  2. The DeFi flash loan attack that changed everything (27 February 2020) — CoinDesk
  3. Flash loans — Balancer (v2 docs)
  4. Flash swaps (v2) — Uniswap
  5. Flash loans — Morpho
  6. Dai Flash Mint — Sky
  7. Flash loans explained (updated 24 May 2023) — Chainlink
  8. What are flash loans? (Recipe Creator) — DeFi Saver
  9. Oracle manipulation attacks are rising (7 March 2023) — Chainalysis
  10. Attacking the DeFi ecosystem with flash loans for fun and profit — Qin, Zhou, Livshits and Gervais (arXiv)
  11. bZx exploit: how an attacker made $350k in a single transaction (17 February 2020) — The Block
  12. PancakeBunny exploited, $45 million lost (20 May 2021) — The Block
  13. Cream Finance hacked (27 October 2021) — The Block
  14. Attacker drains $182M from Beanstalk (17 April 2022) — CoinDesk
  15. War and peace: behind the scenes of Euler’s exploit recovery (10 January 2024) — Euler Finance
  16. Euler Finance flash loan attacked for an estimated $197 million (13 March 2023) — The Block
  17. Bunni exploited through a rounding error (4 September 2025) — The Block