Figure 2: Hybrid UTXO-account flow
The UTXO and account-based transaction model support transaction atomicity and safety differently. In the UTXO model, the application must ensure atomic transactions because the UTXO transaction cannot modify the global state and there is no issue of partial execution. In the account-based model, the virtual machine should ensure the atomicity of transactions. In a cross-blockchain context, effecting state changes on external blockchains is asynchronous, and it’s difficult to revert a partially executed transaction if it commits to an external blockchain. This makes it challenging to support a pure account-based smart contract platform such as EVM cross blockchain.
In order to support cross-blockchain transaction atomicity and ensure safety, the ZetaChain smart contract virtual machine is constrained in the following ways:
Each UTXO can only generate one output
Event
. Essentially only one external chain can update its state in response to an UTXO. Because outbound transactions on external chains are generally not revertible (sent tokens cannot be taken back for example), multiple output Events
would make it infeasible to revert the whole transaction.
All value transfers cross-blockchain must be in ZETA, because only the ZETA coin is within control of the ZetaChain system and can be reverted (refunded) if the cross-blockchain transaction fails.
Note, certain more complicated smart contracts that require multiple output transactions (for example, must send to multiple chains) will be best written as multiple-stage transactions where the application itself handles atomicity of the multi-stage transaction.
Many features go into creating a truly omnichain interoperability solution that can stand the test of time. At its core, the solution must be chain-agnostic, have a sustainable security/trust model, and function well while operating affordably. ZetaChain brings an immense level of innovation to blockchain technology and distributed computing to fulfill each of these prerequisites. Specifically, the focus of this piece is on the ZVM, and its novel approach to blockchain transaction “bookkeeping”. This is one of many breakthrough components that enable smart contracts to interact with states on external chains directly. For the first time in crypto, ZetaChain makes available a public, decentralized blockchain with built-in omnichain interoperability.
ZetaChain is the foundational layer to a multichain future. The novel blockchain enables multichain functionality without using bridges or wrapped tokens and the easy deployment of omnichain-dApps, or odApps. These applications can manage and connect data and value across all smart contract platforms as well as non-smart contract platforms like Bitcoin and Dogecoin.