In Sui, everything is an object with a unique ID. Objects have owners. Owned-object transactions skip consensus entirely — enabling massive parallelism. Built on Move language for type-safe assets.
Object Ownership — The Key to Parallelism
Only one address can read/write this object. Most NFTs, tokens.
Object Structure
1// Sui Object Model — Everything is an Object2// Every asset, config, token = a typed Move object34struct Object {5 id: UID, // globally unique 32-byte ID6 version: u64, // incremented on every modification7 digest: ObjectDigest, // hash of current state8 owner: Owner, // who can use this object9 type_: MoveObjectType, // Move struct type10 data: MoveObject, // the actual data (Move struct fields)11}1213// Owner types:14enum Owner {15 AddressOwned(address), // only this address can use it16 ObjectOwned(UID), // owned by another object17 Shared { initial_version }, // any tx can access (needs ordering)18 Immutable, // read-only, no gas for reads19}2021// Storage key in RocksDB:22DB[object_id] = serialize(object)23// No trie needed — direct object ID lookup
vs Ethereum ERC20
mapping(address => uint256) balances;
// Centralized ledger — shared object
// All transfers need consensusstruct Coin<T> { id: UID, value: u64 }
// Each coin is an owned object
// Transfers skip consensus!Object ID Generation
id = hash(tx_digest, creation_index)
// Deterministic + unique
// Clients can predict IDsMove Objects — Type-Safe Assets
1// Move Objects — Type-Safe Assets2// In Move, assets are types, not mappings34// Define a token:5module my_token::token {6 struct Token has key, store {7 id: UID,8 value: u64,9 metadata: String,10 }1112 // Create: object has key ability → gets a UID13 public fun create(value: u64, ctx: &mut TxContext): Token {14 Token {15 id: object::new(ctx), // generates unique UID16 value,17 metadata: string::utf8(b"MyToken"),18 }19 }2021 // Transfer: Move's ownership system tracks this22 public fun transfer(token: Token, recipient: address) {23 transfer::transfer(token, recipient) // changes owner24 }25}2627// KEY DIFFERENCE from Ethereum ERC20:28// Ethereum: mapping(address => uint256) balances — central ledger29// Sui: each Token object is independently owned — no shared state needed
Why Object Ownership Enables Parallelism
1// Why Sui Can Parallelize — Owned vs Shared23// Owned objects → PARALLEL (no global consensus needed)4// Only the owner can submit txs → no conflicts possible56// Example: Alice sends Token to Bob7// Alice owns TokenA → only she can touch it8// This tx touches: TokenA, Alice's coin (for gas)9// No other tx can touch TokenA → PARALLEL!1011// Shared objects → SEQUENTIAL (need global ordering)12// Multiple users can interact → conflicts possible1314// Example: DEX pool (shared object)15// Alice and Bob both try to swap against the same pool16// → Must be sequentially ordered (who goes first?)17// → These txs CAN'T be fully parallelized1819// Sui's performance insight:20// Most real-world txs (transfers, games, NFTs) = owned objects21// Only complex DeFi = shared objects22// → 90%+ of txs can be parallelized!
Sparse Merkle Tree — State Commitment
1// Sui State Commitment — Sparse Merkle Tree (SMT)2// Not MPT like Ethereum — uses a different tree structure34// Sparse Merkle Tree:5// - Fixed depth = 256 (for 256-bit keys)6// - Most nodes are "empty" (no data)7// - Efficient because: empty subtrees compress to one hash89// Key = object_id (32 bytes = 256 bits)10// Value = hash(object)1112// Compared to Ethereum MPT:13// ETH MPT: variable depth, 16-way, key = keccak256(address)14// Sui SMT: fixed 256 depth, binary, key = object_id1516// Proof size:17// Both: O(depth) proof elements18// ETH: 64 nibbles → up to 64 nodes × larger hashes → ~10KB19// Sui: 256 bits → 256 hashes × 32 bytes → 8KB (similar)20// But: SMT can compress empty subtrees → much smaller in practice!2122// Checkpoint (like Ethereum block):23// checkpoint.effects_root = SMT root of all affected objects
How Object Storage → Capabilities
Owned objects skip consensusSimple transfers, NFT sales, game moves = no validator coordination needed. Near-instant finality for owned-object txs.
Objects have explicit ownershipMove's type system prevents double-spending at the language level — no central ledger needed for safety.
Shared objects need sequencingComplex DeFi (DEX pools, lending) requires all nodes to agree on order. Throughput limited for shared-object txs.
Object versioning (version field)Each object tracks its own version. Enables optimistic concurrency for owned objects without global state lock.
Different mental model from EthereumDevelopers must rethink DeFi (no ERC20 mappings, no global state). Steep learning curve for ETH devs.