By the way, I have a question - how exactly XCP will support paying in BTC for asset or XCP?
The offered BTC will be matched to offers on asset/Dex, and once the buyer sends the bTC to seller address, the seller will then send back XCP or asset shares back to the buyer BTC address?
Let's say Alice is selling BTC for XCP with a 5 block expiration on her order and Sally is selling XCP for BTC with a 3 block expiration on her order, and their orders get matched. Upon the matching, the protocol debits the XCP from Sally's account, and then Alice has 3 blocks to send Sally her BTC using the
btc-pay command. If Alice fails to send Sally BTC within 3 blocks, the deal is cancelled and Sally's account gets re-credited with the XCP.
Is there a way to set it up so the btcpay is done automatically?
No. The protocol can only debit assets that are created within the protocol, and BTC is not one of them.
It is important to note however that while payment is not automatic, there is nevertheless no counterparty risk. Moreover, the protocol will match Alice's order with Sally's only if Alice's
fee_provided is greater than or equal to Sally's
fee_required; these fees are miners' fees and are in BTC. Therefore, Sally can make her
fee_required sufficiently high so that Alice is discouraged from putting up a BTC for XCP order which she fails to send.
fee_required is necessary if and only if one is buying BTC and
fee_provided is required if and only if one is selling BTC.
EDIT: miswrote something.