You are viewing a single comment's thread from:

RE: An Example How Uniswap Calculate The Price Of The Tokens and What Happens When A Swap Is Made

in LeoFinance4 years ago

Would it be fair to say that price isn't even applicable here?
Realistically it's just the ratio (1A = ?B)
Price on other exchanges let's us know if the ratio on uniswap presents an arbitrage opportunity.

Sort:  

Its a ratio yes. But its not guided from the other exchanges price. A lot of these tokens are listed on uniswap only. The sushi token was listed in uniswap only and had 200+ M marketcap. Later binance listed it.

So no need for reference price.

I'm trying to build up an analogy in my head. If I add equal values for A and B, and A is heading to zero; as that happens, people are going to be dumping heaps of A into the pool for less and less B.
Does that mean that assuming both tokens have the same chance of going to zero, providing liquidity doubles the chances of a contributor losing the value they put in?
If I'm holding A and B in my wallet and one of them goes bust, I still have the other; but if I'm holding them both in a uniswap smart contract and one of them goes bust, that's all I'm going to be left holding, right?

Yes, that is the risk. If more and more swaps happens in one direction only, you as liquidity provider will have more from the token that its been sold, and at the same time at lower price of that token.

Now with some liquidity in, as the price of the token drops more and more, it will become harder to push the price lower. At some point it will reach some bottom that will not be zero, but close to it.

Lets say for LEO :)
If there is 30k/30k liquidity pool, and a lot of people are selling leo, at some point the leo price will drop maybe under 1 cent (highly unlikely :), and you will need 100k leo (less than 1000$ worth at that price) to push the price even further. Having in mind that a lot of the leo tokens are locked for curation, or they will be in the liquidity pool, there will be maybe 100k, or 200k leo trading/swapping around.

Basically what this means is when certain token reach some liquidity (and has healthy distribution, no dev fund, funders fund with 50% share or something) his price is more or less guarantied to a certain degree. Off course nothings for sure :)

Perfect, thanks. Just what I thought. I don't believe it constitutes an existential threat to a token like LEO; and Ethereum's not going anywhere; just trying to wrap my head around it all. When you mention the price, uniswap doesn't refer directly to any other exchange; so would you say it prices A in terms of B and B in terms of A, and that's it? More a ratio than a "price".

Its an interesting thing, and if nothing else at least we are learning something.

LEO is priced in terms of ETH. Not the other way around. ETH is the base.

The interesting point here is how Uniswap takes the price of ETH in dollar terms. There must be some oracles (that how they call them) that provide trusted ETH $ price.

Having trusted oracles, (data sources to outside systems) its a business of its own. For example LINK that has exploded this year its only function is that. To provide reliable data from the outside world to the blockchain.

Whats even more amazing is that Hive/Steem has a sort of oracle of its own for the Hive price. The top 20 witnesses do this in a decentralized manner. All of the top 20 witnesses provide a price input for Hive, from the outside exchanges into the Hive blockchain, from where the blockchain calculates the debt and the issuance of the HBD.

What would uniswap use the price of ETH for exactly?

To set the price of the token. As from the example above:

TokenPrice = (100 ETH * ETH Price) / 100k TokenA = 0.35

Otherwise it will be just one unit against another, with no common denominator.

Having in mind that a lot of the leo tokens are locked for curation ...

How can it be locked for curation if you've swapped it? That would be like having the same money in the bank and the stock market at the same time. Aren't you limited to doing one or the other?

I'm just point out the overall supply of the token. Up until the wLEO anouncment and the incentives, 90% of the token was staked. Now the whales are unstaking and will move to liquidity providers on eth.

For sure you can not have them on both places :)

Ones they are unstaked and wrapped on eth, they are there only.
Still not everyone will move and a lot of the tokens will remain staked, constraining the supply.

Thank you for your engagement on this post, you have recieved ENGAGE tokens.

Thanks for that clarification!

!ENGAGE 50

Have you studied the spread between the "real-time" price of a buy and that of a sell?

There is something call sliperage. If that is what you are refering to. You can adjust the sliperage on Uniswap if your swap affect the price a lot. You can set it to 10% even 20%

It's not exactly slippage (https://www.investopedia.com/terms/s/slippage.asp)

I'm referring to the spread.

Similar to blocktrades exchange. There are no buy or sell orders. You can't put orders on Uniswap as well, just swap token in the moment.

When you go to swap xyz coin, the interface gives you an estimate of how many abc coins you are going to get in exchange. Do that first on the buy side and calculate the price. Then do the opppsite on the sell side (i.e. sell abc for xyz) and calculate the price. I'll venture a guess that the difference is at least 10%, maybe more. That's the spead, and that's the real cost the customer pays (over and above any fees and commission costs that there might be).

No 10% is to much and it happens only to low liquid coins. Usualy its far less bellow 1%

Screenshot_20200911-120828_Chrome.jpg

Check the screenshot above. There is a price impact note bellow. Its less than 0.01%

10% or more can happen only in very low liquid tokens.

That's ETH-USDT. That's the platform's main trading pair. The main pair usually has a spread around 2%. (But there are 'gas' fees to take into account here.)

You need to look at a minor pair like wLeo-ETH, and you need to look at both what it would cost you to buy and what you would get if you sold, and then calculate the difference.

Uniswap will calculate it for me :)
Just as for the examole above. This is beffore you execute the swap.