Flash Loans: Ethereum Can Make You Rich Under 15 Seconds
Even before Flash Loans were a thing, Ethereum was undeniably the most prominent public blockchain to deploy and operate autonomous smart-contracts, decentralized web3-based applications. It even offers a toolset of decentralized finance (DeFi) instruments that make traditional blockchain-powered economic systems look as outdated as banks.
What’s more to it, is a new protocol dubbed “Flash Loan” that allows sharp-eyed programmers to utilize a loan, with literally 0 collateral, instantly spend/utilize the loan, which is obviously in Ethereum terms, make a profit, and repay the loan, all in one single transaction.
Sounds crazy right? A guy who made $360,000 worth of ETH using DEXs, and DeFi tools such as Fulcrum, Compound, DyDx, and Uniswap would disagree.
Ethereum Flash Loans in A Nutshell
So, basically, it is all part of the DeFi ecosystem, a nowadays standalone market that addresses for over $1bn USD in market capitalization. DeFi Pulse is the leading metrics portal for the DeFi ecosystem, and similar to BTC’s dominance in the public cryptocurrency market, Maker DAO is the dominant species in the Decentralized Finance scene.
The same way blockchain-powered exchange markets got rid of banks and OTC desks, DeFi got rid of cryptocurrency exchange markets introducing a series of protocols under which users could exchange funds, and even issue loans in a direct wallet to wallet fashion.
Maker’s Oasis, Compound, and DyDx are some of the most popular lending platforms, that most of the time would require some sort of collateral in terms of ETH or in Maker’s case even BAT, and there are no short-term limitations on who soon the funds should be repaid.
Now what happens with Flash Loans is essentially an exploit of smart-contracts although it is 100% legit if you know what you’re doing.
An Ethereum transaction is usually packed in a block that contains various other transactions, and/or functions and edits to existing smart contracts. A flash loan is eligible only if it’s issued and repaid in one single block, which means under 15 seconds.
Now, how the heck am I gonna do that? You don’t. It’s not a loan you take and then you have to think about how to utilize it, where to invest, when and how to repay. Instead, all of the above must be predetermined and submitted under one single block, which again can contain a series of smart contracts, transactions, and other blockchain functions.
Put simply, flash loans require some serious coding skills and obviously a good understanding of the DeFi ecosystem and the broader cryptocurrency market.
Read More: Blockchain Finance: What To Expect In 2020
Making $360,000 worth of ETH in one block
The interesting part is that if the loan is not paid back in the same block it was issued at, the issuance automatically cancels itself, and nothing really happens. Except you lose some gas fees in your attempt to utilize the loan in the most optimized scenario.
If your math does make sense to the consensus and you can actually utilize the loan to make some profit, the loan will be paid back and you’re left with the profit.
To better understand this, we take a look at the block that made one coder richer by $360,000 who managed to utilize a flash loan service in perfection.
So, this guy basically got a flash loan of 10,000 ETH (worth about $3mn at that time) from DyDx. He then programmed to send over half of them to Compound and the remaining to bZx. While on Compound his contract borrowed 112 Wrapped Bitcoin (WBTC), while the bZx funds shorted 112 WBTC.
The Compound WBTC was sent to Uniswap, a web3 based DEX and sold for a lower price, but he managed to make a profit from his short position, which not only covered the loan but also made him a profit of over $350k.
Sounds like something you could do right? Well, keep in mind that all that was programmed to happen in one single set of transactions that took no more than 15 seconds to perform. If any of the steps he took was not well planned and foreseen the loan would never be confirmed in the first place and he would just lose some $8 USD that fuelled the chain of transactions.