Incognito pDEX is the first-ever private cross-chain decentralized crypto exchange in the blockchain space. In the current phase, the interoperable setup of pDEX with non-Ether cryptocurrencies such as Bitcoin or Monero is still trusted. However, after turning your BTC or XMR into their privacy version via the trusted bridge, you can still swap XMR <> BTC back & forth with no one able to track your swapping activities on the DEX thanks to the trustlessness & privacy by design of pDEX. So currently, think of pDEX as an improved experience of trusted swapping services such as changenow, MorphToken or xmr.to with the anonymity going along.
After turning BTC & XMR to privacy version, now you have pBTC & pXMR in your hand. If you put them into pDEX and do the swap now, you might encounter unexpectedly bad rates because of the small liquidity pool sizes of pBTC <> pXMR pairs. The purpose of this article is to recommend you a way to swap XMR <> BTC on pDEX with normal rates: using PRV as the middleman and your swap can be done on 2 pairs PRV <> pBTC and PRV <> pXMR.
How Incognito pDEX works
Let’s mention a bit of how pDEX works. The order matching method on pDEX is automated market maker algorithm, which is the same as the order matching method of Uniswap. You don’t exchange your coins with anyone’s but with the liquidity pools
Let’s say you are trading the pBTC <> pXMR pair with the 2 liquidity pools of pBTC & pXMR. When you use pBTC to buy pXMR, it means that you send your pBTC into the pBTC pool and the pXMR you get will be extracted from the pXMR pool. The similar thing happens when you use pXMR to buy pBTC. The rule here is
Current pBTC pool size x Current pXMR pool size
= New pBTC pool size x New pXMR pool size
(new pools means the pools after your trade)
From the mathematical perspective, since the equality above needs to be maintained, you can see that the larger pBTC or pXMR you send in the pools, the huger the changes you can make of the pool sizes. If you trade with a very big amount of assets compared to the current pool sizes, you can end up getting the unexpectedly higher exchange price compared to which on other public exchanges. For example,
The 2 current pool sizes are 0.01 pBTC & 0.66 pXMR.
You swap 0.1 pBTC to pXMR
=> 2 new pool sizes are 0.11 pBTC & 0.06 pXMR
('cause 0.01* 0.66 = 0.11*0.06)
=> You exchange 0.1 pBTC to 0.6 pXMR (0.66-0.06)
=> The price you get is 1 pXMR = 0.166 pBTC, much higher compared to the price on public exchanges (1 XMR = 0.0072 BTC)
Swap privately XMR <> BTC (practical instruction for the present)
The pBTC and pXMR pool sizes used to be quite high, enough for you to trade back and forth pBTC & pXMR with normal volumes & rates. On April 10th, the day we launched the pDEX mining program for PRV-related pairs, it seems like folks withdrew liquidities out of the pBTC <> pXMR pair to add liquidities to PRV <> pXMR and PRV <> pBTC pairs, an activity which is purely market-driven and isn’t controlled by anyone.
At the moment, you should use PRV as the middleman when privately swapping XMR <> BTC. The liquidity pools or PRV <> pBTC & PRV <> pXMR are large now and you can trade pBTC & pXMR to PRV without getting unexpectedly high price. So for example, to trade pXMR to pBTC, you trade pXMR to PRV and then trade PRV to pBTC .
Step 1: Trade 1 pXMR to PRV
Current pool sizes of pXMR <> PRV are 175.6 pXMR & 17,718.28 PRV.
You put in 1 pXMR into pXMR pool
=> 2 new pool sizes are 176.6 pXMR & 17,617.95 PRV
(175.6 * 17,718.28 = 176.6 * 17,465.95)
=> You exchange 1 pXMR to 100.33 PRV (17,718.28 - 17,617.95)
Step 2: Trade 100.33 PRV to pBTC
Current pool sizes of PRV <> pBTC are 123,147.1 PRV & 8.93 pBTC.
You put in 100.33 PRV into PRV pool
=> 2 new pool sizes are 123,247.43 PRV & 8.923 pBTC
(123,147.1 * 8.93 = 123,247.43 * 8.923)
=> You exchange 100.33 PRV to 0.0073 pBTC (8.93- 8.923)
Finally you end up exchanging 1 pXMR = 0.0073 pBTC as you do on public exchanges. Then here you go, swap XMR <> BTC in confidentiality with normal rates!