Accounting model

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

In blockchain networks, users own the coins. Even if the records are in a ledger, when users come to the accountant with a request to change a record, they have to confirm it with a thumbprint (analogy to a digital signature of a transaction). Imagine ADA and ETH coins as pieces of paper that users put into a wooden box (wallets). The pieces of paper are physically in the ledger and together they form the individual pages of the ledger, but thanks to the box, users can look at them and hand them to the accountant if they ask to make a change to a record (send a transaction).

Cardano and Ethereum differ in how the ledger entries are written, hence how clients hold the coins.

Cardano works with ADA coins similarly to banknotes, except that the denomination can be any value. 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 capability that there can be multiple smaller boxes in the box that contain 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 accountant 2 pieces of paper with 12 ADA and 3.5 ADA. The accountant would create a new piece of paper (a new UTXO) and write 14 ADA on it. He would put this piece of paper in Bob's box. Next, he would create another new piece of paper with a value of 1.5 ADA, which he would return to Alice's box.

 

When the accountant completes the ledger entry (process a transaction), Alice will have 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 entry was made. After the ledger entry, he will have 14 ADA.

We have simplified the analogy a bit. The accountant would take a fee (transaction fee) for writing an entry in the ledger, say 0.2 ADA, so he would only put 1.3 ADA back into Alice's box.

In the Ethereum accounting model, users always have only 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, so she has a single piece of paper with that value in her box.

In the case of Ethereum, when the accountant wants to make a new accounting entry, she overwrites the data on Alice and Bob's piece of paper at the same time. If Alice sends 14 ETH to Bob, as in the previous example, the accountant will overwrite the 15.8 to 1.8 value on Alice's piece of paper. At the same time, she overwrites Bob's piece of paper and makes the value 0 into 14. In this example, we have also omitted the accountant's fees.

 

We 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 were to request a more complex operation from the accountants, such as a loan or the exchange of two assets (execution of smart contracts).

A new record in Ethereum is created by rewriting pieces of paper (change of balance) 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 accounting models.

The difference in the use of the ledger

The accounting model affects how Cardano and Ethereum use the ledger, or how accountants can create a new entry. An accountant on the Ethereum network must 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 the boxes at the same time (shared global state).

Economic and incentive model behind Cardano Proof-of-Stake

The economic and incentive model is often overlooked, which is a pity since it is probably the most important part of the public decentralized protocols. Let’s see why is the model so important and how Cardano Ouroboros Proof-of-Stake is designed from the point of view of users. Read more

In order for the new entry to be made, the accountant must have an overview of all the boxes and must be sure that at the time of his entry another accountant will not attempt to make the entry. By taking the ledger to his desk, the accountant signals to the other accountants that only he can now make entries.

Other accountants in the network cannot enter their entries into the ledger because another accountant has it for himself. They cannot even prepare new entries in advance because they do not know what new entries will be made in the ledger. Once the ledger is back in the vault, another accountant can take it. All the accountants can look at the new entries and verify that they are correct (block validation).

The advantage is that the accountant, who has the book to himself, can make any changes in all the boxes. He can even change (rewrite) a piece of paper in one box more than once in a row. The disadvantage is that the order in which the new entries are written is important. If an accountant enters 20 new entries, the other accountants must respect this order. The individual entries are interdependent.

It may happen that there are more users in the queue who are interested in making an entry in the ledger. Even if their request was valid at the time they queued, when their turn comes, the accountant may not be able to process the request. Still, the user must pay the accountant a fee for having attempted the processing. The inability to perform the accounting operation is due to the fact that it was dependent on boxes (pieces of paper in the boxes) that changed when another accountant had the ledger to himself. Unfortunately, users do not have a chance to check in advance if their request will be valid before queuing.

The accountant in the Cardano network also has to take the ledger to his desk from the vault when he wants to create new entries, but he does not prevent other accountants from doing their work. The accountant doesn't need to keep track of all the other boxes because he only works with the pieces of paper the client has put on his desk. The accountant can verify the validity of the required accounting transaction regardless of the other boxes (no global state).

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

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

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

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

At the moment, the accountants in the Cardano network work similarly to the Ethereum network. The main difference is that accountants do not need to know the context of all the pieces of paper in other users' boxes to do their work. The principle of creating a new set of entries and the subsequent validation is similar to how it is done in the Ethereum network. One elected accountant takes the ledger to his desk from the vault to create new entries. We will see bigger differences when we move to the new version of the Ouroboros PoS consensus.

Scalability options with respect to the accounting model

Accountants in the Ethereum network cannot work in parallel on individual accounting operations. At any one time, only one accountant can take the ledger out of the vault. Then, he can safely work with all the pieces of paper in the boxes. Because the other accountants must always follow the last entry in the ledger to continue with their jobs, they cannot work with clients who are waiting in the queue. They always have to wait until the ledger is returned to the vault to look at the previous entries. They have to validate these and only then can one other accountant start working 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 multiple accountants to work simultaneously and each can 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 accounting entries in advance for one master accountant to review the prepared entries.

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

Cardano will allow the chosen accountant (or possibly more accountants) to prepare new entries every single second and then let the main accountant do the main check (find and discard double-spend attempts, remove duplicates, etc.). This is only possible because the work of individual accountants is largely independent of the outcome of the work of other accountants and the main 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 handled differently. The same approach cannot be used as the work of individual accountants is interdependent. Each accountant needs to know exactly what the previous one did. However, this information may not be available to them because of the time it takes to propagate the data across the network. A limitation is the need to lock the ledger for a single accountant who needs to work with all the boxes and the inability of other accountants to do something useful in the meantime. The production and subsequent validation of new records (block) take 20 seconds and during that time only one accountant is able to work. The rest of the accountants is idling.

Conclusion

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