Staking Update: September 2021

Polkadot introduces bags-list to optimize nominator sorting, scaling the staking system for future elections and decentralized governance.

By PolkadotSeptember 30, 2021

By Kian Paimani, Parity Technologies

Overview

This month’s main focus was the completion and merge of the semi-sorted-list (aka. bags-list) pull request. We already mentioned this in the August update. As noted, this will allow any restrictions on the `nominate` transaction to be removed again, and allow many more nominators to set their *intention* to nominate, and leave it to the sorted list to determine the top 22500 (or whatever the limit may be). This sorting functionality is extremely important for the long-term future of the staking/election system.

To achieve an ordered list of nominators within the constraints of the relay chain runtime, we employ a “bags-list”. The bags list has two primary components, bags and nodes. The list is composed of bags that each describe a range of active bonded funds (e.g. the 1st bag will have nominators with 0 → 10 DOT, 2nd bag 11 → 20 DOT, etc). In each bag is a list of nodes that correspond to a nominator and their staked funds. With our previous example, a nominator with 14 staked would be in the 2nd bag. Within the context of a single bag, nodes are not sorted by their stake, but instead appear in insertion order. In other words, the mostly recently inserted node will be the last node in the bag, regardless of stake. Continue reading to see the rationale, design details and how to use the system.

Bags-List In Depth

While the system tries its best to ensure nominators are always represented in the correct bag, certain changes in bonded funds (e.g. a slash in the negative direction, or rewards in the positive direction) can cause an account to be in the wrong bag, and for operational safety reasons the system will not automatically self-adjust
To correct such circumstances, and maintain the sort property, the bags-list pallet comes with an important permissionless extrinsic: `rebag`. This allows anyone to specify another account that is in the wrong bag (for whatever reason that may be), and place it in the correct one. With this property, we expect the bags-list pallet to be self-maintaining, with minimal effort from the blockchain, making it extremely scalable.

With this bags-list in place, whenever the time for an election comes, the bags are iterated from the most staked to the least staked. This could leave the last touched bag to only be partially iterated. This means that in some edge cases, the order of members within a bag is also important. Recall that within each bag, the iteration order is simply the insertion order.

Next to the ability to move yourself from one bag to another, any account can also move itself within a bag. Of course, this is only allowed when an account A has more stake than B, but it is placed after B in the bag (most likely because it joined later). Then, A has the right to move itself to the spot before B, via a transaction. This can only be helpful to nominators of the last iterated bag (such as in the figure above), and give them a better chance at being included in the election process. This work is in progress, more updates about it in the next issues of this monthly update.

Recommended Deployment Strategy

The 9.10 release was recently made, and it did not contain any of the bags-list related code. 9.11 should contain the enablement of the bags-list code on Kusama and Westend. That being said, we propose to first deploy this pallet in a fail-safe mode. In essence, the pallet is deployed and kept up to date, but its output data is not used. While this phase is enabled, we still recommend keeping the number of nominators bound to a safe value, like 22,500. Once the network is comfortable with the system, the next upgrade should flip the switch for the full enablement of the bags-list pallet, potentially upon 9.12 release. Subsequently, the limit on the number of nominators can be waived in Kusama (and Westend). Then, the same process can repeat on Polkadot.

Aside from this aforementioned PR, In the coming month, most efforts will be focused on testing and overseeing the deployment of the bags-list, making sure that everything goes smoothly, while concurrently working towards the overall goal of multi-block elections.

By The Numbers

At the time of writing, Polkadot has just shy of 22100 nominators, and the minimum nominating threshold is set to 120 DOT. A number of nominators are vulnerable to being chilled, which might happen when the 22500 limit is reached. Kusama, in the meantime, has been steadily below 7000 nominators and continues to be so.

Last month’s average of the minimum amount needed to be a validator in Polkadot is 1.7914 MDOT, and the total amount staked is 684.8421 MDOT (staking rate 68%). The same metrics for Kusama has been 4.2844 kKSM and 5.3596 MKSM respectively, over the last month.

From the blog

Is large-scale, high-quality Web3 education possible?

The Polkadot Blockchain Academy (PBA) is taking Web3 education to the next level with PBA-X, an online course crafted to deliver high-quality blockchain knowledge at scale. Learn how we’re preserving educational standards, fostering a global community, and creating new opportunities for learners everywhere.

Blockchain explained: A practical guide from concepts to use cases

Blockchain has grown far beyond its roots in cryptocurrency, reshaping industries from finance to healthcare. This guide walks you through the basics, benefits, and groundbreaking potential of blockchain and its impact on the future of the open internet.

Empowering the next wave of founders: Welcome to EasyA x Polkadot University

Unlock a structured path to start building on Polkadot with EasyA x Polkadot University.

Dynamic & Modular: Scaling Ambition with Agile Coretime

Polkadot’s Agile Coretime simplifies launching and scaling blockchain projects with dynamic blockspace allocation and flexible cost options. Learn how Agile Coretime makes it easier to build, launch, and scale ambitious Web3 projects.

How play-to-earn (P2E) is transforming onchain mobile sports gaming

Play-to-earn games are transforming mobile sports gaming. Learn how blockchain, NFTs, and platforms like Polkadot create new opportunities for digital asset ownership and cross-chain gameplay.

Polkadot Token 2049 and Decoded Asia 2024: A multichain ecosystem in action

At Token 2049 and Decoded Asia 2024 in Singapore, Polkadot teams and contributors showcased a multichain future for real-world applications. Key moments included Dr. Gavin Wood’s vision for digital individuality, Chrissy Hill’s regulatory insights, and announcements from emerging projects shaping the Web3 ecosystem.

What is a crypto wallet? Your all-access pass to the future web

In Web3, your wallet is your most valuable digital tool. It’s more than just a place to store, send, and receive cryptocurrencies securely—it’s your passport to the decentralized world.

July 2024: Key network metrics and insights

Welcome to your go-to source for the latest tech updates, key metrics, and discussions within Polkadot, brought to you by the Parity Success Team. This blog series covers a variety of topics, drawing insights from GitHub, project teams, and the Polkadot Forum.

Polkadot 2.0: The rebirth of a network

Polkadot 2.0 reimagines blockchain with a bold rebrand and powerful features: Agile Coretime, Async Backing, and Elastic Scaling. Step into a more flexible, faster, and scalable network. Learn about the improvements and changes that led to this next era of Polkadot.

Meet the Decentralized Futures grant recipients: transforming ideas into impact on Polkadot

The Decentralized Mic is here to spotlight the innovative projects and teams driving Polkadot’s growth. Join us as we explore the achievements of Decentralized Futures grant recipients and their contributions to the Polkadot ecosystem on the new ecosystem community call series.

The ultimate 2024 Polkadot grants and funding guide

Explore Polkadot ecosystem funding: grants, venture capital, bounties, and community initiatives. Discover opportunities for blockchain builders today.

Decoded 2024: Polkadot’s vision for a decentralized future

Polkadot Decoded 2024 in Brussels brought together top blockchain minds to explore the future of Web3. Highlights included Björn Wagner's insights on payments and Dr. Gavin Wood's vision for digital individuality. Showcasing technical breakthroughs and real-world use cases, Polkadot affirmed its leadership in the multi-chain future.