Blog > 2020

Parameters and decentralization: the way ahead

On December 6 we'll be making adjustments to the k-parameter in Cardano. Here’s why

5 November 2020 Tim Harrison 10 mins read

Parameters and decentralization: the way ahead

Shelley continues to evolve and, as it does, IOHK is committed to supporting the healthy development of the Cardano ecosystem. There are many factors at play in this regard: everything from the wallet experience for ada delegators to network tools for stake pool operators; from governance and funding frameworks like Project Catalyst and Voltaire to community-led initiatives. Central to the health of Cardano as a vibrant proof-of-stake network is the manner in which delegators and stake operators are rewarded for running it, and how those rewards are shared to maximize decentralization and secure the network.

The system is still transitioning towards full decentralization and community ownership. Very shortly, the majority of blocks will be minted by community pools as the influence of the genesis nodes supporting the network is gradually reduced. The steady reduction of d (the parameter governing this process) will see it reach zero by the end of March 2021. This will mark the full decentralization of all block production on Cardano.

Some four months on from the deployment of Shelley, it is time to adjust the parameters of the rewards mechanism so that the next phase of the network’s growth is fueled. Since launch, we have been monitoring network behavior, while seeing how the community and ecosystem are developing. We have also been carefully modeling various scenarios based on data as it emerges. We have now finished a full review and have aligned – from a philosophical, scientific, technical and practical perspective – the next steps. Before we make further adjustments to the parameters of the rewards scheme, we wanted to share with the community what we hope to achieve with the underlying mechanism and associated parameter adjustments.

Encouraging sustainability through pool diversity

First and foremost, the rewards-sharing mechanism of Cardano aims to reward people fairly for supporting the platform in a sustainable way, not as a short-term windfall. One of the goals of staking has always been to encourage long-term holders of ada: the people who are committed to the success of the ecosystem.

In the longer term, the system can be successful only if it is widely decentralized. Philosophically, the design of the rewards scheme aims to encourage a wide and diverse set of stake pool operators. This secures the platform against attacks, spreads any available rewards evenly across the community, and makes the system more resilient to change.

Many economic systems have a tendency towards consolidation and a smaller number of strong players. On the other hand, blockchains can only be successful when control is decentralized. The rewards-sharing scheme ensures that smaller and medium pools can contribute meaningfully to the ecosystem without becoming subsumed into larger operators and consortia, as has happened with other blockchain systems, particularly Bitcoin.

One way to discourage a trend towards a few large pools that collectively control the system is to introduce a counter-incentive to a pool's growth. The rewards-sharing scheme we designed is an example of this novel (in the cryptocurrency space) concept. As soon as stake delegation to a single pool increases above a threshold, the rewards automatically diminish, encouraging ada holders delegating to that pool to find a new home to improve their rewards. This mechanism limits the delegation that can be rationally made to any pool and spreads delegated stake more evenly across a larger number of pools.

All about k

The parameter of the rewards scheme that sets this 'soft-cap' on the pool size is called k. The mechanism is designed so that, at equilibrium, assuming rational participants and no external factors, the stakeholders' best response behavior converges to k pools of equal size delivering the same level of rewards per unit of stake to their delegates.

For the deployment of Shelley on mainnet, we started with k=150, which limits pool size to 210 million ada. This was a modest increase from the parameter choice used in the incentivized testnet (ITN), which had a value of k=100. At the time, this was considered to be a relatively conservative choice, made to ensure the ITN environment would smoothly move to the mainnet. The launch of Shelley has seen enormous interest from the community and a large number of pools. Over the past few months, we have observed the way the staking pools are operating, and recognize that k needs to be adjusted upwards.

It is worth noting that the k-parameter is not amenable to small, gradual increases (unlike, for example, the d-parameter, which lends itself to a gradual reduction). Each increase in k requires pools and delegators to take action. For pool operators, this means a careful adjustment of their parameters and in particular their margin; for delegators, it means choosing new pools to delegate their ada to, especially if their current choice becomes oversaturated.

Therefore, the best strategy for an upwards adjustment of k is to move in larger, less frequent increments – and to move it as far and as fast as practical network dynamics and economics will allow. The ‘how much’ and ‘how soon’ has been a topic of intense debate and discussion within the team, made more complex by a number of technical factors. The best solution is one that minimizes disruption for successful pools and their delegators, while maximizing the opportunity for medium and smaller pools to mint blocks and attract more stake. Equally, it is crucial to be always focused on the longer-term strategic goal as a community to broaden decentralization as widely as possible.

Moving to k=500 in December

We are committed to a measured and deliberate set of changes and will be using the data we gather to inform subsequent decisions. Therefore, we plan to implement the k change in a staged manner. First, we shall move to k=500 at epoch 234 (21:44 UTC Sunday, December 6, 2020). The move to k=500 will give small- to medium-sized pools that are struggling an improved opportunity to attract delegation. It will also have the effect of limiting pool size to 64 million ada, which means more than 100 of the largest pools will become saturated.

Ada holders can redelegate at any point between now and the change. If you are currently delegating to one of the largest pools, and wish to continue receiving optimal staking rewards, you may need to move your ada before or during epoch 233, before the new epoch boundary at 21:44 UTC on December 6. We certainly encourage delegators to keep an eye on their favorite pools in the saturation meter in the Daedalus wallet a day or two before December 6. If it shows significantly more than 64 million ada at this point, you should certainly consider redelegating. It is important to note that rewards will still be payable from slightly saturated pools, but these steadily diminish the greater the saturation over 64 million ada in the pool. To be clear, though, no one delegating to an over-saturated pool will lose any of their stake. It is simply that the return on their stake will be reduced if they stay delegated to a saturated pool. We always encourage the community to keep an eye on their delegation choices, and this will be especially important around this time.

Modeling the long-term viability of stake pools, we found that k values of 1,000 were stable in the long term. As a result, our aim is to move to k=1,000 during March 2021. We recognize the importance of economic factors that also strongly influence pool profitability and will continue to consult widely with the community on the plan; the social dynamics of the network should also not be underestimated. A number of opportunities will be presented (including community panels and seminars) for further discussion, while helping the community understand more about the changes and contribute their perspectives.

From a strategic and philosophical perspective, we believe this is the correct approach for Cardano. We wish to encourage decentralization across a large number of stake pools that are independently operated, while recognizing the positive contribution of the pools currently leading in the rankings. We shall also pay heed to the practical dynamics of the evolving ecosystem. By the end of March, d, the decentralization parameter, will also be set to zero, meaning that Cardano block production will be fully decentralized, and responsibility shared across nearly all the pools currently running the network (and hopefully, some new entrants too).

No silver bullet

We believe that changing k to 500 will benefit the ecosystem, despite a period of disruption and change. However, it is not the whole solution. We are continuing to develop our thinking in other areas that will tangibly contribute to Cardano’s decentralization. Hardware wallet delegation support (coming very soon) should help open up ada supply, to the benefit of all. We shall soon add the ability to delegate to several pools from a hardware wallet, which will help Trezor (initially) and subsequently Ledger owners spread their stake across a range of pools. Improvements to stake pool servers will in time allow community members to start curating their own pool lists to help shape and steer delegation choices. We shall also be retiring all but one of our public IOG pools and encouraging delegators to switch their ada to community pools, while developing our own delegation strategy. On the parameter side, we are now finalizing some modeling around pledging by pool operators, another factor that will help shift network dynamics in favor of a broader spread of ada. Expect more news on all these topics soon.

We recognize that in the short term, the move to k=500 will mean significant change for some. If delegators to larger pools do not react, some pools will become oversaturated and rewards will be unclaimed (note that no rewards are lost; everything goes back to the system’s reserves for the community to draw upon in the future). As a result, pool operators will need to adjust their margin and cost in the short term to stay profitable and incentivize delegators to take action. While this will require some effort from the community, it is an essential step for the Cardano ecosystem to maximize its decentralization. As smart contracts and multi-currency support will be coming soon to Cardano, a high level of decentralization will be the jewel of the ecosystem, and a strong competitive advantage over other blockchains.

The increase in k will be a significant step forward in delivering Cardano’s mission. Because this change will bring some disruption, we want to give the community plenty of time to absorb the changes and adjust their strategy. Moreover, we would like to help the community make the right decisions for the long-term sustainability of Cardano. We will be publishing more content over the next few weeks and months to support this approach (including a guide to making good delegation choices) as we continue to improve the experience.

Achieving the highest level of decentralization is the ultimate objective of any blockchain system. Decentralization is the solid foundation over which the Cardano ecosystem will thrive. True decentralization cannot be conjured purely out of mathematical theorems, and the tweaking of parameters and formulas will never be enough by itself – even though with Cardano we have taken huge strides compared to any other blockchain. Nevertheless, in the end, true decentralization will emanate from the collective will and actions of the Cardano community. We will continue in this path together, investigating additional approaches to allow stake pools to build their brand, communicate with their delegators, and highlight their own contributions and mission more directly.

Thanks to Aggelos Kiayias, Colin Edwards, Olga Hryniuk and Francisco Landino for their input to this piece. Thanks also to researchers Aikaterini-Panagiota Stouka and Elias Koutsoupias.

We’ll be posting throughout the next month to support delegators and stake pool operators as we approach the December 6 deadline. Please be sure to follow us on Twitter and subscribe on YouTube for all the latest updates.

IOHK sponsors new Haskell Foundation

Independent, open, non-profit body will support tools, libraries, education, and research

4 November 2020 Moritz Angermann 2 mins read

IOHK sponsors new Haskell Foundation

Simon Peyton Jones has just announced the launch of the Haskell Foundation at the Haskell eXchange virtual conference. The foundation is an independent, open, non-profit organization dedicated to broadening the adoption of the Haskell language, by supporting its ecosystem of tools, libraries, education, and research.

IOHK is one of the first sponsors of the Haskell Foundation because we believe in the power of functional programming, open-source software, and open governance. So, we are delighted to be able to join other key companies in supporting the community through an open and transparent process in which everyone can participate.

IOHK and Haskell

All of IOHK’s core software is open-source, and where possible we do our work via standalone projects that will benefit the community too. We have contributed substantially to compilers like GHC, GHCJS and Asterius; created libraries for eliminating space leaks; and are even building the Plutus smart contract platform on Haskell.

For several years IOHK has been supporting the development of GHC itself and aims to continue doing so. Our engineers have contributed the ghc-bignum library, improved cross-compilation support, worked on support for ARM architectures, provided general code improvements, and fixed a number of bugs. We are keen to help other community efforts, for example by funding the work of others, and by helping to get the recently-merged Windows I/O manager across the finish line.

In addition to its direct technical involvement, IOHK has also invested in expanding the Haskell community, including developing online tutorials, education programmes, and delivering face-to-face training courses in places such as Athens, Barbados, Mongolia and Ethiopia. Through this and other programs, we are fully committed to the Haskell Foundation’s goals of enhancing diversity within the Haskell community.

Looking forward

We are excited to be working with the Haskell Foundation to help move Haskell forward. IOHK has contributed to the Foundation’s technical agenda, and will help directly with technical work. Stay tuned for more exciting announcements!

Getting to grips with metadata on Cardano

Adding information about transactions is a powerful tool for companies and developers

3 November 2020 Alan McSherry 5 mins read

Getting to grips with metadata on Cardano

In a previous post, Bringing new value and utility to the Cardano blockchain, I discussed the notion of transaction metadata. I also explained why this is crucial to Cardano’s Goguen evolution as a utility platform for decentralized finance (DeFi) operations.

There are many potential uses for metadata. With that in mind, IOHK has been working to ensure that both developers and enterprise-focused clients can easily build metadata into their applications. Furthermore, we want to make certain that ada users have a convenient way to see information about their transactions.

How does metadata work on Cardano?

Metadata tells the story of a transaction and there are many ways to interact with this story. Developers can take advantage of metadata by embedding details directly into a transaction, and ada users can search for specific information in the Cardano Explorer. The data can be added directly, or, for larger amounts, it is possible to create a Merkle tree of the data and put the root hash of the Merkle tree on the blockchain. Once this is done, it can be proved that the data existed at a specific point of time and that it remains permanently on the chain for future reference.

It is also important to note that transaction metadata is stored on the blockchain and is carried along with each transaction. The fact that it is stored on-chain, rather than being recorded in the ledger state, is beneficial because it does not influence transaction validation or compromise ledger performance.

Metadata service from IOHK

IOHK’s Professional Services Group (PSG) provides business consulting and technological services. In particular, our PSG is developing services to help companies build and implement blockchain solutions by integrating their systems in a seamless and convenient way with distributed ledger technology.

The metadata service has been developed with a variety of applications in mind, but for commercial applications in particular.

This interface handles the wallet interaction, provides users with low balance alarms, and rolls it all up into a Docker container. This eliminates the complexity associated with submitting metadata directly in the wallet’s backend API. Thus, the metadata service only requires the specified metadata and the number of blocks under which the transaction should be stored before it is considered as final.

In the metadata request, one can include:

  • The actual metadata: sender and receiver identities, comments, tags.
  • The depth: the number of blocks under which the transaction containing the metadata should be stored before it is considered as final.
  • The client identity: indicates the wallet to be used.
  • Transaction identity: this feature is useful in case of failures and restarts. It allows clients to re-examine previously submitted metadata.

After including all the details, the metadata service records a transaction on the blockchain, which then allows transaction information to be retrieved using the Cardano Explorer. For this, one would just have to indicate a transaction identity.

Another feature is that PSG metadata service can be specified using language-neutral protocol buffers. This expands the number of potential uses because client generators support many programming languages, including Python, Java, and Scala. Such extended opportunities make the process of integration with the Cardano blockchain more straightforward.

Accessibility is key

We have also developed a Scala and Java client for the Cardano wallet API, which bundles together calls to the API and makes them easily accessible to more developers. As well as a Java and Scala API, we can provide an executable jar file to give rudimentary access from the command line. You can find details of the PSG Cardano wallet API on GitHub and see how it allows clients to perform tasks such as submitting and listing a transaction, wallet maintenance, and node monitoring.

Working with wallets and Cardano-CLI

Another way of working with metadata is by submitting it directly from a wallet or the Cardano command-line interface (CLI).

These processes require basic coding experience and familiarity with running the Cardano node and CLI. Direct interaction with metadata opens powerful capabilities for building decentralized applications on Cardano because developers can authenticate valuable data in their preferred way.

In the Cardano wallet and the CLI, the structure of the metadata is defined by a mapping from keys to values (key-value pairs) that combine details for multiple purposes into the same transaction.

  • Metadata keys act as a schema identifier showing the metadata value. Keys are unsigned integers limited in size up to 64 bits.
  • Metadata values are simple terms, consisting of integers, text strings, byte strings, lists, and maps. Values have to be structured, which makes it easier for them to be inspected and managed, particularly by scripts.

The only extra cost involved is that the metadata adds to the size, in bytes, of the transaction and the processing fee is based on transaction size.

Metadata can be constructed using the Concise Binary Object Representation (CBOR) and Concise Data Definition Language (CDDL) notations. For more detailed information, please refer to transaction metadata in the Cardano wallet and see how to use transaction metadata schemes in Cardano CLI.

Transaction metadata is an integral step for Cardano’s evolution into a multi-functional smart contract platform. Further Goguen enhancements will add metadata to specify transaction conditions for smart contracts, opening more opportunities for commercial use and deal settlement. If you want to integrate metadata into your business processes, contact enterprise.solutions@iohk.io with any questions or support requests. And keep following this blog for updates as we continue to build out Goguen functionality.

Bringing new value and utility to the Cardano blockchain

Adding metadata to transactions prepares Cardano to become part of the DeFi revolution

29 October 2020 Alan McSherry 5 mins read

Bringing new value and utility to the Cardano blockchain

With the rollout of Goguen, Cardano is becoming a smart contract platform. Adding metadata – information about the data being processed – to transactions is key to this, and last month this capability was added to the blockchain. From a focus on transactions, Cardano is now becoming a utility platform open for partnerships, enterprises, and commercial applications that can be used for the complex operations that will define the era of decentralized finance (DeFi).

With an increasing volume of financial cryptocurrency operations, the ability to access immutable data that cannot be altered is crucial, especially when it comes to applications such as wealth management. The Cardano blockchain maintains permanent records of processed transactions, ensuring that the history of financial activity is transparent and auditable. However, to grant more accountability and visibility to financial processes, context has to be added to these transactions. Additional information can include facts such as sender and receiver details, conditions, and time of processing. This is done by adding transaction metadata.

What is metadata?

Metadata refers to ‘data about data’. In other words, it describes the context, content, and structure of records. As blockchain technology provides a transparent ledger for storing records immutably and securely, metadata generates trust with permanent data attestation.

All transactions happen for specific purposes, whether this is a payment for product or service, or a funds transfer to a family member. When a purchase is made online, for example, there is so much information that can follow along with the transaction. Metadata can tell the story of the product purchase reflecting its buyer and seller, the time of deal, product manufacturer, or the supply conditions. All of these records are important to maintain along with the transaction of wealth.

With the emergence of Bitcoin, developers started leveraging blockchain technology to put such little bits of additional data on the chain, knowing that the information would be available forever. Over time, adding metadata to the chain became commonplace.

Cardano is a third-generation distributed ledger. In terms of metadata, this means that Cardano is far more efficient in adding transactional information than earlier blockchains. While earlier blockchains supported 40-80 bytes of metadata, Cardano’s transaction size is currently around 16KB. Subtracting the size of the rest of the transaction (UTxOs, inputs, and outputs) still leaves the majority of 16KB for metadata.

Why transaction metadata matters

Metadata is a handy way of certification and validation. It allows cryptocurrency assets to hold historical ownership, transfer or value details. This is highly beneficial when working with non-fungible – unique – assets representing value such as property or intellectual rights, for example. Additionally, a range of documents can be signed and certified using a public key that proves the document’s legitimacy.

One of the most prominent uses for metadata is in a supply chain. Supply chain involves parties such as factories, customers, suppliers, and delivery services. To enable efficient data tracking, participants must provide confirmation of services that are interlinked, and these must be accessible by everyone for verification. In this case, metadata can provide a complete picture of supply chain processes with fixed recorded data on the blockchain ledger. This grants transparency, immutability, and trust for all stakeholders.

The Atala products

The deployment of metadata on Cardano will see early commercialization through the Atala product suite, which includes Atala Prism, Atala Trace, and Atala Scan solutions. To enhance the overall product functionality in terms of data feasibility, accountability, and traceability, the IOHK team is implementing metadata support while integrating with the Cardano ledger.

Atala Prism is a decentralized identity system that enables people to own their personal data and interact with organizations seamlessly, privately, and securely. The Atala Prism team is integrating metadata to certify and store DIDs and DID documents on Cardano. Also, it will be possible not only to create but also to revoke credentials such as university certificates.

Atala Trace and Atala Scan are being developed to enable brand owners to improve the visibility over supply chain processes and establish product provenance and auditability. In these cases, metadata integration will be used to record tamper-proof supply-chain records.

Working with metadata

There are different ways of working with metadata both for enterprises and the developer community. One such way is using the metadata service developed by IOHK’s Professional Services Group. We have been working with a number of partners on integrations and have many more in the pipeline. So if you’re running a business and also wish to ensure trust for your customers and partners while managing your transaction metadata securely, please contact us via enterprise.solutions@iohk.io to find out how to incorporate metadata services in your processes.

Transaction metadata is an important early feature of Goguen utility and smart contract functionality, which will be enhanced and developed by many other capabilities over the months ahead. Stay tuned to this blog for all the updates on native assets, ERC20 convertor, Marlowe, Plutus and other smart contract languages as we roll these out.

Ensuring ETC Network Security

Ensuring ETC network security - a comparison of 51% Attack Resistance proposals for Ethereum Classic

23 October 2020 Brian McKenna 4 mins read

Ensuring ETC Network Security

The Ethereum Classic network suffered from four 51% attacks between 2019 and 2020. Three of those attacks have occurred recently – with just weeks between each other – which resulted in expensive losses for stakeholders due to double spending and service disruption. A number of Ethereum Classic Improvement Proposals (ECIPs) followed after these attacks aiming to provide the immediate solution for 51% attack resistance.

IOHK, and ETC Coop have collaborated to provide Ethereum Classic stakeholders and the broader community with the knowledge and understanding on how to resist these issues. To support this activity, we have created a comparison document to showcase and summarize the different 51% attack mitigations. In it, ETC community members will be able to assess each proposal, understand any concerns, and be advised on how the ETC community can solve ETC network security issues together.

The ECIP that seems to be reaching adoption in the immediate term is ECIP 1100: Modified Exponential Subjective Scoring (MESS). MESS is a modified version of Vitalik Buterin’s Exponential Subjective Scoring (ESS) and aims to make larger chain reorganizations more difficult. However, we believe that it will not provide robust security and there is no guarantee that it will prevent further attacks. What’s most concerning, however, about MESS, is that it has not been formally studied nor has its security been proven. Moreover, a series of potential attack vectors on MESS have already been identified.

Checkpointing is the way forward

Checkpointing, on the other hand, can make 51% attacks impossible with deterministic confidence of finality. This approach grants the ETC core developer community a safe space to innovate and implement the more speculative proposals that are underway. These may include MESS, Reducing the dag, Keccak-256, and many others. Considering that ETC value and user experience is currently hindered by the low-confidence and subjective finality of MESS, MESS doesn’t provide high confidence for stakeholders to reduce confirmation times to desirable levels.

The Ethereum Classic network is a minority proof of work blockchain in the Ethash environment. As of October 08, 2020, the Ethereum’s network hashrate is ~248.16 TH/s, Nicehash’s hashrate is ~9.34 TH/s, while Ethereum Classic’s network hashrate is only ~3.47 TH/s . This means that Ethereum Classic’s hashrate is only ~1.5% of Ethereum’s and ~40% of Nicehash’s, which is just one of many other mining rental platforms. It should be noted though, that non-Ethash networks that are minable by general purpose hardware can also be turned on to Ethereum Classic, which means that the Ethereum Classic network is even more of a minority proof of work blockchain than represented by the Ethereum and Nicehash comparisons above.

It thus follows that the current security assumptions of the Ethereum Classic network no longer hold. Speculating ETC’s network security on ETH’s proof of stake timeline is also not a sustainable security strategy and arguably not competitive enough to increase the value of the network.

Looking to the future

Indeed, it goes further than that. ETC is at an important crossroads and the choices we make now will impact not only the future of the platform but of the whole ecosystem. Any 51% attack mitigation must be robust enough to give absolute certainty to ETC holders, users and service providers that their transactions will be secure.

We need to be decisive and resolute, while giving ourselves the time to get this right. If we adopt a suboptimal solution at this point, and there are further issues with the network, it is unlikely that our (thus far) patient stakeholders – especially exchanges – will remain so.

Our focus at the moment is rightly on mitigation. But let’s also ensure we remember the longer-term goal – the health and sustainable success of Ethereum Classic. Let’s move decisively to underpin the security of the network, and together look forward towards a new era of network growth, community growth and sustainable innovation.

This post was originally published on the ETC Cooperative blog