SBT Standards Discussion

SBT needs to have the characteristics of non-transferability and revocability. When implementing SBT on the Sui public chain, we explored the engineering aspects and proposed it as a technical standard.

To enable the sender to revoke SBT on Sui, the SBT object needs to be held by the sender so that the destroy function can be called. The receiver can obtain a pointer object pointing to the SBT object, which needs to include certain specifically named field to indicate the address of the SBT object, which recommended to be named as SBTID.

The SBT object standard can align with the NFT standard, including metadata and other relevant information for easy display. If the receiver has a pointer object on asset display platforms such as wallets, the pointed SBT object can be displayed directly. There are several benefits to this implementation. It is easier for the sender to index their published SBT and withdraw incorrectly published SBT. If the sender withdraws the SBT object containing detailed information, it also saves online storage resources. It does not affect the display of the receiver’s SBT.

To restrict SBT from being transferred, the generated SBT object and pointer object can only have the key ability, without the store ability.
Based on this idea, we have implemented an SBT smart contract on Sui, and the project address is GitHub - RandyPen/certificate-SBT: certificate SBT

23 Likes

and by the way, it might make sense for the sui network

10 Likes

@CharmingPen thanks for the info

10 Likes

Sui doc release a display standard

The standard for this Display is tightly coupled with the design of the NFT, and by default displays the corresponding properties in the Sui object. We also need to display the properties that are pointed to by the object, which requires some adjustments to the design.

2 Likes

The Pointer Object technology standard was initially used for SoulBound Tokens, but it can actually be extended to solve the usage limitations of Sui object ownership, allowing another account to make changes to the information of that account.
If sender simply transfers object to recipient, sender have no capability to deal with that object’s information, neither to revoke that object or update object information.
During the discussion, we realized that there can be multiple pointer objects pointing to the same Sui object. In order to make the ownership relationship more clear, the pointed Sui object needs to have a field declaring account address of the owner.
The data structure of SBT is used as an example.

# pointer object
struct CertificateReceived has key {
    id: UID,
    redirect: address,
}

# pointed object
struct CertificateRecord has key {
    id: UID,
    sender: address,
    recipient: address,
    title: String,
    description: Option<String>,
    work: Option<String>,
    url: Option<String>,
}

redirect field in CertificateReceived is used to fetch CertificateRecord address. recipient in CertificateRecord can be used to double check the information ownership of CertificateRecord.

Correspondingly, the display standard can be set to:

fun init(otw: CERTIFICATE, ctx: &mut TxContext) {
    let keys = vector[
        utf8(b"title"),
        utf8(b"description"),
        utf8(b"image_url"),
        utf8(b"work"),
        utf8(b"sender"),
    ];

   let values = vector[
        utf8(b"{title}"),
        utf8(b"{description}"),
        utf8(b"ipfs://{img_url}"),
        utf8(b"{work}"),
        utf8(b"{sender}"),
    ];

    // Claim the `Publisher` for the package!
    let publisher = package::claim(otw, ctx);

    let display = display::new_with_fields<CertificateRecord>(
        &publisher, keys, values, ctx
    );

    // Commit first version of `Display` to apply changes.
    display::update_version(&mut display);

    transfer(publisher, sender(ctx));
    transfer(display, sender(ctx));
}

We will advise developers of wallets and explorers to recognize a Sui object containing a “redirect” attribute as a pointer object. Based on the “redirect” field, they can find the pointed object. If the address in the “recipient” field of the pointed object is the same as the owner’s account address of the pointer object, ownership is recognized. On the frontend pages of wallets and explorers, etc., the information of CertificateRecord will be displayed based on the custom “display” field.

5 Likes

More referrence about SBT(SoulBound Token)
What Are Soulbound Tokens (SBT)?
Decentralized Society: Finding Web3’s Soul