What if I told you that you - yes, you - could go and borrow $1M right now?
No KYC, no name, email or phone number.
And you don't even need collateral.
Yes, of course there’s a catch.
This #DeFi instrument is called a Flash Loan - so how does it work? ⚡️ 🧶 👇
1/ A flash loan allows you to borrow money (up to very large amounts) without any collateral
The catch is that you have to return the money in the very same transaction.
Confused? 🤔 Keep reading…
2/ Here’s how a standard database (web2) transaction works. Let’s say @jack is sending $100 to @elonmusk through a regular bank transfer.
2 things must happen when the money is sent. The bank must update:
1. +$100 for Elon 🤑
2. -$100 for Jack 😢
#1 cannot happen without #2.
3/ If #1 happens, but #2 does not, then the entire transaction is rolled back (voided).
Similarly, if you take a flash loan, you must return the borrowed amount in the SAME transaction as where you borrowed it.
You might wonder - why would anyone want to take a flash loan? 🤔
4/
One purpose is for arbitrage opportunities. 🤑
Let’s say you have $1,000 at your disposal.
You see $DAI trading at $1.00 on @uniswap, but it’s trading at $1.01 on @1inch
With your $1,000, you could buy 1,000 $DAI tokens on @uniswap and then sell it on 1inch for $1,010
5/ In this trade, you have profited $10. Minus gas fees.
Not bad…
But you could alternatively use a flash loan to make the same trade with a bigger lever.
Here’s how that would work...
6/
- You borrow $1M from @AaveAave protocol at 0.09% interest
- You buy 1,000,000 DAI tokens for $1M
- You sell 1,000,000 DAI tokens for $1,010,000
- You repay the $1M loan + $900 as interest
7/ Your profit here is $10,000 - $900 = $9,100 USD. Minus gas fees.
$9,100 is slightly better than $10, yeah? 🤯
8/ Now suppose step 3 fails.
Then the entire transaction fails - you lose your gas fees, but that’s it.
It’s a single transaction with multiple steps, not multiple transactions.
9/ There’s also no risk to the lender because they have nothing to lose.
If the return step (4) fails, then the borrow step (1) never went through either.
Flash loans are also used for collateral swaps and liquidations.
10/ It’s slightly hard to wrap your head around, but it’s pretty incredible - learning about flash loans was my aha! moment in #DeFi
These are the kinds of things that are only possible when you have programmable money.
11/ I haven’t personally used this strategy (yet) as I'm not actively tracking any arbitrage opportunities - but I find the concept incredibly fascinating.
I’d love to hear from people who have actually tried this..