Delivery-versus-payment stages

+1 vote

I am trying to replay the sequence of actions for  DvP in more layman terms. Can you please help and confirm if my interpretation is correct ?


Locks the asset-1 to be transferred from Party A. Uses Party A’s private key and generates a txn-id


Creates a bid/ask offer with the txn-id and equivalent asset-2 quantity to be received. The public key address is also enclosed.

On second node (counterparty)



Locks the asset-2 equivalent  from Party B. Uses Party B’s private key and generates a txn-id


Accepts/confirms “Offer” from party A in exchange for asset-2 locked above.


Notification to mining nodes to update the blockchain with the transaction and the balances. Public key/signed Private key of both the parties are embedded in the block.

Can you explain what is happening in appendrawexchange in more Bitcoin jargon?

asked Aug 31, 2015 by anonymous

1 Answer

0 votes

In general your understanding is correct. Some additional comments:

  • preparelockunspent also sends that new transaction which places precisely the asset/s and quantity/ies requested in a single transaction output (txid + vout values).

  • createrawexchange places the output of preparelockunspent into the new transaction which will perform the exchange and includes the public key of Party A.

  • appendrawexchange - the mechanism is by adding to the partial transaction that was created in createrawexchange. An additional input and output are added to the partial transaction that was previously created by createrawexchange, so that the transaction is now balanced, i.e. same assets and quantities in inputs and outputs. This renders it valid for transmission and confirmation. 

  • sendrawtransaction - not quite a direct notification to mining nodes. Rather, the complete transaction is broadcast to the network, replicated in the usual peer-to-peer way, and then miners pick it up and include it in a block. 

answered Aug 31, 2015 by MultiChain