What are the Platforms Offering Flashloans in 2020? Why are they Important in India?
FlashLoans are all the rage right now in the world of Decentralized Finance (DeFi). With just cause, this is probably the first financial innovation possible only on a blockchain. A what a start it has been because a flash loan is a loan with no collateral needed or risk involved.
I am sure those two characteristics have raised your interest. Indeed, most of the crypto community, in general, is talking about flash loans, and there is no shortage of tutorials or discussions about them in Reddit, Youtube, and similar places.
This development comes at a critical time in India’s crypto adoption. The 2020 ruling by the country’s supreme court striking down the previous prohibition of crypto trading has opened the floodgates for Indians. Many part-time and full-time traders are now able to enter the crypto space without fear of heavy legal ramifications.
Of course, the trading scene has changed. It’s now a space dominated by crypto trading bots and automated software. This means most of the time, human traders stand little chance of competing in the market.
In the meantime, you can check out this beginner’s guide to cryptocurrency trading.
The Flashloan is a new type of product that has not broken through into the mainstream. Since it remains a niche type of trading, large and technologically powerful players are not dominated, so it is a space where single individuals with some knowledge in Solidity programming can make money.
India as the biggest exporter of software globally has a large base of knowledge to take advantage of this innovation. The Flashloan can be the perfect tool to start making money trading without too much risk and begin building a capital nest for more extensive and more complicated trading strategies.
What are Flashloans?
At the core, a flash loan is a repaid loan within the same transaction. That is to say, first, you borrow an x amount of some token, use it to buy a different one, pay the original amount, and finally pocket the difference. That was an example of an arbitrage opportunity because, for a brief moment, token x had a higher exchange rate than token y in a different marketplace. This is the main use for flash loans, to discover price discrepancies between exchanges, and use them to take advantage and make some profit.
How is this possible? It all has to do with the way the blockchain runs a smart contract. A smart contract is just a concise program or set of instructions that run on the Ethereum Virtual Machine (EVM). As with any computer script, the EVM executes the logic of the code line by line. This means that by getting the loan on the first part of the smart contract and repaying it a few lines of codes after, a flash loan does not require collateral to get since it will be repaid no matter what.
That is fine if the transaction is successful and the swap for tokens goes well, but what happens if it doesn’t. Let us say that the arbitrage opportunity disappears before the smart contract is executed. In that case, it never reaches the stage where it buys the token y, so the transaction fails and the amount borrowed goes back to the platform lending it. This is why there is no risk; if it fails, things go back to the state they were before. Of course, it is not free, regardless if the transaction goes well or not, the gas fees for executing the smart contract have to be paid.
I know this all sounds very exciting and new. So, let us introduce which decentralized exchanges are offering flash loans right now. It is important to remember that a flash loan only works in a DEX. This method of trading is not available in traditional centralized exchanges with custodial power over tokens.
The original concept of a flash loan was conceived by Marble Protocol back in 2018. This was a project that called itself the first bank run using smart contracts. The project no longer exists, but its main creation, flash lending, was picked up by Aave in 2020.
This is a decentralized liquidity provider that makes loans and offers interest rates for savers. Originally, flash loans were not its main product, but with its growth in popularity, the protocol has shifted towards making them more prominent in their offering.
On the pro side of Aave, we have: it offers a large selection of tokens to be used for flash lending in arbitrage opportunities, it offers Ether directly from their pool. Also, it provides wrapped Ether from its spool. Aave has very detailed documentation for all of its offerings and provides a Truffle Box, a type of template that can be used to customize flash loans quickly. Finally, Aave just recently opened its own platform for flash loans, which previously was not permitted.
The one contrary point is that Aave charges 0.09% per successful transaction. This is only if the trade is successful; they don’t charge if the execution fails.
dy/dx is a decentralized exchange hosted on the Ethereum network. The symbol is a mathematical notation used for partial derivatives. It is a “d” written in a stylized cursive form. It is one of the most robust DEX out there since it offers margin trading and synthetic assets. Of course, it also has flash loans.
So, dy/dx features are complete, suitable for developers, but not for the general public. Our first contrary point is that the platform is very technical and not user friendly at all. They don’t offer flash loans as such, it is more than that. Flash lending is possible due to how the exchange is designed. To execute a flash loan, a user has to call several functions and sort of trick dy/dx unto accepting the transaction.
This extends to their documentation, which is very slim when it comes to flash lending. Since we are talking about the negative, they have a limited selection of tokes available for flash loans.
On the good side, it has no fees. Technically it charges the minimal unit of a token when a transaction goes through. If I made money with ETH, it would charge me one Wei, which is a decimal followed by 18 zeros, basically nothing. You can use flash loans inside the platform. The profits from a flash loan can be immediately used in other trades on the same platform, which is very convenient.
Finally, we have Uniswap, which recently introduced Flash Swaps, which, in essence, are the same as flash loans. One of the most popular DEXs out there and among the most friendly to use. This means it is perhaps the easiest platform to use from all the ones listed. It has a wide selection of tokens to use. You can trade in the platform itself, it offers ETH from its own pool and has a large community out there to answer questions.
On the bad side, it charges a fee of 0.3% per successful Flash Swap, the highest from all the three. I know it sounds like little, but after deducting gas fees, and factoring how the arbitrage opportunities are really small, hardly ever more than 0.5%, a fee can really wipe out any profit.
So, there all three platforms offering flash loans out there. This is an excellent opportunity for all those out there looking to make some side income in DeFi. As the crypto space grows, even more innovations will follow.
Of course, a person can get a flash loan from one of these platforms and use it in a different DEX. For example, you can borrow from uni swap and use it to buy a token in Kyber Network or 1inch Exchange, basically any Decentralized Exchange on Ethereum. The profits are deposited on the smart contract’s address. So, it is important to transfer those funds to a secure wallet regularly to avoid losing them.
A flash loan is a great opportunity for developers with knowledge of solidity or Javascript. The smart contract for it is hardly bigger than 100 lines of code at most. They are not complicated to design. Aave, Uniswap, and Open Zeppelin offer free templates on their platforms.
A flashloan is only one of the many innovations that the Blockchain is creating in the world on finance. The implementations of this technology in the financial world are multiplying, and this blockchain series article on financial services offers a complete overview of all the upcoming changes.
As the restrictions to use cryptocurrencies are lifted in India, now is the time to enter the market. It is still a niche technology, so anyone who dedicates the time to learn about Blockchain will have a major advantage as this technology reshapes the future of the world.