So, seeing yet another story involving flash loans, I have to ask this question: what is the actual utility of a flash loan? The first use that occurred to me was to use it to pretend you were sufficiently rich for the purposes of exploiting an insufficiently secure smart contract, and judging from the number of stories involving them, I'm not the only person to think along these lines. But I'm not seeing any other uses than some variation on that fraudulent idea of making people think you have money you don't really have.
Surely the people who came up with this financial innovation had some other use for it in mind, one that would outweigh the inherent externality of this-is-a-perfect-vehicle-for-fraud, right? ... right?
Many financial positions (in DeFi or the real world) require you to have additional funds in order to move between different positions.
An example in the real world...say you're an employee at a large tech company with a bunch of stock options. You want to exercise those options and sell them. In order to exercise those options, you need money that you do not have. Luckily, your brokerage offers a service where they'll exercise the options for you and sell them. You're essentially borrowing their money very quickly to get out of your position.
In DeFi, you could use a flash loan in order to deleverage in a position. So instead of selling a small increment of your position and paying back your loan multiple times, you can instead take a flash loan and pay everything back at once to deleverage.
> Such flash loans have beneficial uses, including help for traders trying to capitalize on price differences between cryptocurrencies on different exchanges. In that sense, they are much like the financing that an investment bank might provide to an investment fund to make bets on different stocks or currencies.
This is their predominant use as well.
If you bid up the price of something on Sushiswap, that also trades on Uniswap, a flash loan will be deployed pretty much in the same block, pull all available capital necessary, and fix that price imbalance to its maximum potential.
Just a form of arbitrage.
Projects have to do system design that accounts for this. Beanstalk did not seem to account for the idea that the liquidity pool would have more than 50% of the BEAN supply eventually. But aside from that, having proposals passable in one block of deposit is the primary vector. Teams and communities like this model though because it basically comes down to "imagine how rich we would be if an attacker actually tried to buy all the tokens, I hope state actors get involved to really test that theory" because then it wouldn't matter if one block or many blocks was used if an actual organization was determined to pass something, this mentality is just not compatible with flash loans when all the liquidity is purchaseable already.
Flash loans are useful for both arbitrage and loan liquidations. Every swap on Uniswap and its many forks on many chains is actually a "flash swap" under the hood - you can take the coins out and use them before the code checks that you have sent the tokens for the swap in to the contract. You don't even need a dedicated flash loan provider on a given chain to be able to use very large amounts of capital sitting in DEX pair contracts.
There are other case-specific uses for them, but loan liquidations and arbs are the big ones.
Depends on your use case. First, AAVE is on ETH, and most arbitrage profits are on other chains. For example, there aren't a lot of flash loan providers on BSC (Binance Smart Chain) with deep liquidity, so everyone just uses flash swaps. The most profitable chain for arbs is BSC (binance smart chain). If you're using the loan for DEX arbitrage, then there is no point in using a third party loan provider like AAVE. You have to pay swap fees regardless, and a flash swap is "free" in the sense that you only pay the swap fees for the coins involved, and you must pay them whether you send the coins to the contract first, or if you borrow them and pay them back at the end.
So if you bring in outside money from a place like AAVE for a DEX arb, then whatever fees you are paying to AAVE are an extra, optional expense, since the swap fees must be paid regardless.
Somewhat strange take on it. Applying the exact same reasoning, any loan is a fraud that lets you pretend you have money that you don't have. Compared to flash loans, a mortgage is a far more serious scheme, because you could end up defaulting on it, something that is impossible with flash loans by design (the transaction would revert). Mortgages also drive up house prices for everyone.
Fyi, their intended use case is to remove arbitrage opportunities, something that improves the UX for ordinary users because you don't have to worry about buying/selling at a suboptimal price.
The main use is exploiting smart contracts. Not just in the "bug" sense, but if e.g. there's a decentralized exchange and many people unwisely set a resting stop order to sell to "reduce risk", you can clear out the order book popping everyone's stops to trigger a cascade and then buyback at firesale prices.
Another common use for cryptocurrency loans is speculating on other cryptocurrencies or borrowing a lot for a short-term pump & dump. There's smart contracts that will let you borrow at 20% interest leaving the balances of both known, and they'll margin-call you if the trade goes too far against you.
There's no use for these loans outside of cryptocurrency-land: If you buy e.g. an apartment complex, that asset cannot be used as collateral for a cryptocurrency loan and you can't get millions of dollars for cheap like you can a conventional or government loan.
Surely the people who came up with this financial innovation had some other use for it in mind, one that would outweigh the inherent externality of this-is-a-perfect-vehicle-for-fraud, right? ... right?