If you've been following DeFi or Ethereum over the past few months, you've likely heard the term "flash loan" mentioned again and again.
This new DeFi primitive has been at the core of a number of economic exploits and arbitrages.
A thread on the basics of flash loans - 👇
Most DeFi loans take place across days, weeks, or even months.
You can deposit Ethereum into Aave, then withdraw stablecoins for yield farming in Yearn, for instance.
On-chain loans have garnered much traction, with total debt outstanding moving toward $2.5 billion.
While popular, DeFi loans are not capital efficient: to account for custodial risk and volatility risk, you need to put up 130-150% of the value of your loan in collateral.
If your collateral slips below the threshold, you're liquidated, resulting in a fee anywhere from 5-13%.
Flash loans are much different than longer-term DeFi loans.
Flash loans are non-custodial, take place over the course of one block, and require no collateralization.
That's to say, the coins you borrow never appear in your wallet.
When taking a flash loan, you can direct the coins to any protocol and function, as long as you pay back the loan + interest fee within the same transaction.
So what the hell? What are flash loans used for?
More often than not, arbitrage.