Cross-chain atomic transactions

To ensure the atomicity of transactions, we design the following protocol:

The user initiates a cross-chain transaction on edge chain A. The main chain automatically listens to the transaction events of chain A and records them (because of the multi-signature witness method, there is redundancy in the transaction records, and we will introduce how to deal with the problem of change later). The main chain checks the events on chain A and forwards them to edge chain B. Because sufficient funds are needed to release on chain B, there are two cases: if the funds are sufficient to meet the release criteria, the transaction is successful and recorded on the main chain; if the funds are insufficient to release, the transaction must fail, and the main chain will return the assets of the transaction initiated by the user on chain A to the user, i.e., initiate a fallback transaction.

Last updated