suiboxer.xyz

Sui display standard vs aptos digital asset metadata: how do they differ?

The Sui Display Standard and Aptos Digital Asset Metadata are both on-chain systems for defining how a token or NFT appears in wallets and marketplaces, but they differ fundamentally in structure and flexibility. Sui uses a separate Display object that maps template fields to object data, while Aptos embeds metadata directly into a TokenData or Token resource with a fixed schema. This article explains the mechanics of each approach and how to use them.

The Core Difference

Sui Display Standard is a generic, schema-free system. You create a Display object for a collection (e.g., a TreasuryCap or shared object) that contains a set of template strings like "name": "{name}" or "image_url": "{image_url}". These templates reference fields from the Sui object’s dynamic fields or its own struct fields. The Display object is published separately from the asset, and any wallet or indexer can read it to render the asset’s visual properties. Because the template keys are arbitrary, designers can add custom fields (e.g., "rarity": "{rarity}") without changing the core token struct.

Aptos Digital Asset Metadata follows a more traditional approach. Each digital asset (NFT or token) has a TokenData resource that stores fixed fields: name, description, uri (typically a JSON metadata URL), and a vector<TokenProperty> for custom properties. The metadata is part of the asset’s on-chain resource, not a separate object. This means the schema is predefined by the Aptos standard, and any custom data must fit into the TokenProperty key-value store.

How to implement sui display standard

  1. Define your Sui object struct. For example, a Hero struct with fields like name, level, and image_url.
  2. Create a Display object. Use the display::new<T>(&mut publisher) function, where T is the type of your object (e.g., Hero). The Publisher object must be obtained from a published package.
  3. Set template fields. Call display::add_multiple with key-value pairs like ("name", "{name}"), ("image_url", "{image_url}"). The template strings use curly braces to reference the struct’s field names.
  4. Update the display. Call display::update_version(&mut display) to finalize the template. After this, wallets that query the Display object for type T will see the rendered fields.
  5. Publish the Display object. Typically you create it alongside the collection’s TreasuryCap or as a shared object. Any object of type T will then be rendered using these templates.

Key point: The Display object does not store the actual metadata values - it stores the mapping. The values are looked up dynamically from each asset object’s fields or dynamic fields. This means you can update the display templates after minting without modifying the individual tokens.

How to use aptos digital asset metadata

  1. Create a collection. Use the token::create_collection function, specifying name, description, uri, maximum_supply, and mutability_config.
  2. Mint a token. Use token::create_token_data to create a TokenData resource with name, description, uri, and optional vector<TokenProperty>. Then call token::mint_token to create a Token resource owned by a recipient.
  3. Set custom properties. If you need fields beyond the standard ones, use token::add_token_property or token::add_token_property_mutability to add key-value pairs (both as strings) to the TokenData. For example, ("rarity", "legendary").
  4. Update metadata (if mutable). The mutability_config during collection creation determines whether uri, description, and properties can be changed later. You call token::update_token_data_property to modify a property.

The metadata is stored directly on the TokenData resource (for collection-level properties) or the Token resource (for token-level properties). Every wallet or marketplace reads these fields by querying the account’s Token resources.

Practical Trade-offs

Flexibility: Sui’s Display Standard wins here. You can add any template key without changing your core struct. For example, a game might add "attack": "{attack}" later by just updating the Display object. On Aptos, you must plan custom properties in advance or use the generic TokenProperty vector, which is limited to string keys and values.

Gas cost: Sui’s approach has a one-time cost to create the Display object (which can be shared). Minting each token costs the same as any object creation. Aptos’s metadata is embedded per token, so each mint stores the full TokenData resource (including uri string). For large collections, this can add up.

Discoverability: On Sui, wallets must query the Display object for the type T to know how to render it. If no Display object exists, the token appears as raw JSON. On Aptos, wallets always know the schema (name, description, uri) because it’s part of the standard. This makes Aptos tokens easier to render out of the box.

Mutability: Sui’s Display object can be updated after minting, and all existing tokens automatically reflect the new templates. On Aptos, only mutable metadata fields (set during collection creation) can be updated per token or per collection. This gives Sui more flexibility for evolving collections.

When to choose which

Use Sui Display Standard when: - You want to add or change rendering fields over time (e.g., seasonal rarity traits). - Your token’s visual data is computed from on-chain state beyond a simple URI. - You prefer separating metadata logic from asset logic.

Use Aptos Digital Asset Metadata when: - You need a predictable, wallet-friendly schema that works immediately. - Your metadata is simple (name, image URI, a few properties) and unlikely to change. - You want to minimize on-chain lookup complexity - just read the TokenData resource.

For most projects, Sui’s approach is more flexible for dynamic NFTs or gaming assets, while Aptos’s is more straightforward for static collections like profile pictures or tickets. The choice depends on how much you value future adaptability versus immediate compatibility.

Not financial advice. suiboxer.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.

Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.

Back to sui & aptos