During this bear market, you more than likely have been searching for the next tour de force. The buzzword of today is layer 1 execution environments — and these projects have been all the rage lately.
The Sui blockchain believes that it is the next monolithic smart contract execution environment. The Diem successor believes that it has solved the problems of scalability, security, and gas fees with its technology.
What is Sui?
Sui (pronounced “swee”) is a layer 1 proof-of-stake blockchain with smart contract capabilities. The project is the effort of Mysten Labs, a company founded by ex-employees of Meta’s (Facebook) Project Libra.
Libra is a permissioned blockchain and stablecoin payment system that never quite made it off the ground. Some of the developers who worked on Project Libra (a.k.a. Diem) work on projects like Aptos and Sui.
Mysten Labs also has the backing of popular venture capitalists firms. These are FTX, Circle, Binance Labs, and Electric Capital, to name a few.
The Sui/ Mysten team aims to deliver a better user experience through scalability and low latency. The Sui network will allow developers and creators to tailor experiences to the average user.
How does Sui work?
Sui operates in a sequence of epochs (24 hours). A committee of validators manages every epoch. The permission-less validator set rearranges from epoch to epoch.
Users can delegate their stakes to validators. Delegating your stake allows you to consolidate voting powers and earn a share of the fees. Moreover, the Sui network maintains its security properties as long as a quorum of two-thirds of the overall stake is assigned to honest parties.
Validators can scale horizontally via intra-validator sharding. As a result, nodes can scale by devoting more resources. This could be through CPU, memory, storage within a machine, or over multiple machines.
Gas pricing and fees
One of the biggest problems halting the mainstream adoption of blockchains is gas fees. Users pay gas to complete transactions and have their transactions included into blocks. Without gas, malicious actors would spam the network and cause a denial of service attack as a result.
When a blockchain’s network activity increases, transactions will compete for block space. This results in a spike in fees, network congestion, and, ultimately, a poor user experience.
Sui takes a dynamic approach to fees via a price-setting mechanism. At the start of each epoch, validators vote on a network-wide reference price. By this method, users are able to have more predictable gas fees.
Users pay separate fees for transaction execution and storing data. When a user submits data to Sui’s “storage fund,” they pay gas fees and fees to Sui. The fund covers the cost for validators to store data; as the network grows, the cost of storage increases.
Move programming language
The programming language of the Sui blockchain is Move. This language is slightly different from core Move, which is based on the Rust programming language and was originally developed by Meta (Facebook).
Sui shares the Move programming language with Diem and Aptos. Former Meta employees founded Aptos as well. Smart contracts on Sui are created with Move.
Sui will work with Move code from other systems, except for Keys and global storage operators. The biggest differences between Move Core and Sui Move are:
- Addresses represent object IDs
- Sui entry points take object references as inputs
- Sui uses its own object-centric global storage
- Has module initializers
- Objects have globally unique IDs
Move vs. Solidity
Sui is the “Ethereum killer,” and that makes Move the rival to solidity. It was created intending to fix problems within Solidity. Move is designed to represent digital assets and perform safe operations over them.
Functionality on most blockchains is implemented as smart contracts. Tokens on Ethereum are smart contracts that keep a record of balances associated with a list of public keys. This is done off of the distributed ledger, as the Ethereum protocol has no knowledge of its existence.
Messages are exchanged during transactions, but not actual assets. The global state of Ethereum is the global state of all accounts. This contrasts with the Sui blockchain.
With Move, Sui’s storage is designed around objects, but most smart contract platforms are designed around accounts. These objects are programmable and can flow through smart contracts. Sui’s global state is the pool of programmable objects.
A smart contract in Sui is an object (called a Move Package), that can manipulate Move Objects. Every object has ownership. Its ownership dictates how it is used in transactions.
- Owned by an address — the most common case for moving objects. Move objects transfer to other addresses, after which it will be owned by the receiving address.
- Owned by another object.
- Immutable — Immutable objects cannot be changed. All Move Packages (e.g., smart contracts) are immutable once deployed.
- Shared — Anyone can read or write this object.
Move was developed alongside the Move Prover. This allows programmers to verify that their code executes as intended.
Parallel transaction execution
One of the most interesting feats of Sui’s ability to scale is transaction parallelization. In most blockchains, transactions execute sequentially — or one by one. This prevents some form of competition between transactions and double-spending. However, this also restricts throughput.
Parallel transaction execution allows Sui to reportedly process up to 120,000 transactions on a MacBook Pro per second. For reference, Ethereum can process 7–15 transactions per second. Visa can process 24,000 transactions per second.
Many transactions do not have complex interdependencies with other arbitrary parts of the blockchain’s state. Most often, users simply want to send an asset to a recipient. Sui’s consensus mechanisms reduce the amount of communication required between validators in order to process transactions. As a result, simple transfers validate almost instantly, and complex transactions execute within 2–3 seconds.
Sui consensus mechanism
This is all thanks to Sui’s consensus mechanism. Narwhal, Bullshark, and Tusk collectively create Sui’s consensus mechanism. These systems split the responsibilities of the network.
- Narwhal: ensures data availability.
- Bullshark or Tusk: agrees on the specific ordering of data.
One of Sui’s unique features is its avant-garde approach to a mempool. Sui has a directed acyclic graph (DAG) based mempool, facilitated by Narwhal. The DAG allows parallelization processing at the execution layer.
Bullshark replaced Tusk as the default consensus component for reduced latency and fairness — where even slow validators can contribute. However, Tusk is still available for use.
Aptos vs. Sui
Aptos and Sui share many similarities: they are both the spiritual successors of Diem, the founders of both blockchains came from Meta (Facebook), and they both use the Move programming language. They both even share some of the same investors.
Aptos uses the core Move’s global storage, while Sui uses its own. Moreover, Aptos does not have a concept of resources or objects owning other resources. Any Sui address can own an unlimited number of the same type of resource. A single Sui account could own ten different Sui token objects, each with its own value.
Sui reportedly handles 120,000 transactions per second, while Aptos can supposedly handle 160,000 transactions per second. Although this number fell dramatically at mainnet launch.
Which one is better?
We would like to see two blockchains duke it out until the last one is standing. However, it is difficult to compare both blockchains at such an early stage. Aptos recently launched mainnet and is farther along than Sui, which is in its development stage.
Sui’s devnet was released in May 2022. It currently consists of four nodes operated by Mysten Labs, and a Sui Explorer. Currently, there is no Sui testnet.
The testnet will gradually introduce and stress-test features and mechanisms required for a production-ready mainnet. The purpose of the testnet will be to validate designs, validate validators, full nodes, wallets, developer toolchains, and gain operational experience. The testnet is organized in a series of “waves”:
- For the first time, a multi-entity public Sui network will be assembled. The distributed genesis ceremony, validator configuration, operational coordination, and basic network operations will all be put to the test.
- Sui developers will have their first opportunity to deploy on testnet.
- The delegated proof-of-stake mechanism secures the network. Any entity should be permitted to accumulate enough SUI tokens to act as a validator in Sui’s DPoS mechanism.
- A challenge centered on developing and deploying financial primitives, specifically staking derivatives and DeFi fundamentals.
- This stage will put operators through their paces as they drill key network operations like validator set changes, software updates, and incident response.
The blockchain’s native cryptocurrency is the SUI token. The total supply of SUI is 10 billion and serves four primary functions:
- Delegate and earn a share of the validating rewards.
- Denominate gas fees.
- A unit of account, medium of exchange, or store of value — especially for DApps.
- For governance and on-chain voting.
How to buy SUI crypto
SUI is not live nor available for purchase. It will be released at mainnet launch and over time as stake subsidies. “Some of the tokens will be set aside for the Mysten Labs team, Sui contributors, investors, and stake subsidies,” Alonso de Gortari, Head Economist at Mysten Labs.
SUI will be distributed to the Sui Foundation — an entity that is separate from Mysten Labs. The Sui Foundation will use its allocation to fund:
- Hackathons, conferences, documentation, and application on the Sui blockchain.
- Projects like standards and practices for DeFi, Sui blockchain wallets, infrastructure, and digital identity.
- Developer teams that will create products to attract users to the Sui blockchain.
A SUI airdrop is very possible. Airdrops generate large-scale adoption and network traffic. This will serve as a stress test for the network.
Do note that devnet will go through periodic wipes as the dev team is still adding a number of core features.
This thread covers:
– How to create a wallet and claim faucet tokens.
– Creating an NFT on Devnet.
– 5 live Dapps to try on Devnet.
– Info on running a node. pic.twitter.com/DLB6OeVWsU
— Airdrop Official🍥 (@its_airdrop) October 21, 2022
Seeing the success of Sui’s spiritual sibling blockchain’s — Aptos — airdrop, Sui will want to take advantage of the opportunity. However, Sui has clarified that there are no current plans for an airdrop.
Can Sui deliver?
One hundred twenty thousand transactions per second for a blockchain is impressive, but is almost unthinkable. This is a lot, even for a permissioned blockchain. There is a vast degree of separation between processing simple asset transfers and complex multithreaded computations.
In theory, Ethereum could process more transactions if they were simple transfers alone. Complex DeFi applications and services require smart contracts that depend on other smart contracts. This means that a “single” transaction can have multiple dependencies.
These transactions require more gas to complete. Ethereum transactions, and blocks, have gas limits. This decreases the number of transactions that a single block can handle.
Can Sui’s design solve scalability and gas woes?
Many have theorized parallel processing, but have yet to create a project that can gain the network effect. This will be necessary to test any network’s execution environment. The Sui consensus mechanism was created to perform in an environment with a particular focus on simple asset transfers.
Sui’s pivot to parallel transaction processing — as opposed to sequential processing — may prove useful. Only time will tell if Sui’s approach to the scalability trilemma proves victorious.