An average crypto loan would look something like this:
- Simon needs a certain amount of tokens.
- Simon finds a pool, he likes and borrows some tokens from it.
- Simon can not simply take the tokens - he must leave a deposit, to ensure the tokens are returned to the owner.
However, Simon doesn’t like depositing his tokens because the deposit would usually be greater than the amount he wants to borrow. Simon searches for a solution and there it is - flash loans. 🤩
What is a flash loan?
A flash loan is a kind of loan, where the borrower doesn’t deposit anything - borrowing, using and returning the tokens are all united into a single operation.
Let’s look at an example
Liam owns a nice car and wants to attract Lisa’s attention. Lisa wants to post an instagram story to make all her friends jealous. She notices Liam and his car and goes for a ride with him. As a result, Lisa gets lots of likes and replies to her story and Liam gets Lisa’s attention. Allowing Lisa into his car is the tax, Liam pays for her attention, whilst the likes and replies are Lisa’s profit. 👍
Flash loans work in pretty much the same way: the user borrows the required number of tokens from the liquidity pool, uses them and returns them back afterwards - all in one transaction. 🎱
Lending protocol would always require the borrower to make a deposit that exceeds the loan amount. This guarantees that the lender will not lose funds if the borrower does not repay the debt. 🤝
In flash loans, there is no need for collateral, since according to the terms and conditions of operation, the borrower is guaranteed to return the funds and interest. This works because the loan can only be used when all the terms of the contract are met. 🔐
Let’s forget about Liam, Lisa and the car - we are discussing crypto, not getting likes on insta stories. 😌
Say there is a guy named Bob and Bob is a full-time trader. He notices that the TEZ/kUSD pool rate is 1.4$ on Quipuswap and 1.5$ on Vortex, but he doesn’t have any kUSD to buy TEZ and sell it afterwards - flash-loans come handy now. 😉
Bob creates a smart-contract, that:
- Borrows a 1000 kUSD from the flash-loan pool.
- Buys 710 TEZ on Quipuswap for 1000 kUSD.
- Sells the 710 TEZ for 1050 kUSD.
- Returns 1000.5 kUSD to the pool.
Bob is now by a fraction closer to becoming a billionaire and everyone is happy. But what if there isn’t enough liquidity or the rates decrease after Bob borrows kUSD? 🧐
Well, he will simply not be able to borrow anything, because once again the whole cycle is executed in a single operation and the flash-loan pool would just restrict Bob’s transaction from being written into a block if anything doesn’t go as planned. Don’t worry about Bob, though - he won’t lose more than a dollar, because his only debt is just the commission now. 🤟
How can you use flash loans?
The loan has to be used within a single transaction, since reducing the possibilities of use to four cases:
- Arbitrage on DEX
- Synthetic asset or an algorithmic stablecoin storage self-destruction
- Creating a leveraged position using a synthetic asset or a stablecoin
- Changing the collateral currency in the vault
To use or not to use?
The answer will differ between users and their needs, but most traders and investors are likely to use flash loans, due to how fast and undemanding they are. Developers might, however, abstain from using such kinds of technology, since flash loans are abused or hacked quite often. ⚖️
Stay tuned 📻