Liquidity Ratios
April 10th, 2022

Common questions:
● Why does the price of an asset on Uni/Pancake/Sushi change in USD when there are no buys/sells?
● How does Trading View calculate the USDC price chart, and why is it different from the ETH price chart?

The rules listed below will be denominated in ETH as the base pair; other base pairs can be used as well, the same mathematical rules apply if you use BNB as the base pair for example. If the primary base pair for the asset is either USDC or BUSD, then there are less rules to follow due to the base pair not having any volatility.

To begin, the price of an asset, we will use asset Z for this document, is tied to the amount of ETH and Z in the liquidity pool. The USD has no bearing over the price of Z, if not for the psychological sell pressures at round values. The USD chart is completely calculated based upon the price of ETH, and the [ETH:Z] ratio in the liquidity pool. This is best shown through example.


Scenario 0 (base):
Let's say there is 200 ETH and 200,000 Z in liquidity.

This means that for every 1 ETH, there are 1,000 Z. Or, for every 1 Z, there is 0.001 ETH.

At the price of $4,000/ETH, in this example, then 1 Z = 0.001 ETH = $4

Scenario 1: Eth down, no buy/sell
IF the price of ETH changes to $3900, AND there are no buys or sells (so there is still 200 ETH and 200K Z), then 1 Z = 0.001 ETH = $3.90

However, IF the price of ETH changes and there is a buy or sell, it changes in accordance to both the ETH price change and the liquidity ratio change.

Scenario 2: Eth down, with buy

IF ether drops to $3900, AND a buy of 2,000 Z for 2 ETH occurs, then the new liquidity ratio is
202eth : 198,Z

0.001020202 ETH/Z

So now
1 Z = 0.001020202 eth

0.001020202 ETH × $3900 = $3.9787878

Scenario 3: Eth up, no buy/sell
IF the price of ETH changes to $4,100, AND no buys/sells occur, then 1 Z = 0.001 with = $4.10

Scenario 4: Eth up, with buy

IF the price of ether changes to $4,100, AND a buy of 2,000 Z for 2 ETH occurs, then the new liquidity ratio is
202ETH : 198,000Z

0.001020202 ETH/Z

So now
1 Z = 0.001020202 ETH

0.001020202 ETH × $4,100 = $4.1828282

Summary Prices
Scenario 0: 200ETH:200k Z @ $4,000/ETH = $4.00 / Z

Scenario 1: 200ETH:200k Z @ $3,900/ETH = $3.90 / Z

Scenario 2: 202ETH:198k Z @ $3,900/ETH = $3.9787878 / Z

Scenario 3: 200ETH:200k Z @ $4,100/ETH = $4.10 / Z

Scenario 4: 202ETH:198k Z @ $4,100/ETH = $4.1828282 / Z

There are 9 total scenarios that are calculated, including scenario 0. Each scenario is a combination of the ETH price rising, falling, or staying the same, crossed with EITHER a buy or a sell a occurring, OR neither a buy nor a sell occurring.

Note: The reason that stablecoin base pairs are simpler is because stablecoin values stay the same. This means that the price is a direct ratio of the liquidity pool Z:USDC, simply take the amount of Z in the pool and divide it by the amount of USDC in the pool and you get the price.


In conclusion, the Z:USDC graph on Dextools or Trading View basically does the previously mentioned set of 9 possible functions for every change of ETH price, and for every buy or sell of Z. Although the USD has no technical bearing over the price of Z, the Z/USD pair can still be calculated as above. For many investors it is more natural, or easier, to see how the price of an asset changes in USD, since that's the world reserve currency.

If you have any questions regarding this write up, I'm happy to answer in TG.

Subscribe to monkeydluffy.eth
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.
More from monkeydluffy.eth

Skeleton

Skeleton

Skeleton