🌊Why Aptos? Why Sui?

The Reasoning

Introduction

After years of seeking regulatory compliance, Diem, a cryptocurrency payment project from Facebook/Meta, ended abruptly in 2022. Its assets were sold off, including the underlying blockchain network. In its wake, a trail of talent was left behind. Sui and Aptos were the fruit that came from the collaboration among former Diem employees. Cumulatively, both chains represent the culmination of years of distributed ledger scalability research, and have gained significant traction within the space over the past six months. In this paper, we’ll discuss the fundamental differentiating factors between both blockchains and their implications.

For an in-depth overview of both blockchains, refer to our previously published reports on Aptos and Sui.

What is Aptos?

Aptos Labs is co-founded by Mo Shaikh and Avery Ching, both former Meta employees with years of experience as senior developers and engineers in the blockchain industry. Mo Shaikh and Avery Ching were unwilling to accept the fate of the project they had spent nearly three years on. Therefore, they decided to continue their work, only this time as CEO and CTO of the newly founded Aptos Labs.

Based on the knowledge its staff gained working on the Diem codebase, Aptos Labs sought to create a general-purpose blockchain network with the following goals in mind:

  • Revive Diem’s technology by utilizing its programming language, Move, to create a scalable, secure, and flexible infrastructure that could compete with existing blockchains like Bitcoin and Ethereum.

  • Ensure high throughput, low latency, and verifiable state synchronization in a decentralized network by leveraging Diem’s architecture along with a wide variety of novel techniques.

What is Sui?

Sui is a blockchain project by Mysten Labs with the aim of being the first internet-scale programmable blockchain platform. Similar to Aptos, Sui was founded by a team of researchers who previously worked at Novi Research (Meta’s advanced crypto R&D team). Among the founders is CEO Evan Cheng, who formerly headed research and development for Meta’s crypto wallet effort.

During the team’s time at Novi Research, they had the opportunity to dive into the intricate layers of blockchain networks in order to challenge performance and efficiency. However, just as most crypto-related stories go, the team was captivated by the alluring potential of blockchain technology and decided to leave the comfort of their secured positions at Novi Research, ultimately forming Mysten Labs.

Sui was founded under the premise that, due to the issues that constitute the blockchain trilemma, current blockchain networks aren’t efficient enough to scale into the demand that comes with at-scale adoption. It’s important to note that Sui itself is not a derivative of Diem. Sui was built from scratch with fundamental scalability in mind to enable instant settlement while also providing the high throughput, low latency, and low cost required to power applications for billions of users.

Differences

Move Programming Language

Sui and Aptos both utilize a Rust-based programming language called Move. Sui’s version of Move is slightly modified compared to Aptos, which uses a version closer to the original iteration.

Move differs from other programming languages (e.g., Solidity) due to its use of resources, inspired by the mathematical concept of linear logic. In linear logic, formulas are treated as absolute resources that can only be used once. Move’s main feature is the ability to define custom resource types, which statistically ensures that a resource can only be moved between program storage places and never cloned or deleted (thus the name ‘Move’).

This implementation improves security by effectively preventing issues, such as the vulnerabilities described above. Resources are then governed by move modules, similar to smart contracts in that they control the procedures that encode the rules for creating, updating, and deleting declared resources. Move modules’ benefit over smart contracts is their enforcement of data abstraction, meaning that data representations within modules have cleaner code structures, making them easier to navigate and reduce the risk of human error(a resource is transparent inside its declaring module, and opaque outside of it). Furthermore, with the help of Move’s flexible programming architecture, the Move prover can formally validate the characteristics of Move modules and is efficient enough to be used in continuous integration testing.

The primary difference between Sui’s iteration of Move and Aptos/Vanilla Move is Sui’s use of an object-centric model, as opposed to an address-centric model. As a result, most of what you see on Sui (e.g., tokens, smart contracts, NFTs) can be represented as “objects”, each with a list of attributes, including the address of its owner, read/write properties, transferability properties, functionality properties, etc.

Aptos, on the other hand, mirrors Diem’s whitepaper and works similarly to most blockchains; almost all activity on the ledger involves changing data associated with addresses. The issue with this design approach is that each simple transfer necessitates two ledger updates, one for the sender and one for the recipient. On Sui, almost all on-chain activity is done by modifying the data associated with each object, meaning that most transfers only require one update to the ledger (e.g. a token transfer between two people just requires a change to the object’s “owner” attribute).

Developer Experience

Conversations with protocols like Mira Finance, who have experience building on both blockchains, suggests that the developer experience on Sui is slightly more optimized due to the implementation of Sui’s Developer Kit(SDK). The SDK was created to serve as a means of optimizing the user experience for builders on Sui,providing developers with open-source, versatile, and user-friendly tools.

With that said, the differences in the developer experience between both languages will primarily depend on how much experience a developer has with low-level languages. The more familiar developers become with Move, the narrower the gap between languages becomes. This is primarily due to Move’snotable nuance, which creates a relatively steep learning curve for those used to more traditional blockchain languages, like Solidity.

Consensus

Sui and Aptos are fundamentally different from an architectural standpoint. Nearly every technical deviation between the two blockchain models revolves around how each chain utilizes distributed ledger technology.

In contrast to Aptos, which records its ledger as a blockchain, Sui’s distributed ledger serves as an “object store” where data is recorded as a directed acyclic graph (DAG). While both design types are considered efficient, and share similarities with traditional blockchains, their differences play an essential role in their consensus mechanism and general scalability.

Sui uses an asynchronous consensus protocol called Narwhal and Tusk. The dual name correctly implies that the system divides the responsibilities of ensuring the availability of data submitted to consensus (Narwhal) and agreeing on a specific ordering of data (Tusk). Since this is accomplished in two-layer modules, Narwhal can be used in conjunction with an external consensus algorithm such as HotStuff, Istanbul BFT, or Tendermint. Narwhal is currently being integrated into the Celo and Sommelier blockchain.

One of the primary differentiators between Sui and other L1s is the lack of a dependency on the consensus protocol. Sui only runs consensus as needed to checkpoint its state regularly, and for transactions that require a total ordering. Unlike other blockchains, Sui forgoes consensus for a majority of transactions through the utilization of “causal ordering.” Causal ordering means that Sui doesn’t always require consensus; when it does, transactions are causally ordered, whereas other blockchains always completely order them. This consensus architecture is a theoretical improvement to performance, as it enables Sui to parallelize the execution of many transactions.

Aptos is running on the fourth iteration of their consensus protocol, Aptos BFT, which they claim is the lowest latency and most advanced iteration to date. The consensus protocol is a derivative of HotStuff, the underlying consensus protocol initially used at Diem. Recent additions to the system include an innovative reputation system that is particularly conformed for decentralized environments, examining the on-chain data and automatically changing leader rotations to account for unresponsive validators without requiring human intervention. This piece of automation allows Aptos to validate transactions in under a second. Furthermore, blocks are now committed in significantly shorter trips (down to 2), making sub-second finality the average occurrence.

Scalability

Due to limitations on throughput, users of existing blockchains pay hefty gas fees as network usage increases. Furthermore, as application demand scales, high latency can become an issue, consequently affecting the responsiveness of dApps. Sui adapts to the demands of decentralized applications by focusing on scaling horizontally. Recent tests have shown that an unoptimized single-worker Sui validator running on an 8-core M1 Macbook Pro can execute and commit over 120k transactions per second (TPS).

The number of workers scales proportionally to the processing power of nodes, resulting in reduced gas prices even during periods of network congestion. In theory, this means Sui’s node infrastructure has the capacity to scale the network throughput as demand and utilization increase infinitely.

While the current TPS on the testnet sits around 4,000TPS, Aptos Labs is following a roadmap that they believe will allow them to maximize the utilization of their engine, which they claim has a max TPS capability of 100k+. Per their roadmap, achieving maximum engine utilization will happen when three milestones are reached.

  • The first milestone requires the separation of consensus from execution. By eliminating the co-dependencies that come with combining consensus and execution, higher throughput and latency are achieved.

  • The second milestone is achieving optimized transaction execution times through the use of an in-memory smart contact parallel execution engine called Block-STM. STM stands for Software Transactional Memory, a new approach to engineering that supports flexible transactional programming of synchronization procedures. However, when applied generally, STM models suffer from performance limitations due to a conflict between bookkeeping and aborts. With that said, upon evaluation Aptos Labs has concluded that when applied to specific use cases such as DLT along with a combination of innovative techniques, they were able to achieve 100k+ TPS with 32 cores within their execution-only benchmark. Furthermore, their experimental evaluation has also shown that Block-STM outperforms sequential execution by up to 20x on low-contention workloads, and up to 9x on high-contention ones.

  • The third milestone is achieving an optimized authenticating data structure. To combat the scalability issues that come with writing Merkle-trees to persistent storage, Aptos is developing authenticated data structures with the aim of being a scalable, database-friendly solution. This will be achieved through the evaluation of higher branching factors, access pattern optimized caching, and careful versioning,

Conclusion

Scalability has been a common topic of conversation within the space over the past few years. It’s become apparent that many widely used blockchain systems aren’t inherently optimized to support blockchain technology’s continuous growth and adoption. Like Solana, both Aptos and Sui attempt to address blockchain limitations through horizontal, rather than vertical scaling .

Cumulatively, the chains represent the culmination of years of distributed ledger scalability research. Through innovative mempool and consensus protocols, Sui and Aptos aim to outperform existing vertical throughput architectures. With that said, both protocols are very early in their developmental stage, and until the actual implementation of Aptos’ and Sui’s respective designs are live and time-tested, there isn’t enough measurable data to confidently conclude that one model is superior to the other.

Last updated