Blog > 2021 > March

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts

Cardano uses an innovative Extended UTXO accounting model to support multi-assets and smart contracts. In the first of a two-part blog, we look at the different blockchain accounting systems and why EUTXO matters

11 March 2021 Fernando Sanchez 5 mins read

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts

Blockchain networks are complex data structures. Transactions continuously crisscross the chain, creating digital footprints that require careful tracking and management to maintain the integrity and reliability of the underlying ledger.

Two major accounting ledgers exist in the blockchain space: UTXO-based blockchains (Bitcoin, for instance), and Account/Balance chains (Ethereum, and others).

Each of these crypto heavyweights differs in many fundamental ways, but this article focuses on their accounting models. Bitcoin uses an Unspent Transaction Output (UTXO) model, whereas Ethereum deploys an Account/Balance one.

Cardano sought to combine Bitcoin’s UTXO model with Ethereum’s ability to handle smart contracts into an Extended UTXO (EUTXO) accounting model. The adoption of EUTXO facilitates the implementation of smart contracts into the Cardano chain.

What is a blockchain accounting model?

Every company, firm, or commercial entity requires a balance sheet to keep an accurate record of profit, loss, cash flow, and other parameters. By maintaining careful accounting of all this data, companies can, at a glance, visualize their financial status at any given point in time. A company's accounting ledger offers another advantage: The ability to trace the provenance and ownership of funds.

Blockchain networks also require an accounting model to determine who owns what coins (and how many of them), track where those coins go, which ones are used up, and which ones remain available to be spent.

UTXO model v Account/Balance model: A brief overview

Decades ago, accountants used physical ledger books with handwritten entries to keep records about the movement of funds. Nowadays, companies use electronic versions of the same thing. Blockchains use transactions as records (much like entries on a ledger book) to track provenance and ownership. These transactions contain a lot of information (where the coins come from, where they're going, and whatever change is leftover from these transactions).

Here’s a brief overview of the UTXO and Account/Balance models:

UTXO

In a UTXO model, the movement of assets is recorded in the form of a directed acyclic graph where the nodes are transactions and the edges are transaction outputs, where each additional transaction consumes some of the UTXOs and adds new ones. The users' wallets keep track of a list of unspent outputs associated with all addresses owned by the user, and calculate the users’ balance.

UTXO is, in many ways, similar to cash. A good analogy is this: Imagine you have $50 in your wallet. This amount could be made up with several combinations: two $20 bills and one $10, four $10 bills and two $5 bills, and many others. But regardless of the permutations, the amount ($50) remains equal. UTXOs work in the same way. Whatever balance you have in your blockchain wallet (say, 150 coins) could be made up with many different UTXO combinations, based on previous transactions, but the balance amount remains the same. In other words, the balance held in a given wallet address is the sum of all unspent UTXOs from previous transactions.

The concept of 'change' in UTXO models

Much like cash transactions in any store, UTXOs introduce ‘change.’ When you take out say a $50 bill from your wallet, you cannot tear that bill into smaller pieces to pay for something that costs $15, for example. You have to hand over the entire $50 bill and receive your change from the cashier. UTXOs work in the same way. You cannot ‘split’ a UTXO into smaller bits. UTXOs are used whole, and change given back to your wallet’s address in the form of a smaller UTXO.

The advantages of UTXO models

By checking and tracking the size, age, and amount of UTXOs being transferred around, one can extract accurate metrics about the blockchain’s usage and financial activity of the chain.

UTXO models offer other advantages. Better scalability and privacy, for example. Also, the transaction logic is simplified, as each UTXO can only be consumed once and as a whole, which makes transaction verification much simpler.

To sum UTXO up:

  • A UTXO is the output of a previous transaction, which can be spent in the future
  • UTXO chains have no accounts. Instead, coins are stored as a list of UTXOs, and transactions are created by consuming existing UTXOs and producing new ones in their place
  • Balance is the sum of UTXOs controlled by a given address
  • UTXOs resemble cash in that they use ‘change’, and are indivisible (UTXOs are used whole)

The Account/Balance model

As the name indicates, blockchain models that deploy an Account/Balance accounting model use an account (which can be controlled by a private key or a smart contract) to hold a coin balance. In this model, assets are represented as balances within users’ accounts, and the balances are stored as a global state of accounts, kept by each node, and updated with every transaction.

In many respects, Account/Balance chains (such as Ethereum) operate in a similar fashion to traditional bank accounts. The wallet's balance increases when coins are deposited, and decreases when coins are transferred elsewhere. The crucial difference here is that, unlike UTXOs, you can use your balance partially. So for example, if you have 100 ETH in your account, you can send a portion of that (say, 30 ETH) to someone else. The resulting balance will be 70 ETH remaining in your account, and the address where you sent the coins to will increase by 30 ETH. The concept of change does not apply in Account/Balance accounting models as it does in UTXO ones.

To sum up the Account/Balance model:

  • This accounting model resembles how a bank operates
  • Users have accounts that hold their coin balance
  • It is possible to spent partial balances
  • The concept of change does not apply

Tomorrow, in the second part of this analysis, we'll discuss how each model deals with transactions, explain the rationale for developing the EUTXO model for Cardano, and provide an in-depth explanation of what EUTXO is and how it works.

Not long till 'd' (=0) day

We are fast approaching full decentralization of block production on Cardano. It's a good time to reflect on the network’s evolution

4 March 2021 Colin L Edwards 8 mins read

Not long till 'd' (=0) day

At the end of March, we’ll reach another milestone for Cardano when we’ll see d, the parameter that governs what percentage of transactions are processed by the genesis nodes, get to zero. At this point, responsibility for block generation will be fully decentralized. In other words, Cardano’s network of 1,800+ community pools will be solely responsible for producing blocks.

D=0 day will be a landmark moment in Cardano's continuing journey. When we deployed the Shelley update back in July 2020, d was set to an initial 1.0, meaning that every block was produced by IOHK’s network of federated nodes. Of course, this was the antithesis of decentralization but a wise (ie, secure) approach for the near term while the stake pool operator (SPO) network got up and running.

Preparing for d=0 day

Over time, we have gradually reduced d at a rate of 0.02 per epoch (in other words, an increase of two percentage points in community block production every five days). On the day this blog is published, we are at d=0.12 with 88% of blocks being produced by community pools and just 12% by federated nodes.

Simply put, as d decreases, more blocks are created by the community, and more stake pools can produce blocks. As d ticks down, the network's diversity and geographic distribution expands.

On March 31, at the boundary of epoch 257, d will reach zero. That day will be special because while d may be small, its significance is huge. In this context, that zero heralds the most important outward indicator of decentralization, a parameterized symbol supporting a core tenet of our philosophy – d=0 pushes power to the edges.

As we continue transitioning to full decentralization, it is also a good time to reference the other parameters governing the Cardano network’s evolution, and review some of the changes we have seen.

The d number is just one of more than 20 parameters that govern network operation and health. This set of parameters are ‘levers’ to manage and steer the effective and natural operation of a decentralized proof-of-stake system. The community will ultimately drive Cardano's evolution via Voltaire governance rules, but until then, it's our job to manage this set of parameters. Our guardianship requires that we make adjustments as required to build and sustain the health of the network.

Why the k parameter is special

Aside from more technical considerations, we remain committed to supporting smaller stake pools, because we believe this approach aligns with our long-term goal of creating the most decentralized and economically sustainable ecosystem of stake pools. This is further reflected in our delegation approach, which throughout 2021 will aim to support stake pool diversity.

Last year, we made the first significant adjustment to network parameters when we moved k from 150 (meaning a system optimized at launch for 150 block-producing pools, even though other pools could produce blocks) to k=500. This came about after extensive debate, both within IOHK and the Cardano Foundation and with the SPO community.

The move to k=500 was a balanced decision based on the need to create opportunity for more pools to produce blocks (by encouraging the flow of stake from saturated pools into new pools), while supporting the pools already creating blocks, and minimizing disruption for their delegators. Overall, it has proven successful – let's dive a little deeper.

The change to k=500

Prior to the announcement that k was changing, 54.6% of all delegated ada was represented by the 10 largest stake pools and 45.4% of ada represented by smaller pools. Following the change to k=500, those numbers have reversed: 55.9% of ada is now represented by pools other than the 10 largest.

This was a dramatic change directly linked to the change in k.

It is a great start, but our goal is to continue to optimize the network. So we observed what happened, gathered feedback, and incorporated everything we learned into making the next round of changes.

Pools will split when it makes economic sense to do so. For those pools with a greater proportion of pledge, the more pledge they have, the more valuable it is and the more reason SPOs have to keep their pledge together. Conversely, if a pool has a low level of pledge, there is very little reason not to split it further to start additional pools.

While there is a cost associated with running a small pool, and given the current appreciation in the value of ada, we believe that the financial incentive for splitting pledge is even stronger now. Increasing k – for example to 1,000 – without addressing this first, would not lead to a more distributed and diverse ecosystem which, to be clear, is the objective. We will simply see many of the same operators just running twice as many pools.

Changing pledge

The a0 parameter rewards SPOs for concentrating their pledge into a small number of pools. This has been effective in encouraging pools with high levels of ada pledge to consolidate that into large private pools (as we at IOHK do) and therefore give smaller pools greater opportunity to attract delegation.

However, we believe the current system can be improved, so for some time now, we have been discussing and modeling options to make pledge more effective at addressing pool splitting for lower pledge levels.

The current structure of the rewards formula does not give us the flexibility to tweak the impact by a simple parameter change; we will need to modify the rewards formula, which is something our research team has been working on for some time.

Several promising candidates have come out of that evaluation process. We’d like at this point to acknowledge the valuable work from community contributor Shawn McMurdo in his Curve Pledge Benefit improvement proposal for helping to develop the thinking in this area.

Our research team is in the late stages of finalizing an approach. They will soon present their findings, and we will update the community then. However, the team has now concluded that a0 should change. We believe this change will greatly benefit the network, making the system more sustainable, widely distributed, and globally diverse. It will also increase the earnings of all public pools (ie, those that are not already fully 'saturated' with pledge).

While it has been a matter of considerable internal discussion, we have also concluded that any change in k should come after changing the formula for a0 to deliver the desired results (especially encouraging stake to flow to smaller single pools rather than split pools). Since this is a full formula modification, and no longer a simple epoch boundary change, it needs to be released as part of a hard fork. Given our product pipelines and the team’s current focus on continuing the Goguen rollout and available dates, we will be looking to making this change in the third quarter of the year.

Other considerations

Other factors need to be considered. Chief among these is the availability of multi-pool delegation, to allow ada holders to spread their stake across a number of pools from a single wallet. This requires significant backend work from the core development team, along with a new interface and business rules adjustments. We would also like – if possible – to offer better pledging options for SPOs from Daedalus in a similar timeframe (currently only available via CLI or AdaLite), which means additional development work not only for internal teams but also for the Ledger and Trezor wallet companies.

We will also continue researching other parameters such as the minimum fees (implemented to prevent a ‘race to the bottom’ yet skewed against smaller pools) while continuing benchmarking and optimizing node performance as smart contract functionality rolls out. Our responsibility and commitment remains to achieve a delicate balance between the stability, scalability and overall health of the network with a flourishing ecosystem of pool operators and delegators.

Evolving into the future

As we promote the health of the network and stake pool ecosystem, we continue to monitor and research other important parameters and values. This work considers both the tactical and strategic approaches we may take.

With the increase in the price of ada, implementation of native tokens, and anticipating smart contracts, we also continue to assess and review the Cardano fee structure. For example, based on community feedback, we are considering the tactical approach of immediately lowering some fees. The minimum fixed fee of 340 ada for stake pools is one strong candidate for change; network transaction fees and deposits for smart contracts are also under discussion.

Our researchers and analysts are also working with an external economic consulting group to formalize an optimization approach that ensures fees will remain stable and predictable over the longer term. The results of this review will include a governance model with a clear mandate about when and how fees should be determined in the future as we develop, optimize and scale the network. We’ll be sure to keep the community informed and involved as our thinking develops.

I’d like to thank and acknowledge Francisco Landino, Lars Brünjes, Aikaterini-Panagiota Stouka, Aggelos Kiayias, and Tim Harrison for additional input to this article and feedback throughout this evaluation period.

1

2