Understanding BTCpay and BTC/TOKEN on the DEx

Every pair in the “Exchanges” tab using the BTC/TOKEN or TOKEN/BTC is using the BTCpay exchange market, as Freewallet utilizes the Counterparty BTCpay function to complete these orders. Keep in mind this functionality is very old, has a bug associated with it and is NOT the common way the Counterparty Community trades assets using Counterparty and Freewallet. Most users use Dispensers and The Counterparty DEx using XCP or Token to Token trades.

These orders do not function like XCP/TOKEN or TOKEN/TOKEN2 type orders. For the BTC side of the order to fill a second bitcoin broadcast and transaction must be completed and very specific steps to follow.

This process can be done by Freewallet automatically or done manually.

Take note a protocol bug was found recently that does NOT match any orders below 0.001 BTC. This has been brought to the attention of the Counterparty Community and laid out in detail here. Please take note of this issue right now before placing a BTC order for less than 0.001 BTC at this time.

It is also important to note that the user in the order that is transacting BTC is required to also keep Freewallet open for the order match to occur (as well as the second Bitcoin broadcast mentioned above).

Auto-BTCpay only works for for using BTC if:

  1. Freewallet is OPEN and listening for order matches. If the wallet is closed and an order match happens in which you are the buyer using BTC, no BTC will be sent and the order match will expire.

  2. The order is matched within 20 blocks. After 20 blocks have passed, the BTCpay order will expire.

While this feature looks as simple as the Counterparty DEx for XCP and Tokens, it is not for beginner or even intermediate users. This process is used primarily when cooperation between both parties (Seller and Buyer) agree on price and process beforehand for this trustless BTCpay process to be worth using in a serious capacity.

The process of how you view the BTCpay exchange pairs is the same as with Counterparty DEx orders

First navigate to the “Exchanges” tab in the top of Freewallet. You can browse BTCpay order markets under the BTC tab and you can also use the search bar in the top right to search for individual tokens or specific BTC/TOKEN pairs.

The process of viewing the market, setting your price and placing your order is the same as described in the Buying and Selling Tokens on the DEx except for one key difference in the settings when placing your order:

In this example of a BTCpay buy order to Buy 1 RAREAIRDROP for 0.002 BTC, the “Expires” and “Fee” entries are identical to the inputs as seen in Buying and Selling Tokens on the DEx but the extra Auto-BTCPay option is now shown.

It is highly recommended to put this setting on “Yes – Automatically sign & broadcast BTCpay transactions".

For use of this feature in Freewallet, also orient yourself with the popup Freewallet asks to “Enable Auto BTCpay”.

The Auto-BTCpay function will only work if you enable it when this popup occurs. This function will successfully fill orders in which you are the user in the order using BTC to complete.

Once you finalize your order and broadcast it to the Bitcoin network, you can view your transaction information the same as any other transaction by clicking “View Transaction.”

If you selected “Yes – AutoBTCpay” during the order creation Freewallet will fill this order automatically if you and the opposite party involved followed the steps above correctly (leaving the wallet open and matching within 20 blocks).

The process of Freewallet confirming this order and then automatically signing and broadcasting the next transaction may take some time. It is important to be patient here and to leave Freewallet open throughout this time period.

If your order isn’t matched within a certain timeframe (exactly 20 blocks) it be cancelled automatically and the tokens (or BTC) will be returned to your wallet.

To cancel your order manually when it is still active please reference Cancelling Exchange Orders.

Last updated