The DEX is a cost-effective, convenient and low risk way of trading between XCP and BTC.
If Alice and Bob agree to trade 10,000 XCP for 35 BTC, they need to do this:
-
Alice places an offer to sell 10,000 XCP for 35 BTC with a very short three block deadline. The protocol escrows 10,000 of Alice’s XCP.
-
Simultaneously Bob places an opposing bid.
-
The protocol matches the orders and gives Bob 20 blocks to make the Bitcoin transfer.
-
Bob makes the BTC transfer.
That’s all! Trade is done!
Now there are some risks involved:
-
If Bob’s transfer takes more than 20 blocks to confirm, Alice’s XCP are no longer in escrow and she receives the BTC without giving Bob XCP in return.
-
Good software will use high priority fees and prevent this stuck-in-mempool concern. But even if it does get stuck, it’s relatively simple to chain transactions to make the stuck one go through in time.
-
After Alice places an order and before Bob makes a matching order, the price may move against Bob. If a significant move, Bob will be better off not placing the order.
-
Therefore it’s actually better if Bob’s the first one to place an order. Alice,if really questioning Bob, may wait for his order to confirm first, but in most cases they’ll be okay placing orders simultaneously. Both will use short deadlines.
-
During the 20 block BTCpay window Bob has a chance of backing out. This is about three and half hours of exchange rate risk for Alice.
-
However, for Bob it’s risky to wait too long. If the BTC transfer doesn’t confirm within the 20 block deadline, Alice will receive the BTC but not give Bob any XCP.
The advantages:
-
The example transaction is about $100,000 worth. Traditional exchanges take about ~0.2% or about $100 fee each. Counterparty’s fee is zero.
-
Centralized exchanges are risky in that they may lose your funds (get hacked) or annoying in that they delay deposits and withdrawals. Counteraprty only takes ~10 minutes to confirm (and Alice and Bob should agree to place their matching orders, so only ~10 minutes to wait for BTCpay and if Bob’s honest he’ll soon after send the BTC or in worst case wait near 20 blocks to do so)
-
It works with any asset against BTC. Can be PEPECASH-BTC, FLDC-BTC, you name it.
-
Oh yes, and for XCP-asset or asset-asset it’s even easier … in case you didn’t know
NOTE: Counterwallet does not currently support BTCPAY. Any wallet that does?