The year 2021 has seen an exponential growth of Decentralized Ecosystem. I was checking defillama a few days ago and I realized that TVL (total value locked) in DeFi was about $29B on 30th December 2020. This figure was hovering over $250B on 3rd December 2021. With this gargantuan leap, the tools that powers this ecosystem is bound to evolve. Therefore, today’s blogpost is dedicated to one such tool called a DEX aggregator or a decentralized exchange aggregator.
In this blogpost we would talk about the underlying issues with DEX. And how DEX aggregators help us minimize the same. Let’s get started.
The Magic of DEX:
It is no less than magic how a decentralized exchange works. For the uninitiated, our centralized exchanges like CoinDCX, Zerodha etc. work on order book based model. This means that whenever you place a buy/sell order at a specific price, the order book matches it with corresponding buyer/seller of similar price. In essence, centralized exchanges are matching buyers and sellers on their platform.
However, things are quite different when it comes to a decentralized exchange. In that case, you need not have a buyer when you are selling OR a seller when you need to buy. In other words, you are interacting with an algorithm instead of another human. This forms the basis of a trustless ecosystem where you don’t have to trust anyone, even the platform itself.
Then how do you trade assets you ask? Most DEXes use an algorithm called Constant product Automated Market Maker. In this case, a pool of funds (which contains assets to be swapped in equal ratio) is created by individuals. The price of each asset is decided by the amount of that asset remaining in the pool.
More the quantity of an asset in the pool, lesser is it’s price and vice versa.
Slippage: Where’s the Problem?
While it works flawlessly to an extent, the problems start arising when you are a big investor (they call it whale here). In that case, if you keep on buying one asset from a liquidity pool, the price of that asset keeps on growing exponentially due to the way algorithms work. Therefore, it is a potential loss for a whale to buy an asset from a single liquidity pool.
This entire issue that we just discussed about is also called slippage. Slippage is essentially the difference between the prices at which trader agreed to trade and the price at which it actually executed.
To avoid this slippage issues, you could actually try swapping through different decentralized exchanges, the rate, impact on the price once you decide to move assets and finally take your transactions through multiple of them.
But ain’t nobody got time for that?
Ever since this blogpost started you might be wondering why is it called a DEX aggregator. Now you probably have an idea. 1inch automates this entire stuff for you and algorithmically shows you the best path to swap your assets.
Let’s understand this with an example. Imagine you want to swap your 100 wETH (Ethereum on Polygon) to DAI (a stablecoin). The total value of this trade as I am writing this is about $399,270.
The way 1inch suggests to transfer this is a 7 step process. Details in the screenshot below:
Keep in mind that this keeps on changing in real time as per the liquidity pool situation in multiple DEXs. This also takes care of the situations when there is not enough liquidity in a pool to assist the transaction that you are trying to carry out.
In November 2020, v2 of inch was launched that enabled the swap across 21 different decentralised exchanges.
1inch also has it’s native token by the name 1inch. Let’s discuss the use cases of that token:
Yield farming is whole another beast and out of the scope of this blogpost (inquisitive heads can read more here). For now, let me summarize what this is.
For a decentralised exchange to work, investors like you and me can come to create a pool of assets for traders to come and swap their tokens on top of it. Why would we do that you ask? Because these investors (liquidity providers) are given a share of the fees that traders are charged.
Now this doesn’t end here. Once you provide liquidity to a pool, you get a representation of your investment in the form of LP tokens. You can stake these LP tokens to earn rewards in the form of 1inch tokens.
DEXes use this technique to ensure that liquidity providers don’t withdraw their liquidity and leave. Another reason for providing this additional incentive is to mitigate impermanent loss (loss you bear for providing the liquidity as compared to the situation where you would have been better off by just holding the tokens)
1inch tokens are also the governance tokens of 1inch protocol. This means that holders of these tokens get to vote on the future of the platform. For example, if platform plans to double the fees, token holders can collectively decide on that decision.
This is very similar to holding shares of a publicly traded company. You get an option of voting on key decisions during the AGM. More the number of shares, more is your authority.
Of the 1.5 billion tokens minted, 6% were distributed during the initial 1INCH airdrop. Of the remaining supply, 14.5% of 1INCH tokens will be unlocked over fours years to support team expansion, audits, grants, and insurance against potential hacks. Another 23% of 1INCH tokens will be a source of funding for community incentives, including the 1inch Liquidity Protocol.
Oh come on! If this isn’t able to convince you on magical powers of blockchain and crypto realm, I fail to understand what will. Just compare it with traditional finance. Where would you find such a sophisticated system automated like a charm.
Got any examples in mind?
Let me know in the comments section below. If this article adds value to your life, please consider sharing it with your friends using the links below.
Until next time..
For our beloved “non readers”, I also do quick carousels on these topics over Instagram. Come join the fun. Hit me up here.