Introduction

This article aims to explain in an easy and very simplified fashion, how the IOTA Foundation Research and Engineering teams are working towards the goal of removing the Coordinator and, therefore, achieve complete decentralization in terms of consensus. Keep in mind that Coordicide is a dynamic project and some of the items explained in this post may change in the coming weeks.

IOTA Current state

As we all know, IOTA is a revolutionary DLT that utilizes a Directed Acyclic Graph (DAG) called the “Tangle” as data structure instead of the well-known blockchain. The reason for this is, mainly, the limitations in terms of scalability that blockchains have: every block on the chain can carry a limited amount of transactions. Apart from this, blockchain based DLTs rely on consensus mechanisms, that require some sort of mining, which leads to the necessity of a fee per transaction to pay miners work.

At the time of writing, IOTA is decentralized in regards to its Ledger: just like Bitcoin the IOTA network consists of thousands of full nodes communicating messages using the Gossip Protocol. Each node uses this protocol to validate that their copy of the ledger is consistent with the rest of the network.

The way consensus finality is achieved in the Tangle today is centralized. A set of the transactions added to the Tangle’s DAG are selected as valid by a centralized special node called Coordinator, while other conflicting transactions are left behind, never confirming.

The next big step for IOTA is to find a way to have a consensus mechanism that do not require centralized entities, fees or miners.

This article will explain in a simple way, how this will be achieved.

IOTA post Coordicide consensus

After analyzing different approaches, the IF Research team arrived to a solution called Coordicide, which is based on the resolution of conflicts using a voting system. This means that, for any two transactions that are in conflict, nodes will vote and exchange their opinion regarding which one is deemed valid. Every node will be able to request/reply to a randomly selected set of nodes what they think about the conflicting transactions. Every time a node requires other random node’s opinion is a round. After a sufficient number of rounds is reached, nodes decide which transaction is valid and the consensus arrives to finality.

This seems pretty straightforward -and it actually is- but, in order to have such model working in a safe way, other measures need to be put in place to tackle some of the attack vectors this process is exposed to. Sybil Attacks (nodes faking their identity while trying to spread wrong information), Spam, Eclipse Attacks (nodes surrouding a given node to feed it with fake data), are just a few of the attack vectors that need to be addressed.

Coordicide handles all this with a set of modules and functionallities that interact to ensure the arrival to consensus.

Next, we will give an explanation of what these features are and why they are needed.

The Coordicide Blocks

a. Node accountability

Since nodes will exchange opinions and dishonest nodes are expected to exist, having a method to identify each network participant is essential. This way, every exchange of data includes the sender’s ID and, if nodes maliciously interfere with the consensus they can easily be identified and punished. This is key to handle sybil attack scenarios, as we will discuss later.

b. Mana: a Sybil protection mechanism

By design IOTA favors actors behaving well in the network. If you want to place your transaction into the Tangle and you validate two other tips suggested by the Tip Selection Algorithm (TSA), your transaction will likely be validated fast.

Same applies to the proposed consensus model: nodes behaving correctly (i.e: processing and communicating transactions correctly for a certain duration in the network) are of value and will gain in reputation. This is useful and is needed to be able to properly identify them from the universe of existing nodes. You will want to know who these honest guys are and prefer them over other nodes with less mana when having to transact on the network or asking what they think about a suspicious transaction.

This is what mana is for. You can think of it as a scarce resource distributed in a democratic way that reflects active participation of nodes in the network. Every time a node acts as expected by processing value transactions it gets an amount of mana equivalent to the number of tokens of the value transaction it has processed. So, if we use Alice’s node to send Bob 10 Giotas, her node will get 10 Gi of mana.

Before moving forward, it’s important to explain some aspects that lead to common misunderstandings regarding these parallel tokens.

Mana cannot be sold. Nodes get a given amount of mana reflecting the value transactions they have processed (1:1), but nodes operators cannot transfer mana to other nodes without transfering them miotas. Mana cannot be accumulated in a way that massively used nodes (such as Exchanges nodes) can get a huge amount of mana. The reason for this is that mana has a decay mechanism by which nodes drop mana continuously, so they can keep a good amount of mana only if they keep working as expected on the network, but if they halt, they will loose it.

Mana is a key piece of the IOTA Coo-less consensus mechanism since many operations, such as the above described selection of nodes to query for opinions on conflicting transactions, will prefer reputable nodes over others that cannot prove honest work on the network.

Together with the ability to identify nodes (node accountabilty), mana allows to deal with sybil attacks by beign able to match identities with an amount of scarce resources obtained doing work for the network.

c. Autopeering

IOTA’s current implementation uses manual peering: node operators need to mutually agree to neighbor. This is, not only tedious, but also insecure as you need to know and trust your neighbors to be sure that the transactions they send to your node are honest. We say that a node suffers from an Eclipse Attack when its vision of the current ledger is altered by its neighbors sending fake information in order to change his view.

The autopeering method proposed by the research team acts in a way that makes these attacks really difficult by selecting your neighbors automatically. Each node will have 8 neighbors: 4 selected by the node (Chosen neighbors) and 4 that selected that node as neighbor (Accepted neighbors). The selection process uses a distance function with a public salt that takes in account distance between nodes and regenerates the public salt periodically. Considering that this (unknown and changing) public salt is needed to peer and that the 8-neighbor set rotate periodically, to eclipse a node becomes really hard.

d. Rate Control

This is the Coordicide piece in charge of handling spam and regulating the amount of transactions nodes can handle in order to avoid congestions/bottlenecks. But, how does it work?

The proposed solution implements adaptative Proof of Work making sure that nodes get a puzzle as difficult to solve as needed to avoid congestion/flooding/spam, while other devices with low computational capabilities can do a small fixed PoW.

Rate control allows to adjust the amount of work a node must do in order to process transactions considering its throughput and transactions processing volume. So basically, spammers sending loads of transactions will have to deal with a harder proof of work in order to spam while other nodes behaving normally can keep dealing with the regular PoW.

e. Voting

As we described earlier in this article, conflict resolution is done by voting. Voter models are not all that new: they’ve been in existance since the decade of 70's and have been used several times proving to be effective on arriving to consensus. The IOTA Foundation proposes a novel voter model named Fast Probabilistic Consensus (FPC)(Serguei Popov, William J Buchanan).

The way this model works, transactions sent to the Tangle remain as pending for a short period that allows to seek and find for existing conflicts. If there are no conflicts, a transaction gets confirmed right away. If any conflict exists, FPC takes place so the node that got the conflict can consult other nodes selected randomly from the network about their opinion on which one is the genuine transaction.

Since the nodes we ask to like or dislike one of the conflicting transactions are randomly selected from the network (notice that requests are done to random nodes and not limited to our neighbors), it is really hard to influence the voting outcome.

On top of this, nodes with good reputation on the network (high mana) are more likely to be selected from the nodes pool every node has. So even if an attacker manages to own a vast percentage of the network nodes, he would still need to behave well for a while in order to be able to flip voting in favor of the dishonest transaction in a conflict. It is possible, but it’s just a lot of work only to flip some votes on a couple of transactions and as a result to most likely drop mana rapidly.

Some notes

As stated in the beginning of this article, this is a naive approach to how the IOTA consensus will work in the post Coo era, aiming to be accessible for readers without a technical background. Every single module covered here can be studied in depth in the Coordicide Whitepaper, where you will find mathematical proof and simulation results obtained using Goshimmer, the prototype in which the IOTA Foundation is building the blocks for the proposed solution.

It is important to clarify that, once this is implemented on the mainnet there is no coming back if something goes wrong, so the IOTA Foundation is taking all measures to test every component and an intermediary instance will be rolled out on the testnet (Chrysalis) to fully validate this solution in the real world.

Hope this helps to understand the guidelines of how the new consensus will work!

— — — — — —

Thanks to Eric Hop for always been open to discuss/review ideas and to Herbert Bossaerts for his help correcting the text to remediate my latino-like english =)