What are objects?
In IOTA, an object is a structured piece of data that lives on the blockchain. Every object has:- Unique ID: 32-byte identifier that is globally unique
- Version: Lamport timestamp tracking mutation history
- Owner: Specifies who can use the object
- Type: The Move struct type defining its structure
- Contents: BCS-encoded data representing the object’s state
Objects in IOTA must be defined as Move structs with the
key ability and have id: UID as their first field.Object structure in Move
Here’s how an object is defined in Move:Ownership types
IOTA supports different ownership models, each with different access patterns:Owned objects
Owned objects belong to a specific address and can only be used by that address:- Only the owner can use the object in transactions
- No consensus required to use (fast finality)
- Enables parallel transaction processing
- Can be transferred to other addresses
Owned objects enable IOTA’s fast transaction processing because validators don’t need to coordinate when processing transactions that use different owned objects.
Shared objects
Shared objects can be accessed by anyone on the network:- Accessible to all users
- Requires consensus to sequence transactions
- Useful for shared resources (e.g., liquidity pools, registries)
- Marked with
initial_shared_versionindicating when it became shared
Immutable objects
Immutable objects cannot be modified after creation:- Can be read by anyone
- Cannot be modified or deleted
- No consensus required (fast access)
- Useful for constants, metadata, or reference data
Object references
Objects are referenced in transactions usingObjectRef, which includes:
- ObjectID: The unique identifier
- SequenceNumber: The version (Lamport timestamp)
- ObjectDigest: Hash of the object’s contents
Using objects in transactions
Owned objects as arguments
Shared objects as arguments
initial_shared_version in the transaction.
Receiving objects
IOTA supports “receiving” objects that have been transferred to you but not yet explicitly accepted:The receiving pattern allows for more flexible asset transfers where the recipient explicitly accepts the object.
Object deletion
Objects can be deleted using the specialdelete function:
- Must unpack the struct to access the
UID - Must explicitly call
object::delete(id) - All non-drop fields must be handled
- Storage rebate is returned to the transaction sender
Dynamic fields
Objects can have dynamic fields attached to them, enabling flexible, extensible data structures:- Add fields without modifying the parent object type
- Unbounded collections (not limited by object size)
- Fields can have different types
- Fields are stored separately (lower gas for partial access)
Object versioning and lamport timestamps
IOTA uses Lamport timestamps for object versioning:- Transaction reads input objects with their current versions
- Transaction executes and modifies objects
- All modified objects get the transaction’s Lamport version
- Version increments ensure causality and prevent conflicts
Lamport timestamps enable optimistic concurrency: transactions that touch different objects can execute in parallel without conflicts.
Special object types
Coins
Coins are special objects representing fungible tokens:- Split into multiple coins
- Merged together
- Transferred between addresses
- Used to pay for gas
Packages
Move packages are also objects:- Are immutable by default
- Can be upgraded (creating a new version)
- Have dependencies on other packages
- System packages (e.g.,
0x1,0x2) are special
System objects
IOTA has singleton system objects:- IotaSystemState (
0x5): Manages validators, epochs, and governance - Clock (
0x6): Provides on-chain timestamp - AuthenticatorState (
0x7): Manages authentication state - Random (
0x8): Randomness beacon
Best practices
Choose the right ownership model
Avoid large objects
Handle storage rebates
When deleting objects, storage rebate is returned:Related topics
Move language
Learn about the Move programming language
Transactions
Understand transaction structure and lifecycle
Gas and fees
Learn about storage costs and rebates
Architecture
Overview of IOTA’s system architecture