Flash Lending use cases
Last updated
Last updated
Arbitrage is the most common method of using flash loans, as it is ideally suited to take advantage of flash loans' innate characteristics. We commonly interpret arbitrage as a trading strategy that takes advantage of different asset prices in other markets. As an example, we consider a digital token A traded on two decentralized exchanges. If a token called A is listed on DEX 1 for $1.00 and $1.10 on DEX 2, a user can take a flash loan to buy $10,000 in tokens from DEX 1, sell them on DEX 2, pay back the loan and grab the $1,000 in profit, all within a single transaction. When we multiply the individual price gap across channels with the amount obtained by taking a large flash loan, the benefit of using flash loans in such an operation becomes obvious, even if we have to factor in liquidity and market slippage in the secondary market, transaction fees and any interest fees (such as the 0.09% on AAVE).
Liquidations are an essential aspect of the DeFi world. Most lending platforms require over-collateralization. An example is the AAVE lending platform that allows any user to borrow up to 75% of the current value of any assets locked with its protocol. This means that as the assets’ valuation increases, so does the "credit limit" for the applicable user. On the flip side, when the locked assets' value drops, a liquidation event can occur.
In such cases, to liquidate the locked tokens, a third-party liquidator gains access to the deposit. His job is to trade the locked tokens to the one in which the debt is taken. He then pays back the debt on behalf of the borrower, gaining a liquidation bonus in the process. Since there are many token pair combinations (the ones you have to liquidate vs. the ones you have to pay back), the liquidators must have much liquidity in multiple fluctuating assets to make the swaps, which leads to a lot of inventory risk. For flash loans, liquidators do not need to hold any of these volatile stocks. They could flash borrow from one of the major platforms, payback on behalf of the borrower, release its deposit, swap it for the token in which the flash loan is taken, pay back the flash loan and gain the bonus. This description of the complex transaction gives the illusion that the liquidator must undertake multiple steps; in reality, all the steps are done automatically by the flash loan smart contract. The flash loans could be used to protect the assets' value in the deposit since a market fluctuation could endanger your deposit by potentially triggering a liquidation process, which would lead to 3%-15% penalties. Using a flash loan smart contract can protect in the case of such liquidations since for flash loans, the fees are either 0 or 0.09%, much better than 3-15%.
Collateral Swapping is a mechanism in which a collateral position can be replaced with a borrowed asset even if the borrower cannot return the funds. As collateralized assets are subject to price volatility, this is very beneficial and can lead to liquidation events to reduce the borrowing capacity. By replacing the locked-in assets with the ones expected to have a better market evolution, both matching situations can be avoided. This is traditionally done by paying back the loan to unlock the vault and then switching the collateral asset. This situation can be avoided with flash loans by closing the collateral positions with borrowed funds and immediately opening a new collateral position with a different asset. For example, let’s presume a borrower uses token A as collateral on DEX 1 and fears that A’s price will drop. In that case, he or she can swap the collateral by taking a flash loan for another token, B, and exchange A for B to avoid liquidation.
Presume a user has a Maker Vault (Collateral Debt Position) with $100 of ETH locked in it, from which a loan of 30 DAI is being taken out, leading to a $70 net position. If a better interest rate is available on Compound, for example, a refinancing solution using flash loans is available. Instead of repurchasing 30 DAI to pay back on the CDP (which would imply up-front capital), the user has the option to flash borrow 30 DAI, close out the Vault, deposit the unlocked $70 (out of $100) worth of ETH into Compound and use Uniswap to swap the remaining $30 into DAI which is used to pay back the flash loan. Through this process, the user switched DEXes to follow a better interest rate and managed to unlock the Vault without external capital.
Cryptocurrencies are either inflationary (if further units of the asset can be minted) or deflationary (if there is a definite hard cap on the number of assets that can be mined). Flash minting is an exploratory application of flash loan mechanics. Although, the exact utility is yet unclear. The idea is to allow instantaneous minting of an arbitrary amount of an asset, and the newly minted assets exist only during one transaction, being burned at the end of the transaction cycle.