The road to permissionless and decentralized IOTA Smart Contracts.
In traditional applications, a single centralized entity handles most (if not all) of the processing, data, and state changes. This makes the entire process easier to control. But because the same entity controls all the data and processing, it could easily manipulate any part of this process. In a simplified analogy, this would be the same as having a single bookkeeper. In an ideal world, this bookkeeper would be honest and never do anything other than what is established in the contracts. But in reality, this may not always be the case.
Smart contracts (or programs) are run by participants of the network called validators who oversee the same code (the smart contract) in the same environment (virtual machine) with the same data (inputs) until they all agree (create a consensus) on the outcome. This makes the smart contract decentralized, as you don’t need to put your trust in a single entity; instead, you can rely on results corroborated by multiple validators. This removes the middle man and replaces him with immutable code run by many trusted, independent validators. Going back to the bookkeeper analogy: in smart contracts, your bookkeeping isn’t centralized but replicated by multiple independent bookkeepers who execute every transaction until they agree on the outcome.
What exactly are validators?
A validator is an entity that owns validator nodes. Everything a node does is attributed to its owner, the validator. A validator node is a computer that runs the smart contract code under exactly the same conditions as other validator nodes (the same code, virtual machine, and data) to ensure the correct state change has happened after an operation. In the previous analogy, a validator is one of the many bookkeepers that ensure no one tampers with the contract. They run the smart contract code in the exact conditions (virtual machine, programming language, and inputs) set by the chain owner; if they all come to a consensus, the smart contract is held to have been performed correctly. On the other hand, if one or more validators come to a different outcome, it is grounds for believing that someone is misbehaving.
Assembly aims to be a secure and distributed network. Therefore, validators are essential to Assembly. They are responsible for distributing the network, securing consistency in the executed contracts, and ensuring other validators don’t misbehave.
What is a committee of validators?
In Assembly, smart contract validators form groups called committees of validators for each smart contract chain. The committee of validators runs smart contracts and comes to a consensus on the result of computations.
Why should we trust a committee of validators?
While trust shouldn't be placed in individual validators on their own, a committee of validators can be trusted to deposit our assets on the chain. The main rule of consensus in the committee of validators is that it is enough for ⅔ + 1 of honest validators to produce a valid result. The rest may be misbehaving: faulty or byzantine. To produce a wrong result (e.g., steal funds), ⅔ + 1 validators must collude. The question is: why and to what extent can we trust the committee of validators as a whole?
To be able to assess that, the team behind Assembly has introduced a reputation system called the trust score. It aims to quantify the trustworthiness of an individual validator. Each validator is assigned a trust score primarily made up of the amount of staked ASMB tokens, a reliability score, and the number of correctly-performed contracts. Suppose a validator has a high trust score; in that case, it has a higher negotiation power in the open market of validators and a greater chance of being selected to form part of a smart contract chain’s committee of validators.
The trust score of the committee of validators is composed of trust scores of individual validators.
The validator’s trust score increases each time a committee of validators participates in producing a correct block in the smart contract chain. However, the trust score of the validator will also be negatively affected (by being completely or partially reduced) if the validator’s node doesn’t perform its duties correctly.
In Assembly, a validator can operate one or more validator nodes under one public identity. The validator will have to place a security deposit and pay registration fees for every node. Additionally, every smart contract chain will have a minimum bond that each validator in their committee must cover. This means a validator cannot validate an infinite amount of chains (thus ensuring Sybil protection). This bond is locked as long as the validator is committed to the committee of validators and can be slashed if the validator misbehaves. This creates a system in which the economic incentive for violating a smart contract will depend on how large the security deposit is.
Naturally, a validator needs some incentive to be reliable, accessible and honest, to stake ASMB tokens, place a deposit, pay registration fees, and process smart contracts. Validators will collect staking rewards, node fees, and (optionally) rewards from smart contract chain owners.
Because staked ASMB tokens directly contribute to the success and security of the network and are also used to secure smart contracts, stakers will also be periodically rewarded with newly minted ASMB tokens.
Assembly is an open marketplace of validators. The fees a validator can charge will be susceptible to and determined by supply and demand. Validators with the highest trust score will be able to set the biggest fees.
Pledging your stake to a validator
Running a reliable validator node may seem too complicated or inaccessible to many, but anyone holding ASMB tokens can still participate and benefit from securing the Assembly network. The simplest way to do so is by staking your ASMB tokens to a validator. In each period, validators will distribute their collected fees for executing smart contracts and staking rewards to everyone who has staked ASMB tokens in proportion to their stake. You can think of this as buying shares in a validator; every time the validator collects any sort of rewards, you earn your share of them. Keep in mind that validators will be able to set a fee for this.
Open selection of validators
Conceptually, Assembly will allow chain owners (also known as governors) to be free to select the validators for the committee of validators according to any criteria they choose. However, we aim to provide a simple, decentralized, permissionless, secure, and reliable way to select the validators in a committee by using the open committee selection which is currently being researched and developed.
To use open committees, you will need to place a special opening message in the marketplace smart contract. This message must contain the requirements of your smart contract chain, which will be used as an invitation to bid. Assembly will later use the aggregated score to match the requirements and the available validators. Keep in mind that Assembly aims to be an open marketplace, so even if the protocol has selected the potential validators they will still be able to choose to accept or reject the seat based on fees offered by your smart contract chain. We also aim to allow you to assign some of the seats in the committee to nodes of your choosing, forming what are known as semi-closed and semi-open committees.
We are also investigating the feasibility of the fisherman to encourage honest actors to report misbehavior. Validators that are proven to have misbehaved may be replaced through the rotation procedure. This would purge unreliable nodes and “lazy participants” (i.e. any node which aims to collect rewards without doing the necessary calculations for the smart contract), making the chains more reliable. Assembly will decrease the trust and reliability scores of any node that is removed from a committee and likely slash their stake. Honest validators, or fishermen, will be encouraged to report any misbehavior they detect by being rewarded by Assembly with part of the slashed stake
What is the root chain?
The root chain of Assembly will run Assembly smart contracts, responsible for open market operation: keeping a registry of validators and their trust scores, collecting and holding stakes, checking fraud proofs and performing punishing logic (the supreme court function), transparently selecting validator committees according to invitations to bid from the chain owners.
The road to truly decentralized and permissionless smart contract chains
The Assembly network aims to develop IOTA Smart Contracts to the point of being truly decentralized and permissionless while still secure. As you can imagine, this is a complex endeavor with many open questions. The Assembly research team is actively working on the multiple stages necessary to achieve this, from our starting point where the IOTA Foundation will run multiple coordinated nodes to the end goal where we aim to replace the coordinator with fully decentralized and permissionless entities with shared security. This research journey will provide valuable insights into the future of smart contracts and will steer development in the right direction.
The Assembly smart contracts aim to incentivize participants in the open market of validators to act honestly and discourage misbehavior. Only trustworthy validators with high trust scores will be able to earn rewards by participating in Assembly.
Assembly’s fees, stakes, rewards, and penalties aim to work together to create a vibrant ecosystem. Honest actors are compensated with ASMB tokens for making the network more reliable and secure for all smart contract chains.
The next article in the Meet Assembly series will introduce the other main actors involved in the Assembly marketplace.
If you are interested in discovering more:
- Learn more about validators in the IOTA Smart Contract Documentation
- Participate in the network by running your own node
- Build your own smart contract chain with IOTA Smart Contracts
- Visit the official Assembly website
This is the second blog post in a four-part series introducing the Assembly network: you can find the other parts here:
- Meet Assembly 1: Your Key to Open and Decentralized Worlds
- Meet Assembly 3: Assembly as a Marketplace
- Meet Assembly 4: Interoperability and Composability