What are Flash Loans?

by | Aug 10, 2021

Disclaimer: Posts on the HyperTrader blog and associated HyperLinq websites are for educational and informational purposes only. These posts should not be taken as financial advice, nor are they meant to be viewed as trading advice. HyperLinq Inc. or the authors take no responsibility for any damages or losses.

When it comes to understanding various features and innovations of decentralized finance, flash loans sound the most complicated one. First and foremost, we’ve heard of many flash loan attacks that resulted in millions of dollars stolen from various DeFi protocols. In February 2020, a lending protocol bZX became the victim of two flash loan attacks where the hacked stole a total sum of $1 million dollars from the protocol.

Besides all these hacking incidences, the question that troubles most of the DeFi newbies is – why do we need flash loans in the first place and what are the use-cases? So, today, we’ll delve into the concept of flash loans and how to do a flash loan on Aave. In this next post in this series, we’ll understand the use cases of flash loans.

What is a Flash Loan?

First introduced in the year 2018 by a DeFi open-source bank Marble, flash loans are one of the most innovative solutions pioneered by the DeFi ecosystem. A flash loan, as the name suggests, is an instant loan without the need for any collateral. 

As we’ve understood earlier, there are a range of DeFi projects known as lending and borrowing protocols that allow investors to borrow money against collateral. For example, a user can borrow stablecoins such as DAI or USDC by providing collateral of Ethereum from a lending protocol such as Compound or Maker.

Flash loans, unlike regular loans, don’t require any collateral. But here’s a catch, all flash loans should be repaid back to the protocol in the same block. Hence, if the borrower is unable to repay the capital, the transaction is reversed automatically. 

Now, let’s understand it from a traditional banking perspective. For example, if you were to transfer an amount from your bank account to your friend’s bank account. In this scenario, the bank will deduct the amount from your account and credit it to your friend’s account. In this case, both of these conditions should be met in the same transaction. If the bank deducts the money from your account and doesn’t credit your friend’s account or vice-versa, the transaction is reversed. 

Similarly, when it comes to flash loans, the borrower instantly repays the loan instead of providing collateral. Another key point is – the capital is borrowed and repaid in a single transaction with both of these conditions programmed in the smart contract. Failing any of these conditions, the smart contract automatically reverses the transaction, meaning it never happened in the first place.

Therefore, in theory, flash loans offer an innovative solution of borrowing and repaying money without any risk of not repaying as all of it needs to be executed in the same translation. However, there are other risks such as price feed oracle being manipulated or any smart-contract bugs. 

Flash Loan Providers

As of now, Aave and dYdX are some of the biggest lending protocols and exchanges that allow users to leverage flash loans to instantly make a profit in a single transaction through arbitrage or self-liquidation. It’s also worth noting that executing flash loans from the Aave protocol also includes a fee of 0.09% of the borrowed amount. This fee is distributed among the protocol depositors that provide the funds and integrators that facilitate the flash loan API on Aave.

How to do Flash Loans on Aave?

If you’re interested in checking out the working of flash loan on Aave and want to try it, here’s how you can do it. Although flash loans are majorly for developers because it requires a basic knowledge of smart contract coding. But, there’s a shortcut to it so anyone can do a flash loan without coding knowledge.

How to do a flash loan without coding?

Furucombo is a project that allows users to drag and drop multiple combinations of DeFi protocols into cubes and execute them all together in a single transaction. Sounds like a flash loan, right?

Furocombo offers two modes  – Explore mode and Combo mode. Thus allowing users to browse and apply various DeFi strategies to maximize their profits. Check out the Furcombo app and experience it yourself. That’s all for today.

In this next blog post in this series, we’ll understand the use cases of flash loans and why do we need such a solution in the first place.

Head of Content Marketing @ HyperLinq. His love for Chai and mountains precedes everything. Often wonders about things like, "why $1 earned through leverage feels 100x better than $1 earned selling your time?"
Head of Content Marketing @ HyperLinq. His love for Chai and mountains precedes everything. Often wonders about things like, "why $1 earned through leverage feels 100x better than $1 earned selling your time?"

Understanding Impermanent Loss

A layman’s guide to understanding and calculating impermanent loss in DeFi?

A Guide to Elastic Supply Tokens

What are elastic supply tokens? Let’s find out.

Announcement: Now Trade on Bitvavo with HyperTrader

Starting today, all Bitvavo users will be able to trade reliably and seamlessly with HyperTrader.

What is Crypto Lending?

A layman’s guide to understanding crypto lending.

HyperTrader to Support Trading on Bybit Spot

HyperTrader to Support Trading on Bybit Spot

Understanding Crypto Synthetic Assets

Understanding the concept of synthetic/mirrored tokens.

Announcement: Trade on FTX Global & US Spot with HyperTrader

Now trade on FTX Global Spot & US Spot with HyperTrader.

Blockchain Scaling Solutions Part 3: Understanding Plasma

Plasma: Ethereum scaling solution that never really scaled.

Now Trade on Gate.io with HyperTrader

Hello Gate.io traders, welcome to the world of no-stress crypto trading. We’re happy to announce that starting today, Gate.io users will be able to trade on HyperTrader. 🎊🎉🥳

A Guide to Hard Forks & Soft Forks in Blockchain

A Layman’s guide to understanding hard forks and soft forks in a blockchain network.

Understanding Impermanent Loss

A layman’s guide to understanding and calculating impermanent loss in DeFi?

A Guide to Elastic Supply Tokens

What are elastic supply tokens? Let’s find out.

Announcement: Now Trade on Bitvavo with HyperTrader

Starting today, all Bitvavo users will be able to trade reliably and seamlessly with HyperTrader.

What is Crypto Lending?

A layman’s guide to understanding crypto lending.

HyperTrader to Support Trading on Bybit Spot

HyperTrader to Support Trading on Bybit Spot

Understanding Crypto Synthetic Assets

Understanding the concept of synthetic/mirrored tokens.

Announcement: Trade on FTX Global & US Spot with HyperTrader

Now trade on FTX Global Spot & US Spot with HyperTrader.

Blockchain Scaling Solutions Part 3: Understanding Plasma

Plasma: Ethereum scaling solution that never really scaled.

Now Trade on Gate.io with HyperTrader

Hello Gate.io traders, welcome to the world of no-stress crypto trading. We’re happy to announce that starting today, Gate.io users will be able to trade on HyperTrader. 🎊🎉🥳

A Guide to Hard Forks & Soft Forks in Blockchain

A Layman’s guide to understanding hard forks and soft forks in a blockchain network.

%d bloggers like this: