Skip to main content
  • Comparisons
  • THORChain & ZetaChain
On this page

ZetaChain

Cross-Chain Message Passing (CCMP)

  1. An end user interacts with a Contract C1 on Chain A.
  2. The interaction leaves an event or transaction memo, with user specified [chainID, contractAddress, message]. (the message is arbitrarily encoded application data in binary format.
  3. ZetaChain observers (in zetaclient) pick up this event/memo and report to zetacore, which verifies the inbound transaction.
  4. zetacore modifies the CCTX (cross-chain tx) state variable with OutboundTxParams which instructs the TSS signers (in zetaclient) to build, sign, and broadcast external transaction.
  5. The zetaclient TSS signers observe the OutboundTxParams in the CCTX, and build outbound tx, enter into a TSS keysign ceremony to sign the transaction, and then broadcast the signed transaction to the external blockchains. For CCMP, the outbound transaction is mainly calling the user specified contract with specified addresses and parameters.
  6. The CCTX structure also tracks the stages/status of the cross-chain transaction.
  7. Once the broadcasted transaction is included in one of the blocks (said to be “mined” or “confirmed”), zetaclients will report such confirmation to zetacore, which will update the CCTX status.
  8. If the “confirmed” outbound transaction was successful, the CCTX status becomes OutboundMined, and the CCTX is considered in its terminal state and will not be updated anymore. This CCTX processing is completed.
  9. If the “confirmed” outbound transaction is failure (e.g. revert on Ethereum chains), then the CCTX will updates it status to PendingRevert if possible, or Aborted if revert is not possible. The CCTX processing is completed if it goes to Aborted status.
  10. If the new status is “PendingRevert”, a second OutboundTxParams should be already in the CCTX, which instructs the zetaclients to create a “Revert” outbound tx to the incoming chain & contract, allowing the incoming contract to implement a application level revert function to cleanup contract state.
  11. The zetaclients will build the revert transaction, enter into TSS keysign ceremony to sign the transaction, and broadcast to the incoming blockchain (Chain A in this case).
  12. Once the revert transaction is “confirmed” on Chain A, the zetaclients will report the transaction status to zetacore.
  13. If the revert transaction is successful, the CCTX status becomes Reverted, and the CCTX processing is completed.
  14. If the revert transaction is failure, the CCTX status becomes Aborted, and the CCTX processing is completed.

CCMP success

success

CCMP failure

failure

Comparison Table