Flash Loans: The Most Enchanting Block in the DeFi Playground

Li Hua
2020-12-15 12:26:31
Collection
Flash loans are a torrent that wipes out inequalities.

This article was first published on November 26, 2020, Mechanical Clock, by Li Hua

Acknowledgments: Gao Jin, YFII volunteer; Seb, InstaDApp community manager

In my eyes, flash loans are the most magical building block in the DeFi amusement park. However, their charm has not been fully realized due to their frequent association with hacking attacks and the lack of sufficient applications based on them.

Therefore, I attempted to write this article, starting from small use cases of flash loans to abstract some of their possible meanings. However, elevating to meaning may seem pretentious, so please consider this article as a personal perspective. I also thank Gao Jin from the YFII community and Seb from the InstaDApp community for their interviews, providing their knowledge and insights on flash loans.

1. Flash Loans are a Flood that Erases Inequities

When tokens have different prices on different DEXs, flash loans can be used for arbitrage, and the process is simple: borrow a flash loan, use the funds to buy tokens on the DEX with the lower price, then sell the purchased tokens on the DEX with the higher price, and finally repay the flash loan with the proceeds from the sale. As long as the price difference between buying and selling tokens exceeds the sum of the flash loan fees and gas costs, arbitrage can be completed; meanwhile, the price differences between different DEXs are "flattened."

When liquidation is triggered, if the liquidation price differs from the market price, flash loans can be used for liquidation. The process is as follows: borrow a flash loan, acquire collateral at the liquidation price, sell the collateral at the market price, and finally repay the flash loan with the proceeds from selling the collateral. Generally, liquidation yields may be around 3% to 5%, while the flash loan fees are 0.3% on Uniswap V2, 0.09% on Aave, and 2 wei on dYdX.

Both arbitrage and liquidation involve price differences in spatial dimensions, while futures involve price differences in temporal dimensions, and flash loans can also be applied here.

For example, using a flash loan to go long on ETH: borrow DAI via a flash loan, then use DAI to purchase ETH on a DEX, subsequently deposit ETH (the ETH purchased with DAI plus a small portion of the user's own ETH) into Compound to borrow DAI, and finally repay the flash loan with the borrowed DAI.

The above are just a few examples of price "inequities." Without flash loans, these inequities may not be efficiently addressed due to costs and risks.

However, with flash loans, the low cost but high efficiency, the large amount of usable funds but low risk create an unprecedented asymmetrical relationship (perhaps we can say this relationship does not conform to the laws of the physical world). Under this premise, any form of price inequity is almost a deterministic opportunity.

Flash loans are like a flood of funds that can erase inequities, and the key point is that anyone can summon them effortlessly. The DeFi world with flash loans is flat.

If we extend this idea, price represents information, and flash loans erasing price inequities may imply that in the DeFi world, whenever new information emerges, it will be transmitted to every participant at the speed of flash loans, allowing participants to make decisions based on the new information, and their decision-making information will also be transmitted at the speed of flash loans.

This will lead to a system where information is transmitted quickly and thoroughly, and the greatest benefit of such a system may be its efficiency. Additionally, the rapid error-correcting ability of this system can also reduce the accumulation of systemic risks.

2. Flash Loans Make Money Cheap, What Becomes Expensive is Strategy

Flash loan money will be cheap, and the amount of funds that can be called upon via flash loans will be enormous. There are two main reasons for this outcome:

First, zero risk. The biggest risk faced by traditional lending is default risk, but this risk does not exist for flash loans: lenders never have to worry about borrowers not repaying the money. From the perspective of fund security, lenders in flash loans face zero risk.

Second, part-time use. On-chain assets can serve their original purpose while also being part of the flash loan fund pool because, from the perspective of other operations on-chain, the funds in flash loans are always in an unoccupied state and always available.

An extreme example of part-time use is embedding flash loan functionality directly into ERC20 tokens, meaning that all assets of the token can naturally be borrowed via flash loans.

One perspective on flash loans is that the funds used for flash loans do not have an opportunity cost; using funds for flash loans does not cause that portion of funds to lose other opportunities. This should be the same thing as what is expressed by "part-time use."

For the reasons mentioned above, competition in the flash loan market may lead to future flash loan fees approaching zero, with available funds approaching infinity.

Outside the flash loan market, there is an even more extreme product called flash minting: assets can be minted out of thin air through flash minting, as much as you want, as long as you destroy all the minted assets at the end of this atomic transaction. Think about the funding costs and amounts in this scenario.

If flash loans make money no longer expensive, what situation will arise? Perhaps we will decompose and abstract on-chain financial activities into two major categories: one that cannot use flash loan funds, i.e., capital-occupying, and one that can use flash loan funds, i.e., capital-using. (Note: This classification is not accurately named; it is just used in this article to distinguish two different ways of capital functioning.)

The operational model of capital-occupying may be similar to traditional models, where capital occupies a core position; however, the operational model of capital-using may be entirely different from traditional models, as the source of capital is easily accessible and cheap flash loans, making capital less important to the model.

When capital is no longer expensive, what becomes valuable is strategy. Good strategies occupy a core position, benefiting both those who propose strategies and those who invest in strategies; returns will flow to them rather than to the capital driving the strategy's operation; and returns flowing to strategies will encourage the emergence and development of more good strategies, which is meaningful for the evolution of the entire ecosystem.

When capital is no longer expensive, the design logic of financial products also needs to change. The simplest change, for example, for some arbitrage and liquidation protocols, which previously had an important job of attracting user funds, will no longer need to consider user issues or capital issues in their design if the future flash loan usage fees approach zero.

From another perspective, as Gao Jin pointed out, he believes that flash loans have increased the available funds for users, and one major application scenario is when there are opportunities in the market that can make you money, but you lack funds.

However, at this stage, flash loans are not yet cheap enough; some funding costs are lower than those of flash loans, and many arbitrage actions do not choose flash loans. Therefore, we can only say that flash loans represent the highest cost of funds for this type of financial activity, rather than being the best or only choice, but the future will depend on the development of the flash loan market.

An extended topic is: when capital-using financial activities no longer need to occupy capital, all funds can be used for capital-occupying financial activities, which effectively increases the total amount of available funds (previously, funds had to be divided in half for two uses; now funds only need to be used in one place), and can also be seen as improving the utilization rate of available funds (previously, some funds were in a waiting state to be used; now all funds are in a state of use).

3. Flash Loans are a Bridge for Deploying Funds, Providing Users with Cross-Protocol Asset Management Capabilities

InstaDApp seems to be the application that has developed the most uses for flash loans and packaged them for direct user use. I contacted their community manager, Seb, on Discord to understand the usage of flash loans in the application and their views on flash loans.

Seb told me that from the data perspective, one popular use of flash loans is as a bridge for users to deploy funds. For example, during the migration from SAI to DAI, they saw many use cases for flash loans. (Note: Seb is organizing relevant data on flash loans, and I will include it in the comments of this article for reference once he provides it to me.)

Using flash loans to migrate assets or debts is an easy task. For example, if you want to transfer your lending relationship from protocol A to protocol B, you can: borrow a flash loan, use the funds to redeem collateral in protocol A, then deposit the collateral into protocol B to borrow funds, and finally repay the flash loan with the borrowed funds.

With flash loans, funds can flow almost unimpeded from one protocol to another, from one type of asset to another.

From an ecological perspective, flash loans have lowered the walls of application/protocol gardens, allowing users to easily migrate assets to a protocol or type of asset they consider a better choice. This will lead to a more competitive and evolutionary system.

From the user's perspective, Seb believes that utilizing the liquidity provided by flash loans can give users the ability to manage assets across protocols, which is also a form of automated asset management (automated account management).

Users only need to set their strategies, and accounts can leverage flash loans to automatically complete operations when conditions are triggered, such as refinancing when interest rates change. Where does the liquidity come from? From flash loans.

Conclusion:

We have assigned too many functions to money; what would happen if we separated these functions? For the human brain, recognizing and processing a multifunctional entity may be much simpler than handling multiple single-function entities, but for computers, processing single functions is their strength.

So when money exists and operates in the form of code, if we separate the functions of money, can we improve the efficiency of all individual functions? Is this a more reasonable direction?

In my view, what flash loans are doing is separating the functions of money.

Finally, let us conclude the article with an excerpt from a poem by William Blake, which truly resonates with flash loans:

To see a World in a Grain of Sand,
And a Heaven in a Wild Flower,
Hold Infinity in the Palm of your Hand,
And Eternity in an Hour.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators