When assessing the seemingly countless blockchain platforms appearing in recent years, neither users nor critics fail to emphasize scalability. Recently, with the development of sharding technology, real improvements are being made in the area of blockchain scalability. One project, in particular, has built a powerful new technology with the potential to vastly improve the scalability of public chains.
Alephium, the brainchild project of Cheng Wang, aims to scale blockchains to handle tens of thousands of transactions per second [10,000+ TPS] in an open, permissionless network. Its core algorithm, called BlockFlow, combines sharding technology with DAG [Directed Acyclic Graph] and utilizes a scalable UTXO [Unspent Transaction Output] model to resolve the inefficiency of sharding performance during cross-shard transactions. By breaking down smart contracts into token protocols and data protocols, Alephium allows developers to build dApps that support high concurrency scenarios while maintaining the Turing-complete functionalities of smart contracts.
How does Alephium differ from existing sharding projects?
Alephium is simple, efficient, secure, and pragmatic. However, the most significant feature of Alephium is its native support for cross-shard transactions which provides a user experience similar to single-chain platforms. Alephium’s core BlockFlow algorithm follows the same minimal network assumptions as Bitcoin – an open and asynchronous network. As a permissionless and decentralized platform, everyone can contribute to Alephium’s consensus and safety.
Methods of Sharding
In a single-chain structure, the hash of each block is stored in the block header of the next block. This allows the transactions of the entire network to be squeezed into a single transaction list. However, forcing the total ordering of transactions ultimately reduces the overall system throughput and increases latency.
Alephium hopes to address these issues of scalability through their BlockFlow algorithm by combining sharding and DAG, which reduces the transaction load of each node significantly. In the above example with three address groups, there are nine shards in total. With BlockFlow, nodes belonging to address group B only need to download transactions from five of the nine shards. This greatly improves the scalability of the platform.
Many sharding projects support cross-shard transactions today but usually rely on methods that negatively affect the throughput of the system. The Alephium project uses its two-layer sharding model to improve cross-shard transactions so as to improve the performance of the general system. The first layer of sharding is for transaction addresses, and the second layer of sharding is for transactions based on the first-layer sharding results of their input addresses and output addresses [see the figure above]. The UTXO for each cross-shard transaction in Alephium sits at the address of the received shard, which reduces the usual two steps required for cross-shard transactions to only one. With the immutability and atomicity of UTXO, it is easier to prevent malicious spending in parallel.
Fork choice rule: One of the biggest challenges surrounding sharding algorithms is reaching consensus across all shards while some shards have temporary forks. This is often referred to as the fork choice rule. Alephium’s BlockFlow consensus uses a DAG data structure to resolve fork dependencies in the network.
As shown in the figure above, each new block in BlockFlow includes a set of carefully selected hashes of existing blocks as dependencies. The selection rules [see the whitepaper] guarantee that these dependencies would determine a unique fork for each shard in the system. Therefore, each new block determines a unique ledger that is distributed across all shards. The dependencies for each new block are chosen by miners such that they comply with BlockFlow’s selection rules and the work accumulated in these forks is maximized. By mining new blocks from all shards in parallel, the ledger with the most work continues to grow and nodes in the network need to validate these dependencies when receiving a new block.
Security: Due to the dependencies between blocks from different shards, an attack on any particular shard would require attacks on the other shards as well. As such, the cost of double spending remains at 51% of the total mining power.
High Throughput: Alephium’s new technology introduces significant performance gains. In late 2018, Alephium achieved a peak throughput of over 10,000 TPS during tests of its Alpha version with consumer-grade instances on AWS.
Alephium’s efficient and practical approach to dApps combines token protocols, data protocols, and smart contracts. In most cases, smart contracts are broken down into token protocols and data protocols, which are naturally scalable across all shards. Alephium’s token protocol offers programmability. Developers can take advantage of the token protocol to build simple yet efficient dApps. Meanwhile, Turing complete smart contracts are still supported for select shards called intra-group shards, and dApps can benefit from cross-shard transactions without sacrificing standard smart contract features. As such, Alephium is the first practical platform to support efficient cross-shard dApps.
Alephium is backed by an impressive team. Founder Cheng Wang is an expert in cryptography and distributed computing. He previously worked as an algorithm engineer at BestMile and was a Senior Data Scientist at Swisscom. He proposed the first linear-time asynchronous Byzantine agreement algorithm and co-authored research papers “Beyond One Third Byzantine Failures” and “A Thrifty Universal Construction”, which won the 2015 NETYS Best Paper Award.
Alois Cochard, Alephium’s co-founder, was previously CTO of BestMile, which ranked second in the Top 100 Swiss Startup Awards in 2018. He is an experienced architect in distributed systems and has delivered talks at well-known functional programming conferences.
With the unique combination of sharding and DAG technology, Alephium’s BlockFlow algorithm challenges the boundaries of blockchain performance and scalability. With verifiable improvements to throughput and practical and efficient protocol design, developers are able to build high-performance dApps that retain Turing completeness.
For more information, follow Alephium on Website, Telegram, Medium, Twitter, and Reddit.