The methods surrounding the storage of data onchain are often overlooked by many, often because the mechanisms used are conventional and commonplace. This is unfortunate as data storage in a decentralized network plays a critical role in ensuring data integrity and long-term accessibility. Onchain storage with Sui differs from other blockchains. 

Sui’s storage fund is a core mechanism designed to address the challenges of storing data indefinitely onchain. By collecting a storage fee with transactions that create and alter objects, the network can compensate validators for managing onchain storage continuously, even for transactions completed before they joined the Sui network.

A key part of this mechanism, storage rebates, incentivizes builders to remove obsolete data, which in turn optimizes onchain storage use. This mechanism creates a powerful dynamic for developers to leverage in their products, allowing the creation of new products and experiences not possible without it.

What is Sui’s storage fund?

Sui’s storage fund is an economic mechanism that ensures compensation for the perpetual storage of onchain data. Every object on Sui requires an amount of data to be stored and maintained by validators on the network. Transaction fees on Sui are composed of two parts:

  • the gas fee, which covers the cost of computation for the network, and
  • the storage fee, which is paid upfront to cover the cost of data storage indefinitely. 

To illustrate, the computation cost is akin to paying a jeweler to craft a gold ring, which is a one-time expense that is spent on executing the action itself. In contrast, the storage fee represents the value of the raw gold. If you delete the object, similar to melting down the ring, you can reclaim a portion of the storage fee.

The ability to claim a storage rebate, selling the raw gold in the above example, helps maintain Sui's economic model, as users will remove data from the network's active state, clearing space for new data. Users initiate transactions that alter and remove objects and object fields in the active set, which results in the user receiving a prorated portion of the original storage fee back as a storage refund. This creates a unique dynamic with objects on Sui holding an intrinsic value in proportion to the amount of data stored onchain.

Design and incentives

The design of the storage fund addresses an important intertemporal problem in onchain storage: today’s validators process and store data, but future validators are responsible for maintaining it. If users only paid at the point of writing data to the blockchain, future validators would bear the ongoing cost of storage without receiving compensation. The storage fund resolves this by collecting fees at the time of data creation and redistributing it to validators throughout the entire time the data is stored onchain.

The storage fund is locked and staked each epoch, allowing staking rewards of the storage fund to help compensate active validators, ensuring they can manage the costs of storage in perpetuity. Staking rewards earned by the storage fund that are not needed to compensate validators are reinvested back into the storage fund. This ensures the storage fund consistently has the resources needed to compensate validators, creating a sustainable validator business model while the network’s storage demands continue to grow.

Additionally, the mechanics of the storage fund incentivize users to delete data when the cost of storing it exceeds the value of keeping it onchain. By offering a rebate on storage fees, the system introduces a market-based mechanism that encourages users to free up space when it’s no longer useful to retain the data onchain.

Building with onchain storage in mind

For teams building on Sui, understanding how to leverage the storage fund can be a game changer. Because every transaction on Sui involves both a gas fee and a storage fee, developers need to factor in these costs when designing apps. Importantly, because storage fees are one-time, projects that require large amounts of onchain data, such as NFT-focused projects or gaming platforms, can build apps that leverage the storage fund’s mechanics to create unique incentives and dynamics as objects are used and evolve.

In this sense, the rebate mechanism transforms the concept of onchain data storage from a static requirement into an interactive, economically engaging feature. Developers can build new business models and user experiences around this functionality, offering rebates as a form of reward for specific actions.

Right-sizing storage needs

While Sui’s storage fund is a powerful tool for onchain storage, it’s important to recognize that it isn’t a solution for all data. Walrus, a decentralized storage solution orchestrated by Sui, is a better fit for large-scale data that doesn’t need to reside directly on Sui. This includes data for media, games, and data availability for other networks. Walrus offers a much more cost-effective solution for storing mass amounts of data while remaining programmable and composable with Sui.

However, for data that must remain onchain, whether it’s objects representing account balances, DeFi positions, or in-game items, Sui’s storage fund ensures that validators are compensated for maintaining this data indefinitely. This combination of onchain storage through Sui’s storage fund and offchain storage with Walrus allows developers to strike the right balance between cost and functionality.

Conclusion

By providing a mechanism for perpetual onchain data storage, compensating validators for their work, and offering rebates for deleted data, Sui’s storage fund offers a flexible and sustainable solution for managing onchain data. This smartly designed mechanism supports onchain data while perpetuating itself.

Whether you’re a developer building on Sui or a user transacting on the network, understanding the power of the storage fund is key to unlocking its full potential.

Author

Sui Foundation

High-performance blockchain delivering the full stack for a new global economy.

Read more like this

Canary Capital Advances First-Ever SUI ETF with SEC Filing

The latest development marks significant progress towards a public SUI ETF, set to vastly expand U.S. institutional access to Sui.

1min read
Sui Foundation

Build Beyond: Sui’s Place in the Commerce Tech Stack

A conversation with Director of Commerce Product Lola Oyelayo-Pearson about the value of internet-ready blockchain

10min read
Sui Foundation

Reimagining Bitcoin’s Role in Sui DeFi

Bitcoin’s untapped potential meets a chain built to support it — discover the vision of BTCfi on Sui.

10min read
Sui Foundation

ThinkSui Launches, Rewarding Sui Builders and Content Creators

ThinkSui, a new platform from Sui and Thrive, rewards community members for creating apps, content, and NFTs.

2min read
Sui Foundation

XOCIETY and Adidas Join Forces to Offer Limited Edition NFT skins

Get ready to clothe your XOCIETY character in adidas athleisure as the gaming and apparel companies join up to offer a new, limited edition NFT collection.

1min read
Sui Foundation

Announcing Sui Academic Research Awards

Researchers and academics are invited to submit funding proposals for the first round of awards.

1min read
Sui Foundation