Cointime

Download App
iOS & Android

Exploring Sui’s Object-Centric Model and the Move Programming Language

Validated Media

The Sui blockchain has emerged as a novel layer-1 (L1) protocol, incorporating advanced technologies to address common layer-1 trade-offs. Cointelegraph Research unpacks the details of this newcomer to the blockchain space.

Sui uses the Move programming language, which was designed with a focus on asset representation and access control. This article examines Sui’s object-centric data storage model, its implications for transaction processing, and its potential advantages over traditional account-based paradigms.

The object-oriented paradigm of SUI

Sui draws significant inspiration from the Diem blockchain, particularly in its use of the Move programming language for smart contracts. Move was designed with a type system specifically tailored to asset management and access control enforcement. Sui Move builds on this foundation with an object-centric data storage model that uses objects rather than accounts as primitives.

Unlike the traditional account model, where transactions change balances, or the UTXO model, where transactions have simple inputs and outputs, Sui’s object model treats assets (as well as smart contracts) as complex objects. Transactions in Sui take objects as inputs and mutate these inputs into output objects. Each object records the hash of the last transaction that produced it. This approach is conceptually similar to the UTXO model but more general and powerful. A comparison of the models can be seen below.

Move’s use of linear logic is connected to the object-oriented model and facilitates the development of secure software. Linear logic, sometimes referred to as resource logic, ensures that resources representing digital assets cannot be duplicated or inadvertently destroyed. When a transaction involving an asset is executed, Sui Move’s semantics ensures that the asset’s state is updated in a way that reflects the transaction’s outcome, consuming the asset in its previous state and producing it in its new state.

Objects in Sui can also have defined access controls and permissions, which enhances security and control over asset use after a transaction. This mitigates vulnerabilities common on account-based chains, which allow reentrancy attacks. In a reentrancy attack, a function makes an external call to another contract before updating its own state, allowing attackers to repeatedly execute actions that should only occur once.

This can lead to unauthorized changes in the contract’s state, such as withdrawing more funds than ought to be allowed. Because transfers of ownership are explicit and atomic in Sui, this type of error cannot happen. Move’s linear type system ensures that once a resource is moved, it cannot be reused unless explicitly reassigned.

The traditional account-based model as used by Solidity, on the other hand, requires that developers implement additional checks to prevent such bugs. For example, reentrancy attacks need to be avoided by following a checks-effects-interactions pattern. All state-changing operations (effects) have to occur after all checks but before any interactions (external calls). This pattern, often referred to as optimistic accounting, ensures that state variables are updated before performing any external interactions.

While the object-centric model itself does not inherently enhance security, it can simplify the development process and make it easier to write secure code. Although smart contracts on Ethereum can be formally verified to achieve high levels of security, this process can be complex and costly.

Solidity is known for its notoriously unintuitive semantics, which makes it difficult for developers to reason about the code’s behavior. This increases the likelihood of introducing subtle bugs and security vulnerabilities.

SUI Move belongs to a family of languages that tries to simplify secure smart contract development by baking sensible financial primitives into the semantics of the language from the very start. Another example is Algorand blockchain’s Transaction Execution Approval Language (TEAL), which uses a stateless execution model to ensure that transactions are atomic and secure.

Sui’s object-centric model is particularly advantageous for managing complex assets such as non-fungible tokens (NFTs). In Ethereum, NFTs are tied to smart contract addresses, and interactions often require complex contract calls and state updates, leading to higher costs and potential security risks​. For instance, transferring an NFT in Ethereum involves invoking a function of the ERC-721 smart contract, which updates the state and emits events.

This process involves multiple steps and gas fees for each operation. In contrast, Sui’s object model allows each NFT to be treated as a distinct object with intrinsic properties and permissions. The behavior of NFTs is closely aligned with the primitives of the Move language, whereas in Ethereum, this behavior needs to be implemented, which increases overhead and creates room for error.

Object orientation and blockchain performance

The object-oriented model makes sharding and parallelization on the SUI blockchain easier. Combined with a recent update of the Sui consensus mechanism, SUI thus achieves a time-to-finality of approximately 390 milliseconds.

This could allow a throughput exceeding 100,000 transactions per second. A comparison of Sui with other prominent layer-1 blockchains can be found below.

Database sharding on account-based chains versus SUI

One of the most pressing concerns for blockchains is the infamous trade-off between scalability, security and decentralization. Sharding, which facilitates partitioning the blockchain database, is considered a solution for this problem.

In account-based architectures, sharding involves partitioning the state by account addresses. Each shard manages a distinct range of addresses, and transactions are processed by the shard that holds the data of the account involved.

However, this faces a number of issues. For instance, Polkadot requires that each account’s balance and state be updated and synchronized across shards (Parachains). Maintaining consistency across multiple shards is challenging as each shard must regularly synchronize with the global state, which introduces latency and complexity.

Transactions involving accounts on different shards require inter-shard messaging and coordination, which adds computational overhead and delays transaction finality. In the past, this has led to downtime on such blockchains, as was the case for Zilliqa.

Sui’s object-centric model avoids many of these issues by treating each object as an independent unit of state. Objects can be processed and managed separately without requiring global state synchronization, and multiple transactions can be processed concurrently without the need for synchronization across shards. This reduces the need for complex cross-shard communication and allows for more straightforward and efficient parallel processing.

Parallelized transaction processing on SUI

Parallelization refers to executing multiple operations simultaneously and improving processing speed by leveraging concurrent execution threads.

There are two main methods of parallelization: state access method (or deterministic execution) and optimistic execution. In the state access method used by Sui and Solana, transactions declare which parts of the state they will access, allowing the system to identify independent transactions that can be executed concurrently.

This approach ensures predictable outcomes and avoids the need for re-executing transactions, enabling dynamic gas fee markets that manage congested state hotspots.

Optimistic execution, on the other hand, as it is used by networks like Monad and Aptos, initially assumes all transactions are independent and re-executes conflicting transactions retrospectively. While simpler for developers, it can lead to computational inefficiencies.

Sui achieves state access parallelization through its object-centric model. Operations on one object do not impact or delay operations on another, naturally allowing them to be processed concurrently. The same structural features simplify partitioning the database of transactions, thus also simplifying parallelized processing on a single node.

Conclusion

In conclusion, the Sui blockchain’s object-centric model, combined with the Move programming language, addresses several key limitations of traditional layer-1 blockchains. The ability to process transactions in parallel significantly enhances scalability and reduces latency.

Using linear logic and capability-based security ensures robust resource management and access control, potentially lowering the risk of errors and security vulnerabilities. Additionally, Sui’s approach to managing complex assets, such as NFTs, simplifies interactions and improves efficiency compared to traditional account-based models. These features position Sui as a noteworthy advancement in blockchain technology.

In our next article, we will examine the consensus mechanism of the Sui blockchain, exploring its evolution and the benefits it provides. Sui employs a consensus protocol designed to work with its object-centric model.

We will analyze the specifics of Sui’s consensus mechanism, including its fault tolerance and throughput optimization methods, to understand how these elements contribute to its infrastructure.

Furthermore, we will compare Sui’s consensus approach with those of other prominent blockchains, such as Ethereum, Polkadot, and Solana, to identify its unique features and areas where it may excel or face challenges.

Sui
Comments

All Comments

Recommended for you

  • Morgan Stanley: The U.S. dollar will peak before the end of the year and enter a "bear market pattern" in 2025

    Morgan Stanley predicts that the strong US dollar will peak before the end of the year and then enter a "bearish market trend", slowly declining until 2025. The bank believes that due to the Bank of Japan's rate hikes and gradual easing actions by the Reserve Bank of Australia, the potential for the yen and Australian dollar to rise next year is the greatest.

  • Equation News calls out Binance for "insider trading": You are destroying the sentiment of the trading market

    On November 25th, Formula News reported that to those insider traders who participated in the listing of Binance perpetual contracts, please slow down when selling your chips next time. The WHY and CHEEMS crashes you caused resulted in a 100% negative return for everyone involved in the trade, and you are destroying the emotions of the trade. Earlier today, Binance announced the listing of 1000WHYUSDT and 1000CHEEMSUSDT perpetual contracts, which caused a short-term crash in WHY and CHEEMS and sparked intense discussion within the community.

  • Bitcoin price dip may spur buying spree in BNB, AVAX, NEAR and OKB

    Bitcoin sellers take the upper hand as BTC struggles to rally to $100,000. What will altcoins do?

  • U.S. Congressman Mike Flood: Looking forward to working with the next SEC Chairman to revoke the anti-crypto banking policy SAB 121

     US House of Representatives will investigate Representative Mike Flood's recent statement: "Despite widespread opposition, SAB 121 is still operating as a regulation, even though it has never gone through the normal Administrative Procedure Act process." Flood said, "I look forward to working with the next SEC chairman to revoke SAB 121. Whether Chairman Gary Gensler resigns on his own or President Trump fulfills his promise to dismiss Gensler, the new government has an excellent opportunity to usher in a new era after Gensler's departure." He added, "It's not surprising that Gensler opposed the digital asset regulatory framework passed by the House on a bipartisan basis earlier this year. 71 Democrats and House Republicans passed this common-sense framework together. Although the Democratic-led Senate rejected it, it represented a breakthrough moment for cryptocurrency and may provide information for the work of the unified Republican government when the next Congress begins in January next year."

  • Indian billionaire Adani summoned by US SEC to explain position on bribery case

    Indian billionaire Gautam Adani and his nephew, Sahil Adani, have been subpoenaed by the US Securities and Exchange Commission (SEC) to explain allegations of paying over $250 million in bribes to win solar power contracts. According to the Press Trust of India (PTI), the subpoena has been delivered to the Adani family's residence in Ahmedabad, a city in western India, and they have been given 21 days to respond. The notice, issued on November 21 by the Eastern District Court of New York, states that if the Adani family fails to respond on time, a default judgment will be made against them.

  • U.S. Congressman: SEC Commissioner Hester Peirce may become the new acting chairman of the SEC

    US Congressman French Hill revealed at the North American Blockchain Summit (NABS) that Republican SEC Commissioner Hester Peirce is "likely" to become the new acting chair of the US Securities and Exchange Commission (SEC). He noted that current chair Gary Gensler will step down on January 20, 2025, and the Republican Party will take over the SEC, with Peirce expected to succeed him.

  • Tether spokesperson: The relationship with Cantor is purely business, and the claim that Lutnick influenced regulatory actions is pure nonsense

     a spokesperson for Tether stated: "The relationship between Tether and Cantor Fitzgerald is purely a business relationship based on managing reserves. Claims that Howard Lutnick's joining the transition team in some way implies an influence on regulatory actions are baseless."

  • Bitwise CEO warns that ETHW is not suitable for all investors and has high risks and high volatility

    Hunter Horsley, CEO of Bitwise, posted on X platform that he was happy to see capital inflows into Bitwise's Ethereum exchange-traded fund ETHW, iShares, and Fidelity this Friday. He reminded that ETHW is not a registered investment company under the U.S. Investment Company Act of 1940 and therefore is not protected by the law. ETHW is not suitable for all investors due to its high risk and volatility.

  • Musk said he liked the "WOULD" meme, and the related tokens rose 400 times in a short period of time

    Musk posted a picture on his social media platform saying he likes the "WOULD" meme. As a result, the meme coin with the same name briefly surged. According to GMGN data, the meme coin with the same name created 123 days ago surged over 400 times in a short period of time, with a current market value of 4.5 million US dollars. Reminder to users: Meme coins have no practical use cases, prices are highly volatile, and investment should be cautious.

  • Victory Securities: Funding Rates halved and fell, Bitcoin's short-term direction is not one-sided

    Zhou Lele, the Vice Chief Operating Officer of Victory Securities, analyzed that the macro and high-level negative impact risks in the cryptocurrency market have passed. The risks are now more focused on expected realization, such as the American entrepreneur Musk and the American "Efficiency Department" (DOGE) led by Ramaswamy. After media reports, the increase in Dogecoin ($DOGE) was only 5.7%, while Dogecoin rose by 83% in the week when the US election results were announced. Last week, the net inflow of off-exchange Bitcoin ETF was US$1.67 billion, and the holdings of exchange contracts and CME contracts remained high, but the funding rates halved and fell back, indicating that the direction of Bitcoin in the short term is not one-sided, and bears are also accumulating strength.