Skip to main content
Sui’s object model is fundamentally different from account-based blockchains. Instead of organizing state around accounts, Sui treats everything as an object - making it the fundamental unit of storage and the primary building block for on-chain assets and logic.

What is a Sui Object?

In Sui, an object is a structured piece of data with the following characteristics:

Globally Unique

Each object has a unique ID derived from its creation transaction

Versioned

Objects have a version number that increments with each mutation

Owned

Every object has an owner - an address, another object, or shared

Typed

Objects are instances of Move structs with the key ability

Object Structure

Every Sui object must have id: UID as its first field. Here’s what an object looks like in Move:
The UID type is globally unique and can only be created through object::new(ctx), ensuring no two objects can ever have the same ID.

Object Properties

ID and UID

  • ID: A copyable, droppable identifier that can be freely duplicated
  • UID: A unique identifier that cannot be copied or dropped, only deleted
The UID type enforces uniqueness:
  • No two UID values are ever equal
  • Can only be created from TxContext
  • Must be explicitly deleted with id.delete()

Version Numbers

From the Rust implementation:
Sui uses Lamport timestamps instead of simple sequential numbers to support causally ordered execution. When an object is used as input to a transaction, its version is updated based on the maximum version of all inputs plus one.

Object Types

Sui supports different types of objects for different use cases:
Objects owned by a single address. These can be used in transactions without consensus.

Object Operations

Creating Objects

Objects are created by constructing a Move struct with key ability and a UID:

Reading Objects

Updating Objects

Deleting Objects

Objects must be unpacked and their UID explicitly deleted:
Forgetting to delete the UID will result in a compilation error, as UID does not have the drop ability.

Special Object Types

Coin Objects

Coins are optimized objects with a known structure:

System Objects

Sui has several singleton objects with hardcoded IDs:

Object Size Limits

Objects have size constraints defined in the protocol:
The default maximum object size is configured in the protocol config, with exceptions for system objects when allow_unbounded_system_objects() is enabled.

Best Practices

When destructing an object, always call .delete() on its UID to properly clean up:
  • Owned objects for user-specific assets (NFTs, tokens)
  • Shared objects for multi-user protocols (DEX pools)
  • Frozen objects for immutable data (metadata)
Smaller objects cost less in storage fees and are more efficient to process:
  • Use efficient data structures
  • Avoid storing redundant data
  • Consider dynamic fields for optional data

Ownership

Learn about ownership types and rules

Dynamic Fields

Extend objects with dynamic fields

Object Storage

Understand how objects are stored