Diving into DeFi: Part 2: DeFi Projects, AMM Mechanism in DEX.steemCreated with Sketch.

sap450.png

sap102.png

What are different DeFi projects?

Although it is true that maximum DeFi projects are concentrated in the Etherum chain, with Uniswap in the dominant position in terms of TVL(Total Value Locked- 2.2 Billion USD locked), it will be unfair to demonstrate DeFi with the Etherum chain only. We must not forget EOS, Tron, Polkadot, Cosmos family, etc.

It is also prudent to take note of the time span a particular Blockchain has spent in the crypto space. Etherum may be an older one in the context of DeFi ecosystem, but the performance of the Etherum chain(scalability) and transaction fees may not suit the common middle-class investors, may be taxing on the micro-traders.

The Tron ecosystem, in particular always fills the void when it comes to cost-effective micro trade in DeFi.

The public blockchains like EOS, Tron family who have exceptional scaling capacity are slowly picking up and building their own DeFi ecosystem. We can not discount the Cosmos & Polkadot ecosystem in the DeFi space either.

So here is a brief summary of some of the popular DeFi projects.

S NoDeFi TokensChainCatergory
1UniswapEtherumAMM-Decentralized Exchange & Liquidity Pool
2JustswapTronAMM-Decentralized Exchange & Liquidity Pool
3NewdexEOS/TronDecentralized Exchange
4WhalexEOSDecentralized Exchange
5EOSSwapEOSTrustless OTC Trading
6POLONI DexTronDecentralized Exchange with zero trading fees
7Fast TRX LoansTronFinance- TRX loan with CNR token as collateral
8Pandora DEXTronDecentralized Exchange
9PolkaswapPolkadotAMM-Decentralized Exchange- Aggregated Liquidity Technology
10Bancor NetworkEOS/Etherumon-chain liquidity protocol to support AMM-Dexs
11Binance DEXCosmosDecentralized Exchange
12ThorchainCosmosDecentralized Liquidity Network- Cross-chain liquidity pool
13E-moneyCosmosElectronic Payment system bridging the traditional financial services & Blockchain
14KavaCosmosLending platform
15Mantra DAOPolkadotSTaking, Lending, Borrowing
16Acala NetworkPolkadotStablecoin, Cross-chain liquidity
17AkropolisPolkadotDecentralized Autonomous Community- Borrow & Earn, Save & Earn
18LaminarPolkadotMargin Trading, Synthetic Asset, Money market
19EOS MicroloanEOSAbility to create a loan either by possession of asset or by finishing a task
20Flash LoansEOSBorrow EOS without Colleteral, Use-case- Debt Refinance
21Defi BOXEOSDecentralized Swap protocol & AMM
22Just NetworkTronDeFi protocols & financial solutions- STablecoin, AMM-DEX, shielded TRC-20 USDT, BTC on Tron, etc.
23Maker DAOEtherumStablecoin DAI
24AaveEtherumNon-custodial protocol for Lending/Borrowing
25Curve FinanceEtherumExchange Liquidity protocol for Stablecoins
26ChainlinkEtherumOracle network for DeFi price feeds
27CompoundEtherumLending/Borrowing
28CivicEtherumIdentity Toolbox
29AirswapEtherumP2P Trading
300x ProtocolEtherumOpen-source protocol to enhance interoperability of DEXs in Etherum
31Nexus MutualEtherumInsurance
32Codefi AssetsEtherumInvestment
33SynthetixEtherumDerivatives liquidity protocol
34OpenseaEtherumP2P market for crypto collectibles/rare items
35OmisogoEtherumInteroperability & scaling solution of payments
36AugurEtherumBetting Platform

sap102.png

Uniswap & Justswap-- the new DEX trend in DeFi

Both Uniswap & Justswap are AMM(Automated Market Maker) based Decentralized exchange which offers:-

  • Liquidity to the trader who wants to exchange one coin for the other within the family.
  • Opportunity for the Liquidity Providers to earn a commission from the trades/exchange(fees)

Both are 100% on-chain.

sap102.png

Orderbook Vs Automated Market Maker

sap449.png

In an order-book model, if a pair exists, then there is a list of bid and ask value, and the difference between the bid and ask is known as spread. In a highly liquid market, this spread is narrow, competitive and offers the best value of exchange to a trader. In contrast in an illiquid market, the spread goes high, and hence exchange value could be worst for a trader.

Therefore in an order-book based exchange, even if a pair exists, there is no guarantee to the liquidity and hence a trader may not get the desirable/competitive price to trade, excessive slippage does not make it feasible for the trader. So just having a pair in an exchange may not be sufficient in an order-book model, and to enable the trader to get a desirable price at par with the broader market, the exchange needs to ensure sufficient liquidity. That is why the trader prefers major exchange(sufficient liquidity).

In contrast, in the Automated Market Maker model based exchange, the only condition is that an exchange pair should exist to enable a trader to trade at a desirable price at par with the broader market. That means the liquidity is guaranteed by the AMM. Does not even matter if the liquidity is high or low.

In addition to that, an AMM model exchange also creates an opportunity for the investors to pool their tokens and earn exchange fees from each trade. Ideally, in a decentralized exchange, the liquidity providers earn 100% transaction fees. At any given time, the fund is in the absolute control of the owner.

So there are three things to consider in an AMM:-

  • Liquidity Pool
  • Smart Contract
  • Reserve Ratio

The Liquidity Pool is contributed by the investors where the investors put the equivalent worth of both sides of a pair. e.g. in a TRX/JST pool, if the LP provider has to put 100 USD, then he has to put 50 USD worth TRX and 50 USD worth JST.

sap448.png

A rule/logic is pre-defined in the smart contract to execute an exchange.

The price of an exchange that is available at any given time is the ratio of the reserve of the assets of any given pair.

When a pool is created for an exchange pair, the one who first contributes to the liquidity pool sets the exchange rate at his discretion, if that is inconsistent with the broader market, then it creates an arbitrage opportunity, and the arbitrageur brings the exchange rate to the equilibrium value. The subsequent liquidity providers then contribute as per the rate available in the AMM exchange at the time of adding liquidity.

Every time an exchange happens, the trader pays 0.3% fee, and then the fee is distributed proportionally among the LP providers.

sap102.png

Constant Product Automated Market Making Mechanism

The curve function to determine price is always xy=k,

Where k is a constant. x & y represent both sides of an LP pool.

Since k is a constant all the time, it is the price of the token that adjusts accordingly to determine an exchange rate of the pair. If it deviates from the wider market, the arbitrageur comes into play to correct it to the equilibrium value.

Analysis of xy=k

The graph of the function xy=k reveals that the slippage is contained within a particular zone. Beyond this zone, slippage will occur.

screenshot (3).png

As shown in the graph, beyond the indicated zone if we move right, the output will be very less for a larger input(large trade size), that means the exchange is very expensive for big size trade.

Put simply, an exchange is reasonable if the input is up to 1% of the liquidity pool. As the input increases(large trade size), the output starts diminishing and gets expensive for a trader.

That is the reason why for a larger input, the price impact on the output is too high in Justswap or Uniswap, it will start showing the red sign in the price impact. For a lower input, the price impact is below 1% and that is always shown as green, which means reasonable exchange value.

screenshot (4).png

In this example: The input amount is 100 million TRX and the output is USDT. At the present value of TRX ($0.0254), it should be 2.54 million USDT. But as you can see the output is showing as $2.268 with a price impact of 11.86% which too expensive to trade.

screenshot (5).png

In this example: The input amount is 1000 TRX and the output is USDT. The present value of TRX is $0.0254 and the output is showing as 25.32 USDT, so it is reasonable to go with this trade, a price impact of less than 0.01%.

How do we define lower input or larger input-- That depends on what is the percentage of the input as compared to the liquidity pool. If it is below 1% of the liquidity, then you will get a competitive/reasonable exchange value for your trade.

If the hype around DeFi persists, then TVL(Total locked Value) will go up, so in that case, larger size trade will also be desirable in AMM Dex(as long as it is up to 1% of the liquidity pool).

Thank you.

sap102.png

Cc:-
@steemitblog
@steemcurator01
@steemcurator02

sap102.png

Unless otherwise stated, all the images, infographics, charts, tables, etc(if any) are my original works.


The post payout is set to "Power Up 100%".

sap102.png

Sort:  

Congratulations you are one of the winners of the Steem Crypto Challenge Month...

Thank you for taking part

The Steemit Team

Thank you so much.

Steem on.

Congratulations 👏🏼👏🏼

Thank you.

DeFi is the Future of finance!!

Coin Marketplace

STEEM 0.17
TRX 0.13
JST 0.027
BTC 61152.47
ETH 2665.18
USDT 1.00
SBD 2.55