Sui’s Storage Fund Demystified

Sui’s Storage Fund ensures validators are compensated for maintaining essential onchain data.

Sui’s Storage Fund Demystified

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.