DEC & Uniswap - How Does That Work?

By nealmcspadden | Monster Maverick | 10 Oct 2020

During last night's AMA with @aggroed@jarvie was asking how the price of DEC was determined now that the game is using the Uniswap pool. In this video I go through how that is calculated.

Uniswap is actually very simple. You have two assets that are equal in value by definition.

If you change one by adding to the pool (user sells to the pool), then the amount that comes out from the other side has to balance the product. It's a simple inverse relationship.

If you want to read the Uniswap white paper on the calculations, check it out here:

In my calculations in the video, I neglected the last step of fee add-backs to the pool. It's close enough and I didn't want to get to bogged down in the details. My simplified calculations are within 1.6%



In the chart below, you can see the inverse relationship between DEC and ETH in the pool:


I got these values from entering swap trades.


You can see that as you sell into the pool in larger and larger amounts, the price you are paying gets worse and worse. So if you pay 500 ETH for DEC, you end up with 71M DEC. But if you double the ETH and pay 1000 ETH, you only get 85M DEC. So that is the market feedback that mitigates large traders from pushing the market every which way.

Similarly, you can see that at the extremes of selling DEC into the pool, you get way less bang for your crystal.

I hope this helps clear up how the Uniswap market works.

Originally Posted Using LeoFinance

How do you rate this article?



Just an anarcho-capitalist living the good life.

Monster Maverick
Monster Maverick

My blog covering blockchain gaming content including Monster Maverick Show replays, updates, and more.

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.