Liquidity pools: What are they? by joelagbo

View this thread on steempeak.com
· @joelagbo · (edited)
$7.93
Liquidity pools: What are they?
![Liquidity-pool-1.jpg](https://files.peakd.com/file/peakd-hive/joelagbo/23wCdEMwuqwK9ow2rwv82o87aP9znV14WvTCbL1GBwRgw38m8qHd2Efga77fnNjMLVJyD.jpg)


So, you just used a Dex for the first time…well probably not your first time but you just began to wonder how exactly this works. Unlike the rampant centralized exchanges, DeFi exchange platforms do not have buy walls and sell walls, yet exchange of assets is unrestricted. Even a cryptocurrency veteran would wonder how this works exactly.

Decentralized exchanges are powered by Automated Market Maker (AMM) protocols which leverage liquidity pools to ensure seamless exchange of assets while retaining blockchain-level security. AMMs? We will learn about these in my next article. Understanding liquidity pools – the underlying technology which powers automated market markers is our current objective.

<b><i>So, what are liquidity pools?</i></b>

Imagine a basket containing two kinds of fruits in a barter trading system; taking one of these fruits requires you to replace them with an equal value of the other fruit. Now this is basically how DeFi exchanges works. The basket here is the <b>liquidity pool.</b>

Liquidity pools are collections of tokens locked in a smart contract which allows borderless exchange of tokens in the pool. Contributors who provide these tokens and lock them in the pool are known as <b>Liquidity providers.</b> 

To provide liquidity, a liquidity provider locks up equal values of the two tokens in the pool. The liquidity pool is hence a collection of tokens locked up by the liquidity providers, this pool is available for traders who wish to exchange any of these assets.

![mainphoto.png](https://files.peakd.com/file/peakd-hive/joelagbo/23u6YdZCMfWncPJeWCnPgn2rjktHJAPUGs6sETXAADvKJDwRSoJkesUX1snoHzxYtSERy.png)

Liquidity providers receive <b>liquidity pool tokens (LP tokens)</b>. LP tokens are cryptographic representation of the percentage of the total liquidity pool owned by the individual liquidity provider. Trading fees are distributed amongst liquidity providers according to the percentage of the pool they own.


To further incentivize liquidity provision, certain projects launch liquidity farming programs on their platform to reward liquidity providers according to the amount of liquidity they supply. This is popularly known as liquidity farming. To earn tokens in a liquidity farming program, liquidity providers stake their Liquidity pool tokens on the platform and earn according to the APR and amount of Lp tokens they stake.

![Screenshot (261).png](https://files.peakd.com/file/peakd-hive/joelagbo/EocCNwk3nY8ToqJVPxLx6KzmdesSM1iQ5wRVP2ygD4cEG1aRgci121fpAdPETuueuxL.png)

However, liquidity provision comes with its own little disadvantage, this is known as <b>Impermanent loss.</b> Impermanent loss is a ‘temporal’ and ‘illusional’ loss incurred by liquidity providers due to variation in demand and values of the tokens they supplied to the liquidity pools.

This is due to a protocol programmed to retain the total value of tokens supplied to the pool. If one of the assets supplied to the pool continues to rise in demand and value against the other, liquidity providers receive the other asset as the supply is increased by traders depositing more of it to the pool

Assuming you supplied 100USD worth of ethereum and 100USDT, the total value of your Liquidity is 200USD. As the value of ethereum increases, the amount of ethereum you supplied continues to decrease while you receive more USDT, this is essentially designed to retain the 200USD you added to the liquidity pool.

The ‘loss’ comes from the fact that the gains which would have supposedly come from the increase in value of ethereum will be lost. It’s illusional because there is in fact no loss; your 200USD is sustained, only difference is that you have more USDT now. It is temporal because if the liquidity provider can wait until price returns to what it was when this liquidity was provided, they will receive the same amount of tokens they supplied when they withdraw the liquidity.

Liquidity pool is a clever technology, not only does it solve the fake liquidity issues, they simplify asset exchange. Liquidity providers also get to earn passive rewards from liquidity provider fees. 

We’ll get to talk about Automated Market Markers in our next article. Follow us and stay tuned!.

<a href='https://cryptoscripts.medium.com/subscribe'>Have our next publication delivered to your mailbox</a>

<hr>

<h5>Cryptocurrency Scripts is transforming into a community of enthusiastic cryptocurrency and blockchain believers! <a href='https://t.me/cryptocurrencyscripts'>Join the Adventure!</a> </h5>

<h2>Would you love to read similar articles? </h2>
<a href='https://cryptoscripts.medium.com/subscribe'>Have our next publication delivered to your mailbox</a>

<b>Follow us on <a href='https://twitter.com/scriptscrypto'>Twitter</a>
<b>Follow us on <a href='https://cryptoscripts.medium.com/'>Medium</a>
<b>Follow us on <a href='https://www.publish0x.com/@Dzoelx'>Publish0x</a>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 154 others
👎  , , ,
properties (23)
post_id94,730,547
authorjoelagbo
permlinkliquidity-pools-what-are-they
categoryhive-101145
json_metadata{"tags":["rpromo","cryptocurrency","blockchain","crypto","r2cornell"],"image":["https:\/\/files.peakd.com\/file\/peakd-hive\/joelagbo\/23wCdEMwuqwK9ow2rwv82o87aP9znV14WvTCbL1GBwRgw38m8qHd2Efga77fnNjMLVJyD.jpg","https:\/\/files.peakd.com\/file\/peakd-hive\/joelagbo\/23u6YdZCMfWncPJeWCnPgn2rjktHJAPUGs6sETXAADvKJDwRSoJkesUX1snoHzxYtSERy.png","https:\/\/files.peakd.com\/file\/peakd-hive\/joelagbo\/EocCNwk3nY8ToqJVPxLx6KzmdesSM1iQ5wRVP2ygD4cEG1aRgci121fpAdPETuueuxL.png"],"links":["https:\/\/cryptoscripts.medium.com\/subscribe","https:\/\/t.me\/cryptocurrencyscripts","https:\/\/twitter.com\/scriptscrypto","https:\/\/cryptoscripts.medium.com\/","https:\/\/www.publish0x.com\/@Dzoelx"],"app":"steemit\/0.2","format":"markdown"}
created2021-10-14 04:56:39
last_update2021-10-16 15:44:18
depth0
children4
net_rshares11,038,868,880,278
last_payout2021-10-21 04:56:39
cashout_time1969-12-31 23:59:59
total_payout_value3.988 SBD
curator_payout_value3.940 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length5,064
author_reputation106,605,049,898,479
root_title"Liquidity pools: What are they?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (222)
@crypto.piotr ·
Hi @joelagbo

> So, you just used a Dex for the first time…

Is RobiniaSwap decentralized?

Understanding what liquidity pools are, how do they work and why do we need them in the first place is a must for anyone who want to be involved in DeFi. Wouldn't you agree?
(actually, I'm not even sure if platforms like pancakeswap, uniswap or robiniaswap should be considered DeFi. Simply because those seem to be centralized projects. I wonder why don't we call it CeFi instead? Any idea?)


Back to main topic:
> Unlike the rampant centralized exchanges, DeFi exchange platforms do not have buy walls and sell walls

I find it quite difficult to understand. So we do not need to "match" price placed by sellers and buyers. So what determine price of the token? 

Solid read. Upovted already :)

ps.
could you perhaps check out my latest post ([MINING RobiniaSwap (RBS) Tokens? Could you be making one of these mistakes?](https://steemit.com/hive-175254/@crypto.piotr/mining-robiniaswap-rbs-tokens-could-you-be-making-one-of-these-mistakes)) and help me bring more traffic to it by resteeming this publication?

Cheers, Piotr
properties (22)
post_id94,907,518
authorcrypto.piotr
permlinkr1b1au
categoryhive-101145
json_metadata{"users":["joelagbo"],"links":["https:\/\/steemit.com\/hive-175254\/@crypto.piotr\/mining-robiniaswap-rbs-tokens-could-you-be-making-one-of-these-mistakes"],"app":"steemit\/0.2"}
created2021-10-21 01:54:33
last_update2021-10-21 01:54:33
depth1
children3
net_rshares0
last_payout2021-10-28 01:54:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length1,120
author_reputation125,570,865,859,056
root_title"Liquidity pools: What are they?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@joelagbo ·
<blockquote>Is RobiniaSwap decentralized?</blockquote>

Yes, just like pancakeswap, robinia's swap protocol is decentralized.

Here's how a token's price is determined:

I'd say it's simple 'supply and demand'

when demand for one token in the pool rises (due to buys), the supply decreases as people keeps taking from the pool. The changes the ratio of the tokens in the pool. The ratio is equivalent to the price.
I hope I was able to answer your questions.

thanks for taking time to read.
👍  
properties (23)
post_id94,923,559
authorjoelagbo
permlinkr1c2il
categoryhive-101145
json_metadata{"app":"steemit\/0.2"}
created2021-10-21 15:18:21
last_update2021-10-21 15:18:21
depth2
children2
net_rshares5,223,735,011
last_payout2021-10-28 15:18:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length492
author_reputation106,605,049,898,479
root_title"Liquidity pools: What are they?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@crypto.piotr ·
hi @joelagbo

I've small question related to liquidity pools and impermanent loss.

I'm trying to wrap my head around it and based on my understanding: 
- currently price of RBS is 0.2$ 
- I would add my funds to liquidity pool (pair RBS-BUSD) in relation: 1000 usd / 1000 usd 

in that case I would need 5000 RBS tokens and 1000 usd worth od BUSD. Is that correct?

-------

Now, what would happen if price of RBS would:
a) scenario one: RBS would drop down to 0.1$  (50% drop)
b) scenario two: RBS would go up to 0.4% (100% increase)

I presume that the moment I exit liquidity pool, then I would end up still with 1000usd worth of BUSD, but amount of RBS tokens would be different.
Now, my question is: how many RBS tokens would I have at the end of the day (depending on the scenario).

Enjoy your weekend buddy,
Yours, Piotr
properties (22)
post_id94,935,390
authorcrypto.piotr
permlinkr1cvm5
categoryhive-101145
json_metadata{"users":["joelagbo"],"app":"steemit\/0.2"}
created2021-10-22 01:47:00
last_update2021-10-22 01:47:00
depth3
children1
net_rshares0
last_payout2021-10-29 01:47:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length829
author_reputation125,570,865,859,056
root_title"Liquidity pools: What are they?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000