Join our Dutch Cardano Bitterbal Stakepool (Ticker BITB)

Stake with us!
Menu Close

Cardano's eUTXO model explained to a five-year-old

Cardano is fundamentally different from Ethereum in its accounting model. While Cardano uses the extended UTXO model (eUTXO), Ethereum uses an account model. In this article, we will explain the difference between these approaches in a simplified way.

Accounting model

You can think of a blockchain as a ledger, a history of accounting written by a bookkeeper. The ledger is open, so all data can be viewed by all accountants, but also by all users at any time. In our analogy, the accountants represent the network. Imagine that accountants are in a bank and are approached by clients (users) who ask them to make entries (transactions). All accountants share one ledger that they use for postings.

In blockchain networks, the users own the coins. Even though the records are in a ledger, when users come to the accountant with a request to change a record, they must confirm it with a thumbprint (analogy with a digital signature of a transaction). Imagine ADA and ETH coins as pieces of paper that users put in a wooden box (wallets). The pieces of paper are physically in the ledger and together make up the individual pages of the ledger, but the box allows users to view them and hand them over to the accountant if they want to make a change to a record (send a transaction).

Cardano and Ethereum differ in the way the data is written in the ledger, and thus in the way customers hold the coins.

Cardano works with ADA coins similar to banknotes, except the denomination can be any denomination. For example 12 ADA, 3,5 ADA and 0,3 ADA. The user has 3 pieces of paper in his box with these values ​​written on them (he has 3 UTXOs). That's a total of 15,8 ADA. Unlike Ethereum, Cardano has the added option that there can be multiple smaller boxes in the box containing individual pieces of paper (the smaller boxes represent blockchain addresses). There can be more pieces of paper in one smaller box.

If Alice wanted to send 14 ADA to Bob, she would have to give the bookkeeper 2 pieces of paper with 12 ADA and 3,5 ADA. The bookkeeper makes a new piece of paper (a new UTXO) and writes 14 ADA on it. He puts this paper in Bob's box. Then he makes another piece of paper with a value of 1,5 ADA, which he puts back in Alice's box.

When the bookkeeper completes the ledger entry (processing a transaction), Alice has 2 pieces of paper in the box with a value of 0,3 ADA and 1,5 ADA. Bob's box was empty before the booking was made. After booking he has 14 ADA.

We've simplified the analogy a bit. The bookkeeper would take a fee (transaction fee) for writing an entry in the ledger, say 0,2 ADA, so he would return only 1,3 ADA to Alice's box.

In the Ethereum accounting model, users always have just a single piece of paper in the box with a value written on it. This is similar to the current balance in a bank account. In Cardano's case, Alice had 15,8 ADA in her box. Suppose she has 15,8 ETH in Ethereum, then she has a single piece of paper of that value in her box.

In the case of Ethereum, when the accountant wants to make a new booking, he simultaneously overwrites the data on Alice and Bob's slip. If Alice sends 14 ETH to Bob, as in the previous example, the bookkeeper overwrites the value 15,8 to 1,8 on Alice's slip. At the same time, she overwrites Bob's piece of paper, making the value 0 14. In this example, we've also omitted the accountant's fees.

We've used examples to show how users go to accountants and ask them to make a ledger entry, which is analogous to sending a transaction. It would work very similarly if users asked the accountants for a more complex operation, such as a loan or the exchange of two assets (smart contract execution).

In Ethereum, a new record is created by rewriting pieces of paper (balance change), while in the Cardano network, separate new pieces of paper are created that build on previous pieces of paper. Creating new pieces of paper instead of rewriting them is a key difference between the accounting models.

The difference in using the ledger

The accounting model influences how Cardano and Ethereum use the ledger, or how accountants can create a new entry. An accountant on the Ethereum network has to take the ledger out of the vault when creating a new record (or multiple records) and bring it to his desk to work with all boxes at once (shared global state).

In order to make the new entry, the accountant must have an overview of all the boxes and make sure that at the time of his entry another accountant will not try to make the entry. By bringing the ledger to his desk, the bookkeeper sends the signal to the other bookkeepers that only he can make entries now.

Other bookkeepers in the network cannot enter their entries into the general ledger because another bookkeeper has it for himself. They cannot even prepare new entries in advance because they do not know which new entries will be made in the general ledger. Once the ledger is back in the safe, another bookkeeper can take it away. All accountants can view the new entries and check whether they are correct (block validation).

The advantage is that the bookkeeper, who has the book to himself, can make all the changes in all the boxes. He can even change (rewrite) a piece in a box more than once in a row. The downside is that the order in which the new entries are written is important. If a bookkeeper enters 20 new entries, the other bookkeepers must respect this order. The individual bookings depend on each other.

It may happen that there are more users in line who want to make an entry in the general ledger. Even if their request was valid when they were in the queue, when it is their turn the accountant may not be able to process the request. However, the user must pay the accountant a fee for the attempted processing. The inability to perform the accounting operation is due to the fact that it relied on boxes (pieces of paper in the boxes) that changed when another bookkeeper had the ledger in front of him. Unfortunately, users don't have the chance to pre-check that their request will be valid before queuing.

The accountant in the Cardano network also has to bring the ledger from the vault to his desk when he wants to make new entries, but he doesn't prevent other accountants from doing their job. The accountant does not have to keep track of all the other boxes, as he only works with the pieces of paper that the client has placed on his desk. The accountant can check the validity of the required accounting transaction regardless of the other boxes (no global condition).

Clients can check in advance whether their requested transaction is valid (off-chain validation) and if so, they can be sure that when they get in the queue, the accountant will accept and execute their transaction. They can also rest assured that the fee will remain the same.

The individual pieces of paper are not dependent on each other, so the order of the entries made by the accountant who has the ledger for himself is not important. When the bookkeeper returns the ledger to the vault, the other bookkeepers can validate the entries in parallel.

The independence of a given accounting operation from other boxes (pieces of paper in the boxes) has the advantage that it will almost certainly succeed if it has passed local validation by the user. The user can play bookkeeper himself to see if his request is valid. This is especially important for more complex operations such as loans and the exchange of assets (smart contracts).

The downside is that, especially in more complex accounting operations, two accountants want to work on the same piece of paper at the same time, but only one of them can succeed. In some cases a special synchronization between the accountants has to be introduced.

Currently, the accountants in the Cardano network work in the same way as in the Ethereum network. The main difference is that accountants don't need to know the context of all the pieces of paper in other users' boxes to do their job. The principle of creating a new set of bookings and its subsequent validation is similar to how it happens in the Ethereum network. A chosen bookkeeper takes the ledger from the vault to his desk to make new entries. We will see bigger differences when we move to the new version of the Ouroboros PoS consensus.

Scalability options related to the accounting model

Bookkeepers in the Ethereum network cannot work in parallel on individual accounting operations. At any given time, only one bookkeeper can retrieve the ledger from the vault. Then he can work safely with all the pieces of paper in the boxes. Because the other accountants always have to follow the latest entry in the general ledger to continue their work, they cannot work with clients who are in the queue. They always have to wait until the ledger is back in the vault to view the previous entries. They must validate this and only then can another bookkeeper get started with the next clients in the queue. This essentially prevents parallel processing of accounting operations and is a major barrier to scalability.

In the Cardano network, it will be possible for several accountants to work simultaneously and each to handle client requests in their own queue. This capability will be used in a PoS consensus called Leios. The Cardano network will be able to have the accountants prepare entries in advance for one main accountant to assess the prepared entries.

When the accountant takes the ledger for himself, he writes more and more new entries (creates a new block). This creates a list of entries that must then be checked by other accountants (network consensus). This process usually takes some time (block time) and the number of new bookings is limited (block size). Accountants take turns sharing the ledger at about 20-second intervals. For example, even if one bookkeeper works for one second, it takes the rest of the time for other bookkeepers to verify the entries.

Cardano will have the chosen bookkeeper (or possibly more bookkeepers) prepare new entries every second and then have the main bookkeeper perform the most important check (find and remove duplicate expenses, delete duplicate entries, etc.) This is only possible because the work of individual bookkeepers is largely independent of the outcome of the work of other bookkeepers and the chief accountant. The independence comes from the fact that the pieces of paper in the boxes are independent of each other.

In the Ethereum network, scalability will have to be tackled differently. The same approach cannot be used because the work of individual accountants is interdependent. Every bookkeeper needs to know exactly what the previous one has done. However, this information may not be available to them due to the time it takes to propagate the data across the network. One limitation is the need to lock down the ledger for a single bookkeeper who has to work with all the boxes and the inability for other bookkeepers to do anything useful in the meantime. Creating and then validating new records (block) takes 20 seconds and during that time only one accountant can work. The rest of the accountants sit still.

Conclusion We hope our analogy helped you understand the difference in the accounting models of Cardano and Ethereum. The difference is not that big at first glance, but in reality the accounting model affects the scalability, the predictability of the outcome of the desired accounting operation, the predictability of the fee amount, security, etc.

Original text:

Leave a Reply

Your email address Will not be published.

Share This

Copy Link to Clipboard