Aptos v. Sui: Dawn of the Scalable L1s

Move-Based Systems and the Death of the EVM/eWASM

Sid Sridhar
9 min readAug 5, 2022
Photo by Shubham Dhage on Unsplash

What is the Move programming language?

Understanding the titans of the Move language — we need to understand Move’s placement in process and op-code scalability as a stack-based-language.

Move works like all stack-based languages because operations are done by pushing and popping items on the stack. Based on the execution model, each account (256-bit address) can have zero or more modules and one or more resource types. Each type of resource can only be used by one account. If needed, a custom resource type could be made with more than one instance of the same type of resource.

Any variable that is marked as a resource will have some restrictions built in. You can only move resources; you can’t copy them. They can only be made or destroyed in the modules where they are declared. Once a resource is used up, it can’t be used again. This is a big reason to avoid spending the same money twice. Resources can only be moved once. This makes sure that any resources that are left hanging because a developer forgot about them are found during verification.

There are also some rules about how modules can be used. Any module can do something with the resources it refers to. They can only write or refer to values from other modules. They can’t create or destroy resources. In particular, they can only “move” resources from one module to another.

The language also has a lot of built-in functions that can be used to find out what resources are worth or to destroy them. Built-ins can only be used on resources that are declared in the current module. So, if a developer forgets to declare a procedure to use built-in to refer to the value of a resource, that resource can’t be seen or changed.

It’s safe to say that I’ve met my fair share of “Move Maxis”

What is Aptos?
Aptos is a Proof-of-Stake (PoS) Layer 1 (L1) blockchain. It was made by the original researchers, engineers, and designers of the Diem blockchain, which was started at Meta. Even though most of this is being made by the people who work on Diem, it is not Diem and is no longer associated with Meta.

Aptos wants to solve the trilemma of decentralization, security, and scalability in a way that can be used by a large number of people and businesses. Diem was designed to serve Meta’s more than 2 billion users, but Aptos will grow bigger than Meta’s network. (Note that Aptos means “for the people” in Ohlone, California.) Aptos’s tech stack is up-to-date because it uses new consensus mechanisms built on a flexible programming language that puts safety first.

At the time of writing, they completed their recent Series A, Aptos had already started the devnet. Several companies, such as Anchorage, Binance, Coinbase, Livepeer, Moonclave, Paxos, Paymagic, Rarible, and Streaming Fast, had contributed code and given feedback.

Blockchains have come a long way, but it’s no secret that they are still dangerous and hard to understand. The decentralization movement struggles to gain speed because you can’t always count on things being reliable, safe, and easy to use. All of these problems make it harder for people and even the biggest companies in the world to adopt. There needs to be a new Layer 1 blockchain that is designed to solve these problems. Aptos was built with a focus on absolute safety, scalability, and credibility.

Aptos uses a Block-STM execution method, capable of powering 160,000 TPS.

“We designed and implemented a highly efficient, multi-threaded, in-memory parallel execution engine that can execute over 160k non-trivial Move transactions per second.”

They accomplish this by avoiding the sequential execution used by many blockchains (which is not optimal for scaling), instead opting for “a parallel execution engine that extracts the maximum inherent speedup that is possible.”

What is Sui?
Sui is the first permissionless Layer 1 blockchain built from the ground up to allow creators and developers to create experiences for the next billion web3 users. Sui is horizontally scalable, allowing for unrivaled speed and low cost application development.

Sui scales horizontally with no upper bound in order to meet application demand while maintaining extremely low transaction costs. Its breakthrough in system design eliminates a critical bottleneck in existing blockchains: the requirement for global consensus on a total-ordered list of transactions. This computation is unnecessary because most transactions are not competing for the same resource as other transactions.

Sui significantly improves scalability by allowing parallel agreement on causally independent transactions. Sui authorities commit such transactions using Byzantine consistent broadcast, removing the overhead of global consensus while maintaining safety and liveness guarantees.

This breakthrough is only possible because of Sui’s innovative data hierarchy. Dependencies are explicitly encoded thanks to its object-centric view and Move’s strong ownership types. As a result, Sui agrees on and executes transactions on most objects in parallel, while a small number of transactions that affect shared state are ordered and executed in parallel via Byzantine fault tolerant consensus.

What are the differences between Aptos and Sui?

With the Solana and Nomad hacks taking place over the last few days, other L1s have become increasingly popular. Aptos Labs and Mysten Labs are two of the most recently discussed chains.

Apart from the fact that both teams originated from Meta, there are some superficial and fundamental similarities between Sui and Aptos, which are summarized below:

- Predicated on Move as its native programming language, though Sui has a slightly different object model than Aptos — Parallel transaction execution and consensus (enables low latency and higher throughput) based on Block Software Transactional Memory (“STM”) — rather than ordered transactions and sequential block execution in other L1 designs
- State synchronization for improved data availability
- SDKs and APIs for better DX/UX
- Tier 1 venture investor cap table
(shout out to the $APO team 😎)
- Valuation (more or less)

Based on the publicly available information disclosed today, the key differences lie beneath the hood. It appears that they are as follows:

  • Sui can keep gas prices low and predictable while incentivizing validators to optimize transaction processing and prevent denial-of-service (“DoS”) attacks. At the start of each epoch, validators vote on a network-wide gas price that users use as a reference when submitting transactions for processing. Validators are rewarded for remaining responsive and keeping gas prices close to the reference price per epoch. Those who submit excessively high prices are penalized with reduced rewards. Similarly, unresponsive validators receive lower rewards and face lower delegated stakes because users want transactions to be processed quickly. Furthermore, predictable gas results in predictable transaction processing. Because throughput scales linearly with more machines per validator, gas prices can remain low even during periods of high activity; validators can add more machines to meet increased network demand. Traditional blockchains are frequently designed to run on a single validator machine (or even on a single CPU).
  • Sui’s design is distinct in that storage fees are paid separately from transaction execution. Storage costs are intended to be denominated in off-chain dollars for storing arbitrary on-chain data. It is priced exogenously, based on governance polls. They make no distinction in terms of fees paid, according to the user. When a user submits data to the blockchain, they must pay for both gas and storage. The storage portion of fees is deposited into a “storage fund,” which covers the costs incurred by validators in storing users’ data. The fund will be used to subsidize future storage cost increases as the network grows and matures. Users, on the other hand, can delete on-chain data in lieu of storage fee rebates, up to an economic optimum.

For the following transaction types, there are two paths to consensus:

Simple transactions: Transactions that are defined as independent with no causal relationships and use Byzantine Consistent Broadcast. It is a leaderless protocol that eliminates the overhead of global consensus while maintaining safety and liveness guarantees. Faulty validators have no significant impact on performance, whereas most leader-based blockchains see throughput drop and latency increase when one or more validators fail. Transactions are optimistically validated and executed in parallel rather than sequentially or in batches, as is the case with most traditional blockchains. This is completed almost instantly.

BFT consensus: Narwhal and Tusk. Sui’s consensus protocol, like Aptos, is a HotStuff derivative. Sui’s and Aptos’ consensus mechanisms both reduce the amount of communication required between validators to process transactions, resulting in lower latencies. AptosBFT is asynchronous in some ways. Sui’s consensus design separates the protocol’s mempool from the consensus layer, whereas most PoS L1s use monolithic consensus protocols.

Narwhal (mempool protocol): Mempools store unconfirmed blockchain transactions until the consensus protocol validates them. Narwhal’s job is to broadcast transactions to consensus while keeping data accessible. Narwhal is not bound by the consensus protocol and can tolerate asynchronous behavior such as faults or intermittent loss of liveness.
Tusk (asynchronous consensus protocol) is in charge of transaction ordering. Tusk employs shared randomness to eliminate inter-node communication and allows each node to determine the total order of transactions. When combined with Narwhal, ensures high performance in the event of a fault.
Other Byzantine Fault Tolerance (“BFT”) consensus protocols can be combined with Narwhal and Tusk. The team released this code as open source so that the larger crypto community could benefit from their research (starting with their Celo and Sommelier partnerships).

  • Hardware Requirements: The requirements to run a full node can provide an indication of the degree of decentralization, though this is too early to tell.
  • More than 5,000 Sui nodes were operational in 65 countries as of June 30, 2022. Other factors driving decentralization will be discussed after both Sui and Aptos have launched mainnet.
  • Sui Development Kit (“SDK”): While Aptos has SDKs to improve DX / UX, Sui’s SDK attempts to bridge other ecosystems and non-crypto use cases.

These throughput numbers do not represent end-to-end blockchain throughput because they only take into account consensus, network, and partial storage considerations. They do not take into account other important considerations in a production blockchain, such as transaction execution times, account access patterns, or authenticated data structures (e.g. Merkle trees). On the finality front, block times are frequently confused with finality when, in fact, they are an input factor to finality.

Which blockchain is best?

Photo by Yulia Matvienko on Unsplash

Both L1s are still in their early stages, and the smart contract market is undoubtedly fiercely competitive. Both companies were founded around the same time, and the L1 projects themselves were several months apart. Despite the fact that Aptos and Sui have many similarities, they also have some interesting technological differences and disappointments 🥶.

Several industry participants have expressed disappointment with new L1 entrants such as Aptos and Sui. However, the reality is that there is currently no chain capable of mass adoption. While incumbents (L1s and L2s) benefit from being early movers, the gap narrows as new entrants (Aptos, Sui) close in — assuming they are capable of resolving significant scalability pain points and providing strong DX / UX. Nonetheless, the market is large enough to support a multichain future. The key questions are what that will look like and how many will be involved.

Sui’s testnet results should provide a more accurate sense of performance in comparison to other alt L1s. Similarly, it will be interesting to revisit this comparison after mainnet in order to analyze L1 performance / attrition across more metrics, such as both tokenomics, vesting schedules, and stakeholder allocation. Time will tell how the underlying technology influences overall DX/UX and who attracts more users / liquidity.

When multiple aspects of each ecosystem are considered, Aptos outperforms Sui and other alt L1s. In the short time since its launch, and despite having a few months’ head start on Sui, its ecosystem has grown by:

  • 2x for members of the community / users (proxied by Discord members and Twitter followers)
  • 3 times for developer activity (proxied by Github stargazers)
  • Comparable throughput, but mostly inconclusive accross metrics, such as TVL, active users (wallet addresses), active nodes, minimum staking requirements, and so on, can be analyzed after the mainnet.

When considering valuation at the time of writing, based on the most recent rounds, Aptos appears to have relative value given the ecosystem’s progress. Note Aptos recently raised $150MM in a series A round at a $2B valuation. Aptos provides more in terms of a robust community, developer activity, and dApp ecosystem for its $2 billion valuation, while also being more advanced in its testnet. To justify its valuation, Mysten Labs would need to close the gap between itself and Aptos across all metrics. This comes down to the fundamentals of attracting quality developers.

Thanks for reading the article! Check me out on Twitter and Telegram @thesidsridhar to check out what I’ve been investing in at the Draper Network, building on my own time, and analyzing across tech.

Shout out to the Alchemy Team!

--

--

Sid Sridhar

M.E.T @ Berkeley | Sold a fund | Sold a Web3 company | Sold my soul