- Input Output Hong Kong (IOHK) has published a paper on Cardano’s new Extended UTXO (EUTXO) model.
- The EUTXO model will lay the foundation for Cardano’s smart contracts in the Goguen phase.
Input Output Hong Kong (IOHK), the company responsible for the development of Cardano (ADA), recently published a formalization of how smart contracts will be implemented in the next development phase (Goguen) of Cardano. Cardano is currently in phase 2, Shelley. Shelley provides the staking functionality and is intended to lay the foundation for the decentralization of the network.
Phase 3, Goguen, will add the ability to develop smart contracts and decentralized applications (dApps) based on Cardano. The publication of the new paper is a formalization of the model that Cardano’s smart contract language Plutus uses, which is available on a test platform since December 2018.
Cardano uses a mix of the ledger models of Bitcoin and Ethereum
The two leading cryptocurrencies, Bitcoin and Ethereum, use two different ledger models, known as the UTXO model (Bitcoin) and the accounts model (Ethereum). As IOHK writes in the paper, both models offer specific advantages, which is why Cardano will implement a mix of both models.
In principle, the account model of Ethereum is more suitable to enable smart contracts. On the other hand, Bitcoin’s UTXO is a semantic model that remains simple in a complex and distributed environment and requires fewer resources. For this reason, IOHK has designed the Extended UTXO (EUTXO) model, which is an extension of Bitcoin’s UTXO model.
With Bitcoin, every transaction is based on the concept of output and input, i.e. the representation of certain BTC amounts. For a transaction, Bitcoin in the form of various inputs are selected and formed into an output. The output in Bitcoin is therefore not a single data byte. Instead, multiple fractions of Bitcoin are retrieved by the algorithm to meet an output requirement. For example, the transaction (output) from a BTC can be in the form of 3 inputs (0.3 BTC, 0.3 BTC and 0.4 BTC). The changes are sent to the UTXO database.
The Cardano researchers explained that although this model “works well with the concurrent and distributed nature of blockchains,” it has severe limitations on programmability – making it impractical for most smart contracts. In contrast, Ethereum’s account-based ledger allows for complex calculations, but must introduce a “common state”, a sort of collective memory of all transactions and contracts. The paper states:
Nevertheless, the UTXO model, generally, and Bitcoin, specifically, has beencriticised for the limited expressiveness of programmability achieved by the val-idator concept. In particular, Ethereum’saccount-based ledgerand the associatednotion ofcontract accountshas been motivated by the desire to overcome thoselimitations.
Unfortunately, it does so by introducing a notion of shared mutablestate, which significantly complicates the semantics of contract code. In par-ticular, contract authors need to understand the subtleties of this semantics orrisk introducing security issues.
That’ s why Cardano’s EUTXO model is better
Cardano’s EUTXO model enables the execution of a smart contract in several transactions. Each transaction output will have a data field that can contain any information associated with a particular smart contract:
The first change is that we allow transaction outputs to carry adata valuealong with the validator, which is passed in as an additional argument duringvalidation. This allows a contract to carry some state (the data) without chang-ing its “code” (the validator). We will use this to carry the state of our statemachines.
In addition, the system ensures that a given chain of outputs uses the same contract code – a concept called contract continuity:
6Chakravarty et al.The second change is that the validator receives some information about thetransaction that is being validated. This information is passed in as an additionalargument of typeTxInfo. The additional information enables the validator toenforce much stronger conditions than is possible with a bare UTXO model —in particular, it can inspect theoutputsof the current transaction, which isessential for ensuring contract continuity.
A third change is that IOHK “will allow some access to time” by “adding a validity interval to transactions”.
While Shelley and Goguen are currently being developed in parallel, for both phases it is not yet clear when the transfer to the Mainnet will take place. Most recently, Charles Hoskinson stated that Shelley should be completed in the first quarter of 2020. According to Cardano’s roadmap, Goguen should also follow in 2020. However, the release dates are still uncertain due to the delays Cardano has experienced in the past.
Last Updated on 29 January, 2020
The EUTXO model will lay the foundation for Cardano’s smart contracts in […]