- How Nervos is Tackling the State Explosion Problem Facing Smart Contract Blockchains
A recent essay from Ethereum co-founder Vitailk Buterin has proved a growing concern for the sustainability of smart contract blockchains, like Ethereum. The essay, titled A Theory of Ethereum State Size Management, has highlighted the problem of growing state.
Actions in Ethereum, like creating an account, storing tokens or using dApps, add data to the state that all full nodes must store in order to be able to verify new transactions and blocks. As users are continually reminded of, these actions require a one-time gas cost to be paid by the sender of a transaction, however adding data to state imposes permanent ongoing costs on the network.
Vitalik’s essay may have been motivated by recent calls to increase the block gas limit, which would increase these challenges by allowing state to grow even faster.
We wrote about the trade-off between decentralization and scalability at length in the Nervos positioning paper. Because every node in the blockchain network needs to store all of the state (data) of the blockchain, if allowed to grow unchecked, hardware costs of running a full node will be increased and convenience reduced, and thus less people will run nodes. Over time this will reduce a blockchain’s unique quality of decentralization and the properties it instills in the network.
The issue around the growing state on chains like Ethereum is that while solutions such as state rent or stateless clients have been proposed, foreseeable complications have prevented any progress in tackling this problem. The fact that Buterin is looking to address the issue is of course promising, but there is a solution that has been implemented by Nervos already, since its inception.
Imposing state rent on Nervos is a little complicated, we can begin by explaining it through analogies. Nervos makes the storage space of the blockchain like land, it’s limited and to use it (store data) you have to own $CKB (1 CKB = 1 byte). This “state-focused” economy encourages developers and users to make efficient use of the blockchain’s storage, one of its limited resources.
Instead of mandating periodic rent payments from users, Nervos imposes rent through targeted inflation. When CKBytes are utilized to store data on-chain, an “inflation tax” is paid by those holders to miners through issuance. For long-term holders looking for a store of value, they can shield their CKByte holdings from this inflation by locking them in the Nervos DAO.
The total state of the blockchain is a shared resource, it must be appropriately managed to avoid abuse through a tragedy of the commons.
Credit: Kirk Anderson
To understand the Nervos approach, we can use the analogy of a cap and trade system that limits carbon emissions. A cap and trade system limits total emissions and puts a price on the right to emit, opening up a market for companies to buy and sell allowances that lets them emit only a certain amount, as supply and demand set the price.
On the Nervos Blockchain, the $CKB token represents cell capacity in bytes, and gives token holders the right to occupy a piece of the blockchain’s overall storage. New $CKB is issued to miners as incentive to secure the blockchain.
Since the supply of CKByte tokens represents the overall state size, the issuance policy of the tokens bounds the state growth. As state storage is bounded and becomes a scarce resource (like bandwidth in Bitcoin and computation in Ethereum), storage can be priced and traded freely on the market like in the cap and trade system.
As a result, the cost of adding storage would be higher when the global state capacity is mostly full and lower when it’s mostly empty.
While there are many other solutions to the state growth problem that don’t involve changing the base layer chain, the solution Nervos has set out with to state growth seems to be the most practical in the foreseeable future.
Buterin lays out solutions, such as stateless clients, or state rent/expiry. But, the Ethereum co-founder expresses the need for a catalyst, as he put it: “If we are ready to make sacrifices, there are solutions that could start to be implemented very soon. On the other hand, there is the possibility that over time we can tinker and come up with better combinations of these ideas to reduce the problems, and particularly make it technically easier to implement.”
While solutions to the state growth problem are talked about in theory in other communities, the Nervos economic model handles these sustainability concerns from the start. The elegance of the state rent solution laid out here is only possible because of the Nervos cell model, which we are only starting to see the potential of.
- Date of publication:
- Tue, 02/23/2021 - 16:03
Click on the link - it will be copied to clipboard