I came across Equilizer Finance recently and discovered flash loans and the DeFi side of blockchain and crypto. DeFi has always been foreign to me so I decided to write about it 🤗
Flash loans are cool because they let users borrow funds (in many cases, millions of dollars can be borrowed) without any upfront collateral (collateral is basically a security deposit) for a short period of time.
Sounds all good right? But, there’s a catch: you must pay the flash loan back in the same Ethereum transaction you bought it with and with the same cryptocurrency block that it was borrowed in.
Flash loans are an innovative approach made possible by the Defi space, but they come with a risk. In the past, they’ve been used to attack lending protocols that are responsible for issuing them.
Here’s how they work:
1. A borrower requests funds as a flash loan.
2. They instantly use the funds to take advantage of an arbitrage opportunity between two decentralized exchanges.
3. Once the transaction is complete, the flash loan is returned with charged fees 4. The borrower keeps whatever profits were accumulated from the arbitrage.
You’re probably wondering why anyone would want a loan that would need to be payed back immediately. Trading Arbitrage is a big reason why. As an example if you bought something on Binance and then sold it on Coinbase for a higher price, you would hope to make a profit after paying gas fees.
A more simplified example: if you buy chocolate from the dollar store for $0.10 each and then sell them for $0.30 each, you could quite easily triple your money.
Another reason is collateral swap. Users can exchange current collateral assets for other assets, making it easier for users to manage their risks and avoid getting liquidated. Collateral, deposited before borrowing funds, can now be swapped for another cryptocurrency. It’s like you can change out your collateral without touching the initial amount of money you borrowed.
When locking up cryptocurrencies as collateral there is a risk that the asset can devalue in price. If this occurs, a user could swap their cryptocurrency into a stable coin to avoid price fluctuations.
Another important use case of flash loans is liquidation. If you have funds locked up as collateral, you can get immediate access to it by taking out a flash loan. Then, you could take your funds locked up as collateral, convert to a stable coin and then repay it which would allow you to withdraw large sums of money without putting any of your own money upfront.
Learn more 👇
Equalizer Finance
Whiteboard Crypto has a cool video
Make a flash loan
I’m trying to build a writing habit by writing here every day about things I learn in web3, blockchain, crypto, etc. If you find errors in my understanding or would just like to talk, it would be most appreciated if you’d reach out @_anyasingh