All About Objects

To understand the unique features of Sui, it is important to first understand Sui’s object-centric data model.

All About Objects

Sui was designed from the ground up to redefine the possibilities of digital asset ownership. A fundamental part of the redesign, and therefore a significant difference between Sui and other Layer 1 blockchains, is its object-centric data model.

How Other L1s Handle Asset Ownership

On most blockchains, the basic unit of data storage is an account. Digital assets, such as NFTs or tokens, are stored in either an individual (“user”) account or a smart contract account. NFTs actually live inside the smart contracts that create and manage them. Owners don’t control access to their own assets and those assets can’t be lent, stored, or used in other contracts. Those smart contracts don’t contain a significant amount of information about the NFTs inside of them but rather point to off-chain storage from detailed information. This makes it difficult for the digital assets to have significant utility.

Transaction processing on other L1s requires every transaction to be handled sequentially as there is no upfront way to confirm that assets are independent of one another. The validators must update the whole state of the chain for every block and therefore must check that the action taken in one transaction does not conflict with any others. This process can cause bottlenecks, increasing latency and decreasing throughput of the chain.

How Sui Handles Asset Ownership

On Sui, objects are the basic unit of data storage. Developers define, create, and manage these programmable objects that represent user-level assets. An object has distinct attributes, including ownership, whose values can be updated based on the governing logic of the smart contract that created it. However, even though smart contracts create objects, they don’t store the objects. Objects and their attributes are stored directly on-chain in the user’s account and can be directly accessed and controlled by the owner.

Typed Objects

Each Sui object must have the following two characteristics (has key and UID), and when viewed on an explorer has five characteristics visible (owner, object ID, type, version, last transaction digest block). Builders can customize objects by including other fields.

The ability to add, remove, and augment the information in fields over time allows digital assets on Sui to be dynamic rather than static as they are on other blockchains. Information about the asset can accumulate over time, adding value, context, and utility.

Object Ownership

Most assets on Sui are owned by a single address, which is recorded as a data value for the object. These are referred to as “owned objects.” Some assets have shared ownership, meaning multiple accounts must authenticate a transaction that changes data values related to the object. Objects can also be owned by other objects, essentially allowing them to combine into new unique assets, called composable assets. Lastly, there are immutable objects which are locked and can’t change.

Transaction Processing

When everything is an object, you know exactly which transactions are related. The system knows how to segment or group transactions and every group can be processed in parallel.

Simple transactions, such as a payment or asset transfer, can all be grouped together and processed in parallel because a change of value on one owned object does not impact a change in value on another owned object. These transactions do not require consensus because they can happen in any order without any consequence to the record keeping of the whole chain. This improves latency because it decreases the amount of time and energy needed to process the transaction.

Transactions involving shared objects are considered complex and must be validated through consensus. However, each shared object is still independent of other objects and related transactions can be grouped together and processed in parallel to the transactions involving other objects.

Start Programming Objects

A great first step for building on Sui is playing around with objects. Check out Sui’s documentation on programming objects to get started.