- Sui is an upcoming Layer-1 smart contract platform with a unique, object-centric data model that is key in its ability to scale network throughput.
- On Sui, simple transactions like peer-to-peer transfers and NFT mass mints do not undergo consensus, allowing validators to process ~300,000 transfers/simple transactions per second.
- Sui throughput is horizontally scalable. Its network throughput grows as more computing power is added to each validator within the existing validator set.
- Sui Move, Sui’s programming language, has built-in safety properties that prevent certain types of hacks/exploits.
Should there be another Layer-1 blockchain? Ethereum, Solana, Avalanche, and many others are contending to become the principal base layer for smart contract development. Adding to the competition is Sui, a new smart contract platform that takes a different approach to the blockchain data model. Mysten Labs, Sui’s original contributor, believes Sui’s data model will allow it to become the first internet-scale programmable blockchain platform.
The Sui tech stack addresses three core issues of the blockchain space: scalability, safe programming, and mainstream adoption. Sui’s unique object-centric data model and consensus architecture allow the network to infinitely scale its capacity. Sui’s programming language Sui Move was built with safety guarantees that prevent common hacks/exploits and provide a better developer experience. Sui also plans to add a feature that would facilitate a smooth user experience by allowing applications to subsidize and abstract away consumer gas fees.
In June 2019, Facebook, which rebranded to Meta, announced its plans to build a permissioned blockchain and a digital wallet that would underlie a global payment network. Meta spearheaded an independent consortium, called the Diem Association (originally called the Libra Association), that was responsible for building the blockchain. Meta’s subsidiary Novi Finance (originally called Calibra) was in charge of developing the digital wallet.
Neither of the products came to full fruition. Diem shut down due to regulatory hurdles and sold all its assets in January 2022. Later that year, Meta ended the Novi project without providing a direct reason. Before shutting down, multiple leaders from the projects recognized that Meta’s vision for a global payment network was headed toward failure. Ultimately, two separate blockchains emerged from the initial Diem and Novi research: Aptos and Sui. While Aptos has continued the legacy of Diem by iterating on much of the technology developed from that project, Mysten Labs built something novel from the ashes of Diem: Sui.
Mysten Labs is the original contributor to Sui. It was founded in 2021 by former Novi project leads Evan Cheng, Adeniyi Abiodun, Sam Blackshear, George Danezis, and Kostas Chalkias. Together, the founders have research and product experience in software language compilers, static analysis (programming safety), distributed systems, cryptography, and cloud computing, spanning companies like Apple, Oracle, Microsoft, R3, and Facebook. Notably, Co-founder Evan Cheng was a recipient of the ACM Software System Award for his work in designing LLVM (a technology used in most Apple and Google devices today).
The Sui blockchain has yet to hit Mainnet, with plans to launch on May 3, 2023. In December 2021, Mysten raised $36 million in the Series A, led by a16z with participation from Redpoint, Lightspeed, Coinbase Ventures, Electric Capital, and other investors. In the Series B from September 2022, Mysten raised $300 million at a greater than $2 billion valuation, led by FTX Ventures with participation from a16z, Jump Crypto, Binance Labs, and other investors. Mysten Labs confirmed to Messari that these rounds were limited to the sale of equity, with no SUI tokens offered. (Regarding FTX, Mysten Labs completed the repurchase of FTX’s equity stake and warrant rights to purchase SUI tokens previously held by FTX for approximately $96 million.) The Sui Foundation, an unaffiliated foundation, was also established to build the Sui community and fund/support creating products on Sui.
Object-Centric Data Model
The key feature that distinguishes Sui from other distributed ledgers is its object-centric data model. Most smart contract platforms like Ethereum, Solana, and Aptos use accounts to keep track of the blockchain’s state, where accounts are the data structure holding users’ balances. Others like Bitcoin and Cardano use unspent transaction outputs (UTXO) to record the blockchain’s state — that is, UTXOs represent the amount of the asset that remains after a transaction has been executed.
Sui combines both approaches into a hybrid model where its history is stored in objects with globally unique IDs. The objects also contain metadata that determines different object characteristics, like ownership and transaction history (partially derived from object nonce values, also called version numbers). Sui’s object-centric data model implies that the global state is simply a collection of all Sui objects. Structurally, this takes the form of a directed acyclic graph (DAG), where objects correspond to vertices, transactions correspond to edges, and objects called “live objects” correspond to vertices without outgoing edges.
In Sui, all transactions take objects as input and produce new or modified objects as output. Every object contains the hash of the last transaction that produced it. “Live” objects are those that are available to be used as inputs. Hence, the global state can be determined by observing all live objects.
Sui’s object-centric data model allows it to parallelize object interactions at scale. Transactions on Sui are grouped based on the object interacted with. When multiple transactions are submitted simultaneously, validators can process the transactions in parallel on separate machines, so long as the transactions are not interdependent. This system also provides a unique avenue for scalability where capacity increases as the network's validators add more machines to their node.
Objects on Sui are either owned objects (like fungible tokens and NFTs) or shared objects (like DEXs and auction contracts). Specifically, Sui objects can have four different types of ownership:
- Objects owned by an address (NFTs or fungible tokens)
- Objects owned by other objects (e.g., with gaming NFTs, a sword NFT could be owned by an avatar NFT)
- Shared objects that anyone can read/write to (DEXs or auction contracts)
- Immutable objects without an exclusive owner that are read-only (auctions frozen as immutable after the end of an auction)
Solidity, the language for writing to the Ethereum Virtual Machine (EVM) and most popular blockchain programming language, had its first official release in July 2015. The concept of ERC-20 tokens wasn’t proposed until November 2015. Because the EVM lacked built-in foundations for maneuvering distinct digital assets as native resources, the ERC-20 was proposed as a smart contract standard that creates fungible assets. ERC-20 tokens played an integral role in subsequent peaks of the crypto cycle, like the ICO Boom of 2017 and DeFi Summer of 2020, which emphasized that the main purpose of blockchain activity is to facilitate how digital assets interact. Having recognized that blockchain development should focus on the programming of digital assets (referred to as “resources”), the Novi/Diem team built Move with this idea at its core.
Mysten Labs modified Move (and called it Sui Move) to integrate with its object-centric data model, as it was originally built for an account-based system. Sui Move supports two core objects: smart contracts (Move packages, which are a set of Move modules) and digital assets (resources). Sui’s native support for resources is expressed via bytecode verification. After Sui Move source code is compiled into bytecode, a static analysis tool called the Move bytecode verifier guarantees that the bytecode adheres to Sui’s type, memory, and resource safety rules. This verification ensures that objects cannot be created, copied, or accidentally destroyed by code from outside its defining module. It also includes protections for certain exploits like double-spending and reentrancy.
Requiring that all code passes the bytecode verifier before being committed on-chain removes the need for smart contract developers to write certain safety rules themselves. In other blockchains, namely ones that use accounts to store the ledger state, these safety protections are not guaranteed by the virtual machine. Instead, they must be manually coded by each smart contract developer interacting with the digital asset. For example, a type of safety protection guaranteed by the Move bytecode verifier includes account checks on Solana. Account checks can be difficult to implement correctly, leading to some of the Solana ecosystem’s biggest hacks.
Notable exploits due to the faulty implementation of extra code that would not be required in Sui Move include:
- Wormhole (Solana — account substitution exploit): $326 million
- Cashio (Solana — account substitution exploit): $48 million
- DAO Hack (Ethereum — re-entrancy exploit): $50 million
Sui validators do not batch transactions into blocks like normal blockchains; instead, they validate transactions individually while transactions ultimately obtain a certificate of finality at the end of the process. According to Sui, validating transactions individually decreases network latency. Because transactions are grouped by objects, validators can process different objects’ transactions in parallel, both in relation to each other and on their own machines (called “workers”). The resulting parallel transaction submission enables execution on a massive scale.
Sui also decreases latency by requiring less communication between validators than other networks. It redirects a lot of the communication to users. These “users” take the form of a client gateway service run typically by the application being interacted with (wallet for transfers, DEX entity for trades, etc.). Although it may appear to add an additional layer of trust, it does not necessarily increase trust assumptions. When using an app like MetaMask on Ethereum, users must trust that MetaMask is correctly communicating what they want to do on the blockchain. That same degree of trust in the application is present in client communication on Sui, with the addition of clients playing a role in transaction processing.
Due to Sui's object-centric data model, any wallets or applications that execute a transaction can present the transaction signing request to the user in a way that is analogous to Android-style permissions. That is, in addition to the signing request, the wallet or app also presents a list of objects and how they will be modified, showing the downstream consequences of the signed transaction.
All transactions require client communication. However, whether a transaction goes through Sui’s ordering and consensus mechanism depends on whether the object in the transaction is shared or non-shared.
Complex Transactions (Shared Objects)
Complex transactions, which involve shared objects, undergo ordering and consensus via Sui’s Narwhal and Bullshark protocols. The Narwhal mempool maintains the availability of submitted transaction data and provides a structured path in the form of a directed acyclic graph for traversing (choosing an order on) this data. Bullshark consensus picks a specific ordering of this structured data by agreeing on a particular DAG traversal (ordering based on the DAG structure).
Complex transactions go through five steps before reaching finality.
- Transactions are broadcast to nodes from the respective user/client.
- After the validator nodes receive the message, they then respond with a vote on the message’s validity, which is weighted to the size of their stake.
- The user/client then collects a Byzantine-resistant majority of these votes, produces a certificate of the record, and broadcasts the certificate back to the validators.
- The transaction certificate is then sequenced through Narwhal and Bullshark for a Byzantine-resistant majority of validators to agree on the ordering of the transaction data.
- The validators respond a final time while the user collects an “effects” certificate, which is proof of the state change and ensures the transaction’s finality.
Simple Transactions (Non-Shared Objects)
Simple transactions, which only involve non-shared objects, do not require sequencing through Narwhal and Bullshark. In other words, simple transactions can skip step 4 of the transaction processing pipeline described above. Simple transactions are only subject to a lightweight algorithm called Byzantine Consistent Broadcast, which is less intensive and more scalable than Byzantine consensus. The broadcast ensures that all nodes receive the same message from the user/client; it does not require that nodes come to an agreement on the network’s state, which is one of the complex parts of consensus algorithms.
Sui’s data model allows validators to execute transactions in parallel via a causal-ordering approach as opposed to total ordering (ordering transactions sequentially). Ordering based on cause-effect relationships (how a transaction affects a particular object’s state) allows Sui to group transactions by objects. Hence, if multiple transactions are unrelated (do not touch the same object), then the transactions can be processed in parallel in any order. However, transactions that occur on the same object require a total ordering within that particular object’s transaction queue. All simple transactions bypass consensus.
Sui’s latest testing revealed that it has reached throughputs of 297,000 simple transactions per second with less than a half-a-second latency. This speed coupled with the modularity of the ordering/consensus algorithms has attracted blockchains like Celo and Sommelier to integrate Narwhal into their protocols.
Sui uses Delegated Proof-of-Stake to determine the validator set per epoch. The total amount of stake assigned to a validator (both stake delegated from itself and stake delegated from other SUI tokenholders) determines the validator’s voting power in processing transactions. All honest validators are rewarded with gas fees (see below for more details) — and temporary unlocking subsidies (Sui did not specify an exact end date) — collected in the epoch proportional to their size of staked SUI.
Sui’s system of paying all honest validators differs from systems that pay validators for the transactions only they processed. In these systems, larger validators grow at a probabilistically quicker rate, given they are more likely to be chosen and rewarded sooner than validators with a smaller stake. In Sui, all honest validators grow at the same rate. Delegators are only rewarded with computational gas fees and inflationary subsidies but pay commissions to the validators they stake with.
With its mainnet planned to launch on May 3, 2023, Sui’s Testnet has 97 validators, only two of which are run by Mysten Labs. Recommended hardware requirements for validators include physical 24-core CPUs/48 virtual CPUs, 128 GB of RAM, and 2 TB of SSD storage (NVMe recommended).
Gas fees on Sui consist of two components: computation and storage.
Computational Gas Fees
Computational gas fees are determined by a gas-pricing mechanism where validators set a minimum gas price per transaction for the current epoch. A “reference gas price,” which is the 2/3’s percentile price by stake, is then publicized to users. Sui incentivizes validators to keep prices low but ultimately lets the validator market determine gas prices. Users are allowed to “tip” above the reference price for a higher priority of their transactions. Hence, the computational gas price is the sum of the reference price and the tip.
Storage Gas Fees and the Storage Fund
Validators (but not delegators) are rewarded with storage fund rewards depending on the size of the storage fund at the start of an epoch.
Sui’s storage fund is a means for financing data storage on the network. By adding the ability to store arbitrary amounts of data, Sui built a solution to a common data storage problem: an environment where the validators who originally stored the data may be different from the future ones that maintain that stored data. Sui’s storage fund receives storage gas fees and a portion of the network’s staking rewards (computation gas fees plus inflationary/unlocking SUI). The staking rewards accrued by the storage fund are then redistributed to validators immediately. Users that store files on Sui can be refunded for all of the gas storage fees they paid when they delete those files from storage. Storage fees are never paid out to validators.
The storage fund applies temporary deflationary pressure on the SUI token. When there is a large demand for storage, fees will increase and take more SUI out of circulation to be distributed later.
Programmable Transaction Blocks (PTBs)
Sui supports a developer primitive known as programmable transaction blocks (PTBs). PTBs allow users to create a composable sequence of up to 1,024 transactions that can fail or succeed atomically (all at once). In packaging transactions into a PTB, a single execution on Sui can perform 1,024 operations. This approach increases transaction throughput and lowers the average cost per transaction.
PTBs can take many forms. It can be used for homogeneous batching like mass minting NFT or sending out multiple payments to various parties at once. It can also be used heterogeneously, using an earlier transaction’s output as an input further down the sequence. For example, Sui’s Testnet had a DeFi-related PTB of 12 operations: 5 swaps across 3 distinct pools, mutating 20 existing objects and creating 7 new ones in the process.
Abstracting Away Gas Fees
Sui also provides the option for users to sponsor transactions. Sponsored transactions are when one user, typically an application, covers the cost of gas for a consumer that interacts with the sponsor’s platform. Co-founder Evan Cheng believes that “the concept of paying for gas should be invisible.” By enabling anyone to set up a Sui Gas Station as the backend support for sponsored transactions, Cheng’s belief is becoming a reality on Sui.
Sui’s architecture, data model, and approach to transaction processing eliminate the need for Sui to reach a global consensus on a total ordered list of transactions. Because the transaction pipeline was built for causal ordering, where transactions are grouped based on objects, it can distribute the workload among validators and, specifically, among validator machines (called “workers”). Hence, scalability increases as more workers are added to the validator set. Scalability can be expressed as a total increase in the number of validators or individual validators adding more workers/increasing their hardware resources (CPU, memory, storage, etc.).
For measure, Sui tested its capacity with a validator hardware configuration of 24-core AMD, 256GB RAM, and 25Gbps NIC, and executed 11,000 to 297,000 transactions per second on various workloads with half-second finality. Simple transactions include peer-to-peer transfers, oracle messaging, social network posts, etc. Because of its scalability, Sui can support a multitude of applications like social media, oracle networks, payments, etc., making it potentially more viable than protocols with a fixed upper bound on throughput.
Sui’s scalability is not just limited to transaction processing; it is also a de facto storage protocol. Users will be able to publish complex assets onto Sui. For example, Sui will be able to store all parts of an NFT (videos, photos, etc.) instead of simply supporting linked metadata values that redirect to off-chain storage locations. Rather than off-chain storage on IPFS or a centralized server, Sui validators maintain the storage of arbitrary assets on-chain. Storage capacity scales in the same way that transaction processing scales, with the addition of more workers.
Sui’s goal is to create a smart contract platform that can scale to the size of the Internet. As of today, no blockchain has that ability. The most apt comparisons to Sui are high-throughput blockchains with partial design similarities, such as Aptos and Solana. Sui has differentiated its system design from Aptos and Solana through its unique data model and storage capabilities.
Aptos and Solana use an account-based system for recording the global ledger state. They use head-of-line blocking, totally order transactions, and sequentially write blocks into a shared data structure. Sui’s object-centric data model functions differently: the global state is just a collection of all Sui objects with transactions recorded individually.
This design choice supports programmable transaction blocks (PTBs), Android-style permissions in transaction signing, and sparse replay. PTBs enable users to batch up to 1,024 sequential transactions that can fail or succeed atomically, which can both increase transaction throughput and lower transaction costs. When transactions are signed on Sui, the user is presented with a list detailing what objects the transaction will mutate downstream, making the transaction outcomes of PTBs visible to the user/signer. On-chain data based on a particular object being queried can be retrieved through a feature called “sparse replay.” Compared to reading from Merkle trees that represent an entire shared ledger state, sparse replaying is more efficient because it allows the interested party to query from the object directly.
Consensus and Execution
Additionally, the Sui data model and its approach to transaction processing allow Sui to bypass consensus for simple transactions. Conversely, Aptos and Solana conduct consensus on every transaction. Bypassing consensus for particular transactions is unique to Sui, and it’s a core feature that allows throughput to scale. Regarding storage, Sui could potentially compete with on-chain storage protocols like Arweave and Filecoin, especially considering that its direct competitors, Aptos and Solana, have not created solutions to address on-chain storage of arbitrary data.
Parallel processing is inherent in each protocol. Aptos takes an optimistic approach via the Block-STM (software transactional memory) parallel execution engine. This approach requires a validator to fit all the transactions in memory on a single machine and then execute batches of transactions in parallel and optimistically (without pre-declared dependencies), validating after the execution. Conflicts are detected in memory on the same machine, but transactions fail to execute when dependencies are caught. Although Block-STM enables parallel execution on a single machine, its potential scale is limited because it requires that transactions exist in just one machine’s memory to detect conflicts, inhibiting its ability to scale the parallel execution pipeline to multiple machines at once.
Alternatively, Sui and Solana take a pessimistic approach where dependencies are declared upfront. In Sui, the system design facilitates parallel processing via the object-centric data model, but parallel processing on Solana follows an account-based abstraction. This model requires a pre-declaration of accounts that a transaction will act on to determine where to conduct parallel execution. Solana’s approach is less direct and more labor-intensive as more accounts must be declared than objects.
Sui’s native token, SUI, will be used for network security (validator and delegator staking), to pay for gas fees, and as a claim on future governance. The Sui Mainnet launch is scheduled to take place on May 3, 2023, and the maximum SUI supply is set to 10 billion. The Sui Foundation has announced the distribution of SUI tokens but has yet to specify the liquidity/vesting schedules. The Sui Foundation has yet to share more details regarding governance.
Community Reserve (50%): The Sui Foundation will control half of the maximum SUI supply with the goal of distributing it via community programs including:
- The Delegation Program, which will bootstrap community-run validators
- The Grants Program, which will distribute tokens to developers, community ambassadors, and other participants contributing to Sui
- A Research and Development fund
- And validator subsidies, with the intent to subsidize early validators with extra staking rewards for a limited amount of time.
Early Contributors (20%): A fifth of the maximum SUI supply will be distributed to Sui’s research and production teams, namely its initial contributor, Mysten Labs.
Investors (14%): Sui Foundation has not publicly disclosed any sales of the SUI token to investors.
Mysten Labs Treasury (10%): Mysten Labs did not disclose what this allocation will be used for.
Community Access Program and App Testers (6%): The Community Access Program includes a whitelisted public sale (called a Recognition Sale) that is only open to early Sui community members as proxied by their participation in Sui’s Discord channels. In addition, it includes a General Sale open to the broad public. Both the Recognition and General Sales will be implemented by specific partner crypto exchanges.
With Mainnet soon to launch, Sui’s Devnet and Testnet already support over 200 projects in a range of categories, including gaming, finance, legal, commerce, and more. The validator set on the Devnet only contains four validators — all of which are run by Mysten Labs, the core contributor and protocol designer of Sui — as it prioritizes being a safe execution environment for projects to stress test application development.
Sui’s Testnet was built in waves, testing various aspects of the protocol. Testnet Wave 1 was designed as a safe environment for validators to test the operation of Sui nodes/machines. Testnet Wave 2 expanded participation to application builders, end-users, and delegators while testing the storage fund, Sui’s DPoS consensus mechanism, and the gas mechanism. In late March 2023, Sui announced its Permanent Testnet to test sponsored transactions, zero-knowledge proofs, and other future developments.
Statistics related to Sui’s Permanent Testnet are listed below.
- Total transactions: 286.23 million
- Total packages published: ~125,949
- Sui Wallet: 1.09 million WAU and an all-time high of 794,000 DAU
- Sui Explorer: 117,000 DAU
- Current TPS: ~315
- Total Validators: 97 (2 by Mysten Labs + 95 by other entities)
- Total stake delegation operations: 7.35 million (Wave 2 Testnet)
The Sui Mainnet launch is scheduled to take place on May 3, 2023. Mysten Labs told Messari that, in the second half of 2023, it will focus its development efforts on implementing key features on Sui that will encompass scalability, tokenomics, and Sui Move.
- Light Client/Sparse Node: Light clients/sparse nodes will be able to conduct sparse replay.
- Intra-Validator Sharding: Sui transactions are processed in parallel based on the groups (objects) that each pertains to; scaling Sui throughput requires validators to add more machines (shard computation) to process more groups of transactions.
- Congestion Pricing: Allowing users to pay a ”tip” on top of the reference price specified by validators creates a situation where the cost of transacting on Sui may become more expensive with more congestion, which may discourage demand spikes for Sui blockspace.
- Storage Fund and Governance: The storage fund is a mechanism for financing data storage on Sui; users pay a storage gas fee to upload files to the network. Governance will encompass protocol upgrades and setting the storage gas fee.
- MEV Improvements: MEV (Maximal Extractable Value) refers to the profit that miners or validators can potentially gain by strategically ordering, including, or excluding user transaction requests during the block production process. This value is derived from arbitrage opportunities, liquidations, and other on-chain activities that allow miners or validators to prioritize certain transactions for their benefit.
Sui Move DevX
- Prover: Helps Sui Move developers to make sure their applications work correctly and securely. The Move Prover checks that developers’ new features work properly for all possible transactions and inputs.
- Improved Language Server: The language server is a software development tool that complements the “move-analyzer,” a VSCode plugin for Move. It is integrated with the Move compiler and provides many features to developers, including code comprehension and error reporting.
- Linting: A linter is a code analysis tool that catches bugs and enforces a coding style to improve organization and readability. Sui’s linting tool largely contains rules for the development of front-end projects.
- Other Tools: Other development tools that Mysten Labs, as the initial contributor and protocol designer of Sui, plans to update/add to aid in the development on Sui include auto-formatting, a debugger, and a REPL (Read, Eval, Print, Loop)/language shell. (A REPL allows developers to write, execute, and test code snippets quickly without the need for a full development environment or creating an entire application.)
New Layer-1 blockchains will only be successful if they can provide new use cases and frictionless experiences. Sui breaks norms with its object-centric data model, a novel approach that scales simple transactions that bypass consensus and that grants the ability to store arbitrary data values. Sui enables Android-style permissions in transaction signing and PTBs that facilitate large-scale batching of atomically composable transactions. It also includes user-friendly features like sponsored transactions, making gas invisible to the end-user.
To gain mainstream adoption, Sui’s Mainnet and accompanying features will need to function as expected and provide a robust foundation for onboarding users to blockchain applications. If the digital asset industry becomes mainstream earlier than expected, developers and consumers will seek a flexible and safe smart contract platform that can scale with global throughput, stay cost-effective, and deliver a Web2-style front-end experience.