An integral part of the Fetch.AI vision, that we have so far kept under the radar, is our technology for providing the world’s fastest, most secure and most decentralised ledger. Consensus is, of course, a vital part of any ledger design, and I am delighted to be able to announce the release of our minimal agency consensus protocol, which combined with our scalable ledger, enables Fetch.AI to overcome the blockchain trilemma.
We have already succeeded in developing a sharded blockchain that can process up to 30,000 transactions in each shard. By running many of these shards, we will be able to offer vast and scalable throughput that can provide the truly low-cost transaction and smart contract platform that will allow us to achieve our ambitions for autonomous agents.
The blockchain trilemma states that scalability can only be achieved by sacrificing either security or decentralisation. The idea behind our protocol is to reduce the “agency” or ability of block producers to control which transactions are entered into the blockchain. This ensures that the participants in the network are forced to behave in a very restricted way, and endows the ledger with similar cryptoeconomic security and performance characteristics to centralised systems. At the same time, the combination of this consensus scheme with a sharded blockchain enables everyone to participate in the network without needing to buy specialised equipment or to be very wealthy.
Consensus design is a technical subject, so we’ve used a Question and Answerformat to explain the most important aspects of the consensus in a way that is intended to be accessible to non-experts. You can find more details in our yellow paper.
Can you briefly describe your consensus mechanism?
The protocol uses a Proof-of-Stake mechanism to construct a blockchain. The ledger nodes that add each block are elected using a decentralised random beacon (DRB). This is a cryptographic technique that enables the ledger nodes to collectively compute a random number in a way that cannot be controlled (or stopped) by any single participant in the network. The DRB is used to elect a committee that propose transaction sets that are stored on a Directed Acyclic Graph (DAG). A leader then closes the DAG and these transaction sets are converted to a block, which is added to the chain. The DAG is a transient (non-permanent) data structure and does not need to be kept indefinitely.
(a) A blockchain is a linked list of blocks. (b) In Directed Acyclic Graphs (DAGs) the blocks have more than one connection to blocks that were added previously to the chain. The two data structures have distinct properties that are useful for different purposes. Blockchains have strict ordering, which is useful for providing rapid and secure finality while the DAG can be modified asynchronously. A transient DAG is used in the Fetch.AI consensus but this is later converted to a blockchain.
A useful Proof-of-Work (uPoW) procedure is used to solve the problem of efficient transaction execution. We have extended this concept to a larger range of problems and now refer to it as “synergetic computing” to reflect the wider scope of the technology.
What is the philosophy behind the consensus and how does it improve on what already exists?
The fundamental design principle is minimal agency, which means that individual nodes have little direct control over the transactions that are entered into the global state. The way this is implemented is that the nodes submit candidate transactions but the choice over which of these is added to the global state is specified by a public, deterministic algorithm implemented in the Fetch virtual machine. This has many advantages over other protocols, particularly in resisting transaction censoring or denial-of-service attacks. This allows security to be achieved without compromising transaction throughput.
How does someone participate in the consensus?
Users can participate in the consensus by purchasing a stake and turning on their computer. The ledger is designed to achieve high throughput by running a small number of shards on a desktop PC. The consensus is also compatible with a ledger running a larger number of shards for higher throughput. At higher throughputs, people will still be able to participate in the consensus by running a subset of the shards on their desktop.
Doesn’t Proof-of-Stake mean that the rich get richer? How do you prevent that from happening?
It’s important to understand what Proof-of-Work and Proof-of-Stake mean from a security perspective. In both cases, they represent a cost for participating in consensus. If you sum up the costs of all participants then you have a measure of the cost for an attacker to take over the protocol. The best outcome that any secure consensus design can hope to achieve is therefore to lower the barriers to entry and to allow as many individuals as possible to participate in the consensus. The advantages of Proof-of-Stake are that an attacker must purchase a larger number of tokens on the open market than the existing stakeholders, which will typically involve a much higher cost. The other important feature that is necessary to prevent the “rich from getting richer” is to ensure that the rate of return and risk (i.e. variance) in rewards is identical for both smaller and larger stakeholders. Our protocol design fulfils all of these requirements, which will prevent centralisation of tokens.
How do you deal with a nothing-at-stake attack?
The blockchain incorporates a deterministic notion of finality, which means that for nodes following the protocol, the chain cannot be modified beyond a certain block depth. The blocks are also created collaboratively by a randomly-selected committee of nodes using a DAG. Attempts to add multiple vertices to the DAG can be detected easily and resolved by fining the perpetrators (this is known in the field as stake slashing). The design incorporates a novel algorithm that makes generation of forks in the DAG by attackers easily detectable by honest majorities.
How does your protocol solve the scalability trilemma?
The scalability trilemma states that it is difficult to simultaneously achieve the properties of scalability, security and decentralisation in any ledger technology. We believe that our consensus and ledger design represents a viable solution to the scalability trilemma.
● Scalability is provided by the sharded ledger, which delivers scalable transaction throughput.
● Decentralisation is ensured by node operation being open to everyone and not requiring any specialised equipment.
● Security is provided by the minimal agency design, which restricts the potential for attack and enables non-zero transaction fees to be levied on users without artificially constraining the system’s throughput.
Why do you use a decentralised random beacon (DRB)?
We use Proof-of-Stake and a decentralised random beacon for allocating responsibilities to different nodes at different times. This is an energy-efficient, secure and scalable alternative to Proof-of-Work that we believe is likely to become an industry standard in the coming years.
How does your protocol improve over others that use a DRB?
The main difference is in design philosophy. Most of the other projects use classical theories of distributed computing and cryptography. These are based on the concept of an adversary who is endowed with a specific set of capabilities. The goal is then to design the system to be resistant to the specified attacker. In our case, we are still using the classical adversarial models but we are also treating the blockchain as a multi-agent system where all of the agents (in this case processing nodes) are self-interested, and security is additionally provided by making any deviation from the protocol costly for the participants. This is similar to how the existing economy works; most people trust Visa with their transactions or Google with their data because they know that the financial cost of abusing that trust makes it unprofitable for those companies. The profit incentive combined with their reputation for reliability gives consumers confidence that these firms can be trusted. The minimal agency principle also provides protection against many different types of misconduct such as bribery or fraud that any node can successfully achieve.
Your protocol incorporates a DAG. What are the advantages of your consensus scheme compared with other DAG-based ledgers?
A disadvantage of DAG-based protocols is that they might sometimes lead to transactions taking an unreasonably long time to be accepted into the ledger; an issue that is known technically as liveness. One way of resolving this problem is to use a coordinator to snapshot the DAG at different time intervals. Unfortunately, protocols that use this approach are effectively under the control of the coordinator and therefore centralised. DAG-based platforms are currently unsuitable for smart contracts as they do not provide strict ordering of transactions. They also contain redundant information that needs to be stored indefinitely. We believe that our protocol delivers better liveness, scalability, security and smart contract systems than any existing ledger that is based solely on DAGs.
How does your protocol remove the need for a central coordinator?
The decentralised random beacon elects a committee of leaders who fulfil the same role as the central coordinator. The random nature of the leader election, the cycling of the leadership role and the minimal agency design provide greater security than a centralised alternative.
How is your protocol different or better than existing scalable blockchains?
An important difference with most of the existing scalable blockchains is that we do not impose any restriction on the number of nodes that can participate in the consensus. Several prominent cryptocurrencies deliberately limit the number of node operators to enable higher throughput but this means that their ledgers are more easily controlled by centralised cartels. In many cases, the situation is made even worse by the node operators being able to extract very high rents through inflationary block rewards. This will cause even greater centralisation of wealth in the future, very much to the detriment of other users. The Fetch.AI token is non-inflationary, which protects the value of users’ holdings.
What is the difference between Fetch.AI and other AI/ML blockchain projects?
Fetch.AI is a state-of-the-art cryptocurrency project whose goal is to build the fastest, most scalable and secure ledger in the world. This differs from the other projects whose focus is more restricted to AI applications. Another important difference is that Fetch.AI is building a platform for multi-agent systems, which we believe is the most appropriate scientific formalism for building blockchain applications. We’re planning on using machine learning in the Open Economic Framework (OEF) for matching trading partners and for intelligent search and discovery, but this is with the aim of supporting the multi-agent system development.
What are your future plans?
We’ll be releasing more details in the coming months, including academic papers, details of patent applications, articles for the general public and benchmarking of the consensus’ performance on the test network.
It sounds like you are making good progress on the ledger itself. How does this affect the economic platform for autonomous agents?
There is a synergy between these two elements. The Open Economic Framework (OEF) depends on the blockchain to act as the medium for financial exchange, while the OEF provides cryptoeconomic security to the blockchain. It’s going to be exciting to further develop the connections between these fascinating technologies.
Thanks to David Galindo, Troels Rønnow, Marcin Abram, Jin-mann Wong, Daniel Honerkamp and other colleagues at Fetch.AI for their help in preparing the consensus document.