This research piece aims to explore Sui’s object based programming model, how it facilitates live and diverse NFT structures, and its contribution to DeFi mass adoption.
On-chain vs. Off-chain
On chains like EVM or Solana, the state of digital assets − or NFTs, are stored off-chain. This is an acceptable model for static NFTs where there are no plans on transferring them or making any state changes.
A simple analogy is a Merkle tree where NFTs are its leaves and what’s published on-chain is only the root of the tree.
This model works if users regularly mint and forget about their NFTs; they have no needs to mutate or transfer them. However, if there needs to be a transfer or update on one of the NFT fields, it would be far more expensive and require way longer transaction hashes. Since only the root of the tree is published on-chain, each update requires a merkle path proof. Even reading the NFT requires a merkle path proof.
A recent paper by a16z crypto − Limits on revocable proof systems, with implications for stateless blockchains, explores the concept of stateless blockchains and its tradeoffs. Stemmed from a challenge of the blockchain paradigm in which each validator traditionally stores the entire state of the system. This requirement raises concerns about centralization as the state grows so large that only well-funded organizations can afford to store it.
This led to the concept of stateless blockchain design that proposes validators to store a small amount to the global state of the system (ie. only the root of a merkle tree). Users who need to initiate a transaction must publish a witness that their transaction is valid (ie. the merkle path proof that points to the leaves).
The paper discovers a problem: “…users’ witnesses can become invalid as other (unrelated) transactions update the global state, requiring users to monitor the network and periodically refresh their witnesses.” This unfortunately introduces new security threats as off-chain state management has proven to become cumbersome.
When metadata lives off-chain, smart contracts become overly limited. It does not make products more efficient, nor does it make distribution more efficient. It fundamentally fails to serve the purpose of a decentralized infrastructure.
Sui allows the metadata of the NFTs to be completely stored on-chain, as one of its most notable features is the ability to store large amounts of arbitrary data on-chain. In our previous report, we gave an analogy on how storage costs traditionally work.
A simple analogy is:
Alice uses Sui Network since its inception, while there’s not much data stored on-chain yet, she enjoys low gas fees.
Bob starts using Sui Network once it’s matured, since by then there’s significant data stored on-chain, Bob is forced to pay high gas fees.
Sui’s tokenomics addresses storage costs by including a storage fund that redistributes past transaction fees to future validators. When on-chain storage requirements are high, validators receive additional rewards to compensate for their costs, and vice versa when storage requirements are low.
It includes a deletion option that allows users to obtain a rebate whenever they delete previously stored on-chain data. This incentivizes users to consider necessary data to store on-chain. This rent model where users pay for storage through a pay-per-period structure is optimal for projects deploying on Sui. It introduces a market-based mechanism to free up storage when it becomes uneconomical to keep.
Keeping metadata on-chain ensures the programmability of the token remains. Assets mutate and sometimes compose. With smart contract programming through Sui’s object-oriented language, having structs stored on-chain help make composability a lot easier. New verticals open if NFTs can communicate, even NFTs from different formats.
Previously on other chains, NFT is simply an ownership record with a url to certain off-chain storage. This has been proven to be very limiting in regards to the full scale in which blockchains can achieve.
Unlike other chains, Sui is able to store jpegs on-chain with rich mutable and immutable attributes. NFTs become more than what we know of today, they become stateful dynamic on-chain applications within Sui. This ultimately will lead to unlocking more creativity, user adoption, and consumer value.
Sui’s vision of what a live NFT is creates a different point of view regarding the future of blockchain. Assets are dynamic; they mutate, they go through life cycles, and they sometimes even compose. There needs to be an infrastructure in place that can accurately model the life cycles of these assets.
If NFTs don’t possess the ability to model complex and evolving assets, their purposes are limited to finalized assets − currency, static PFP, etc. Dynamic fields in Sui models the dynamic asset life cycle well enough; they can store heterogenous value and be added or removed on-the-fly with only the gas being affected when accessed.
Imagine what can be created with composability and conditional logic:
- An NFT that evolves based on your transactional activities across DeFi protocols, giving you dynamic rewards as you level up.
- An on-chain structured product with bonds that reflect the changes in our macro environment.
- An art piece that changes when it gets signed by the artist or auctioned.
- A gaming asset that levels up when you’re leading a battle or make the top 10 player leaderboard.
Sui’s programming language allows the modeling of these life cycles at the fundamental level. The evolvability of these assets do not rely on contract updates on Sui, instead, you can make internal state changes or remove and append the child objects in dynamic fields.
Let’s take a look at an example of Tails, it has two abilities —
Key defines it as an ownable object that appears in your wallet like an NFT. The
Store ability allows for free transfer and wrapping. The Tail Badge at the bottom is an accessory that can be added on or removed when certain conditions are met.
The action of “wearing a badge” is achieved through dynamic fields. The Badge becomes a child object that can be stored within the Tail.
The dynamic aspect of the NFT is created with just one line of code. All of these dynamic NFT and composability opportunities will send us into a different league for modern on-chain dApps. Tying in the data being stored on-chain, will enable the validators to know where to look for the data, without the users needing to provide it.
The Kiosk Standard
Why have blockchains not been able to achieve much disruption?
Digital assets must encode rules and if these rules are not enforceable by smart contracts, it fails to be disintermediated because it would rely on centralized entities to follow the rules. NFTs should encode rules like royalties for secondary sales, verifying copyrights, and getting signoffs.
EVM chains and Solana are incapable of modeling assets that evolve through life cycles, storing metadata on-chain, and enforcing rules. The existing framework is sufficient for modeling simple, finalized assets but is ultimately not enough to disrupt industries.
Just last year, there was a dire royalty conversation happening on Solana. Many have voiced their demands − there needs to be a strong incentive for artists to migrate to Web3. Without an adjustment to the NFT standards, the marketplaces, tools, and artists will be disincentivized to build here.
Sui has enforced an NFT standard, Kiosk, that addresses this issue. As a creator, Sui Kiosk supports strong enforcement for transfer policies and associated rules to protect assets and enforce asset ownership. Sui Kiosk gives creators more control over their creations, and puts creators and owners in control of how their work can be used.
This ensures that digital assets on Sui encode rules that are enforceable by smart contracts, therefore making it an optimal environment for artists and creators alike to build on it.
NFTs that are composable in nature, paint a more accurate picture of your consumers’ needs and demands. The composable parts serve as behavioral indicators that allow for the full potential of personalized loyalty system without protocols needing to collect large amounts of private data.
Protocols will finally be able to discard overly simplistic member tier systems (like Bronze, Silver, Gold) and deliver truly individualized loyalty systems that reflect consumers at a one-to-one level.
The replacements, are composable NFTs that dynamically evolve based on user interactions. The evolution can be triggered by both off-chain data (weather, location, etc.) and on-chain data (transactions with certain protocols). Each NFT then visually changes to reflect your status. Low activity users who previously aren’t motivated can now see the impact of their activities right away. High activity users continue to see impacts that reflect and unlock the rewards associated with exclusivity and privilege.
Leveraging NFT traits to unlock exclusive and unique rewards
The main reason why PFPs exploded in popularity is the different traits that users can get and the sense of rarity/exclusivity that comes with it. By replacing traditional Bronze, Silver, and Gold tiers, NFTs will evolve and add on different traits based on different types of user activites and in turn generate specific rewards tailored to the users.
A great Web 2 example is the credit card rewards system. Many credit card companies now offer customized rewards plans based on user purchases. For example, Alice shops at malls a lot. The rewards plan she’s chosen is the shopping plan with partnered shopping malls. The more purchases she makes at shopping malls, the more points she accumulates and can exchange for item discounts or fee rebates that reflect instantly. Bob on the other hand, travels a lot and uses the same credit card for airline ticket purchases. The rewards plan he’s chosen is the travel plan with partnered airlines. The more purchases he makes with the airlines, the more points he accumulates and can exchange for seat upgrades or mileage boosts. There could be dining rewards for foodies who frequently use their credit cards at restaurants, theatre rewards for movie fans who purchase movie tickets a lot. Both Alice and Bob are free to toggle their chosen rewards plan to one or many of the others — providing an individually customized incentive system.
With composable NFTs, this can be frictionless in the Web 3 world. Imagine a PFP adding a sword trait if Bob trades gaming assets on a DeFi protocol, and if Bob transacts a lot more, the sword changes to denote a greater level of status. The sword trait here represents an exclusive in-game fee rebate with GameFi projects that the DeFi protocol has partnered with. For Alice, her PFP adds a gold chain trait since she frequently provides liquidity by depositing project tokens on a DeFi protocol. The gold chain trait represents an exclusive token boost with projects that the DeFi protocol has partnered with.
The point here is that there doesn’t need to be a single marker of status — each user’s status would be reflected through a unique combination of traits. So even if both Alice and Bob transact the same amount of money, they have completely different traits to represent their statuses. The thing that would bind them would be the rarity levels associated with the traits they have. Not everyone values the same rewards, and protocols can provide different rewards to users through developing a variety of partnerships, each of which is accessed and unlocked through the traits evolutions associated with the composable NFT.
What’s DeFi Got To Do With NFTs?
Composable NFTs are programmed to interact with each other and behave like lego blocks. They open a whole new world of interopoerability across different nature of apps on the blockchain. A better reference would be to say composability can do for business what open-source did for software development. This creates a new financial primitive that allows the chain to become more liquid as new use cases emerge and Web 3 adoption increases.
The features that were mentioned previously, enables Sui to become a superchain for NFTs and gaming assets to live on. A core strategy of Sui’s is to focus on building an excellent environment for NFTs in order to drive user growth and achieve mass adoption.
This is particularly important because DeFi protocols cannot achieve mass adoption through only DeFi initiatives. As we’ve seen on other L1s, this unfortunately will lead to not enough traction, not enough TVL, and not enough liquidity. The liquidity should instead come from retail users who create, transact, and trade the digital assets from NFT communities and GameFi projects.
The role of a DeFi protocol is to serve as the underlying infrastructure that allows these assets to be freely traded and utilized financially and creatively.
Sui’s ability to keep metadata on-chain allows NFTs to become stateful dynamic on-chain applications within Sui. The dynamic evolvability enables them to serve as a tool within a DeFi protocol’s ecosystem, thus unlocking more creativity for projects to explore on. Think: building a fully on-chain DeFi user incentive system through composable NFTs.
The implementation of the Sui Kiosk standard incentivizes creators, artists, and builders to create digital assets on-chain. As more and more on-chain assets are in circulation, there will be financial needs on utilizing and increasing asset efficiency. Think: Call/Put option vaults to earn yields on native NFTs/gaming assets.
As new and innovative Sui features are being built, we remain bullish on Sui’s potential for true disruption. We at Typus continue to be at the forefront of implementing new features, and are excited for the high composability and cohesion of dynamic on-chain Sui assets and the DeFi ecosystem. Think: an experimental NFT collection onboarding Web 2 users through zk login/sponsored txns/coupons/dynamic attributes/txn cookies.
Suinami Riders TG groupchat