What BTC sellers on the Counterparty Distributed Exchange need to know?


Starting November 5, 2014, the BTC Sell functionality has been removed from Counterwallet, but retained on the protocol level. This information still applies, but the interface is accessible only via the CLI and API.


Trading on the Counterparty Distributed Exchange (DEx) currently treats bitcoin sell order differently.

The core reason is that it is impossible to escrow BTC without a trusted mididle man. Because Counterparty’s mission is to allow secure P2P trading without a counterparty risk, “BTC sell” orders have to be treated differently.

That, combined with the relative complexity of blockchain and DEx transactions, has been causing problems to some BTC sellers. This article explains how BTC selling and BTC_Pay work and is intended to make the DEx experience better.


In the ideal scenario BTC seller who wants to buy XCP (or any Counterparty asset) logs on to his wallet, navigates to Exchange and places a “BTC sell” order for XCP that matches or nearly matches the best (cheapest) XCP seller’s price. Then the order is either instantly matched (if he price is the same) or this BTC seller needs to stay logged on for a while until one of XCP sellers lowers his price. Assuming that this happens or the desired price was already available, his order will be matched and then he will need to send BTC to the XCP seller(s) with whom the DEx matched his BTC sell order.

As explained in this BTC_Pay article here, after the seller’s BTC sell order is matched, Counterwallet internal feed that shows notification on the Counterwallet clock icon notify the user that his order has been matched and is “Waiting [for] BTCpay”.

There are two ways this can happen and in both cases the BTC seller must remain be online when payment is being made because Counterwallet cannot access one’s wallet (address) when he is not logged on:

  1. The default setting in Counterwallet is Auto BTC Pay. That means that Counterwallet will automatically make BTC_Pay to the XCP seller’s account.

  2. Should the user not want to have Counterwallet work that way, he can disable that setting. Then he has to make the payment manually within 20 bitcoin blocks from the moment a match has been made. For example, let’s say one’s order was matched in block 322222. The BTC seller would have to watch out for matches and manually transfer matched amount to the address of XCP seller. It is possible that one buy XCP order gets matched with more than one XCP sell order, so multiple transfers of sub-total amounts would have to be made.

NOTE: These procedures do not apply to XCP (or Counterparty-issued assets) because they can be taken into escrow by the Counterparty protocol.

Should the BTC seller happen to not have enough BTC to pay, he can still quickly (within 20 blocks from the moment his offer was matched) transfer BTC from elsewhere to his Counterwallet BTC account that needs to make BTC_Pay.

Let’s now consider a less successful scenario, in which the BTC seller logs out from Counterwallet before BTC_Pay has been done, or does not have enough BTC to pay.

What happens is this:

  1. His order may get matched with some XCP seller’s offer to sell XCP for BTC

  2. He is not logged on to Counterwallet or does not have enough BTC to pay within 20 blocks from the moment the match happened

  3. BTC_Pay fails and the DEx returns his “BTC sell” order to the matching pool and so on. This will go on until the order expires or is completed (matched and paid).

After a failed BTC_Pay event our BTC seller could log on and find his order in Exchange > My Orders and Cancel it as explained here.

But if his order got already matched with another XCP sell order, he may find no pending orders that he can cancel. He is again faced with a choice to perform manual BTC_Pay (if he can accomplish that safely within 20 blocks from the moment this match has been made) or transfer some BTC to his account (if that’s the reason why he cannot pay).

He could of course decide to wait 20 (or less) blocks for the current BTC_Pay to fail and then try to cancel the order (Exchange > My Orders) before it gets matched again.

By default (this can be changed in Counterwallet’s Advanced Options) the order expiry time is 2000 blocks from the moment the order was placed, so it is possible that one order can be matched many times (theoretically close to 100 times (2000 blocks / 20 blocks deadline to make BTC_Pay)).

Good practices

  • To discourage fake (“troll”) BTC sell orders, currently the default transaction fee for BTC sellers is slightly over 1% (see this KB article about fees on the DEx). That is why it is not wise to make sell BTC orders that one does not intend to successfully complete (even if the order doesn’t get matched, the fee is still charged). As explained above, XCP and other Counterparty assets can already be safely escrowed so the fees for them are much lower.

  • Because of that, if one is selling BTC and cannot afford to wait online long enough for a match to happen, it may be better to place “realistically” priced orders, or be ready to log on every 15 or so blocks to see if a BTC_Pay needs to be made.

Where to find information about orders, matches and so on?

  1. Current blockchain block can be found at the top of blockchain.info or at the bottom of Counterwallet’s Advanced Options.

  2. Details of your Counterparty (XCP and assets/tokens/coins issued on Counterparty) orders on the blockchain can be found in Counterwallet (History, My Orders, etc.) and in a Counterparty block explorer such as http://blockscan.com/balance.aspx?q=YOURADDRESS

  3. Details of your bitcoin transactions and amounts can be found in Counterwallet and at https://blockchain.info/address/YOURADDRESS.

Note: blockscan.com currently does not show details of Bitcoin transactions so it may be useful to look up both blockscan.com and blockchain.info transaction records.