How does a DEX work?

How does a DEX work?


hey mates!

I would like to talk about how DEX are working now.

The idea behind

Sometimes you have thought how the DEX can change several tokens if the DEX is not a bank. Where is the funds coming from? Easy, from the liquidity pools. The DEX itself hasn't got any fund. The DEX offers you deposit your tokens into a pool or a farm on the DEX, in the way of LP tokens or what is the same "pairs of token called Liquidity Provider tokens". So in this way your are leaving your tokens on the DEX and the DEX is rewarding you with its governance token or similar. This is done using smart contracts for staking and for getting back your tokens.

 

when you want to stake your tokens the smart contract is executed to send your tokens to the DEX.

when you want to recover your tokens the smart contract is executed to bring your tokens back.

 

Staking

The common rule is:

If you are staking into a pool your staking single tokens. Usually you change your ETH, Matics, BNB or so on tokens for the governance token of the DEX, and after that, you can stake these tokens into a pool to receive some rewards of the DEX governance token.

if you are staking into a farm you are staking LP pair of tokens. Usually you have to provide the same value of two tokens to create a link of LP token. At the moment to create the LP token resulting of the two single tokens, you are executing a smart contract for doing that. After that, you can stake this LP token in a farm to receive some rewards of the DEX governance token.

 

add liquidity

pools

farm

and that is!

So for one side, the user goes to the DEX to lend his money into the farms and pools, and for the other hand, another users can exchange some tokens on the DEX using the previous tokens lent for the users. The DEX is needed piece between users to allow the trading between them. This is the real magic. The DEX itself hasn't got any token, but it allows you to exchange your token in an easy and transparent way.

DEX

DEX

 

Liquidity

This is a very important concept to keep in mind. Imagine that you have 1M on ETH, and you want to exchange it for USD or EUR. What will you do? you would go to a DEX to exchange it, for instance. Ok, well done!. But image that the users who lend the tokens to the DEX haven't stake ETHs on the DEX, for instance. So in this case the DEX hasn't got liquidity and you can exchange the ETH to USD. So you have 1M ETH but nobody can exchange it, doesn't it? so in this case your ETHs are worthless, doesn't it? so at this moment you have to realize that the most important thing in the DEX is the liquidity.

In the next image, you can see the the Mist token has a liquidity worth of $4K more or less in the four DEXs. This is really important, because with this info you know that you can go to any of these DEXs to exchange your Mist's to BCH, for instance. More liquidity is better.

liquidity

Another metrics

  • Market cap or market capitalization: is the worth of the tokens * the price/unit of the token. For instance for the BCH at the moment of writing these lines is 19M of BCH * $382 per token = $7.241.975.492. It is important? yes, but the liquidity to exchange them is more important, doesn't it?
  • supply: it's the number of tokens in the market. It is important? I'm not really sure. The most important in this case is not how much of them exists, the most important is the price per unit, doesn't it?

Conclusions

The DEX are really important for the DeFi ecosystem. Understand the basics it's cool to trade with your tokens. I hope that this post can help you. Thanks in advance!

Advantages programs:

Personal projects:

How do you rate this article?

21


estrenoscinehoy.com
estrenoscinehoy.com

software engineer! currently developing the site https://estrenoscinehoy.com, visit the site to support me, Thxs in advance! :)


It's all about crypto
It's all about crypto

It's all about crypto

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.