Atomic Exchange Transactions on a Blockchain
Practical demonstration of an atomic exchange transaction, also called a delivery-versus-payment, or DvP for short.
In this tutorial, we will focus on exchanges of two different assets between two counterparties.
A blockchain transaction can have multiple inputs and outputs, and each one can relate to a different address on the blockchain.
This enables a single transaction to perform an asset exchange between two or more parties, for example sending a dollar-denominated asset from A to B, while simultaneously sending a Euro-denominated asset from B to A.
Because the exchange takes place in a single transaction, it comes with a guarantee of atomicity, meaning that all of the asset transfers take place simultaneously, or none take place at all.
In the finance world, this type of transaction is termed delivery-versus-payment, or DvP for short.
The original tutorial is at:
https://www.multichain.com/developers/atomic-exchange-transactions/