This article introduces in more details the “bags” concept, in the context of Cere Network, a Substrate-based nPoS L1 blockchain network.
In the context of Cere Blockchain, "bags" refer to a data structure used to organize nominators based on the amount of stake they have. The primary purpose of bags is to optimize the process of reward distribution among nominators.
Let’s start with a brief explanation of “Bags” in the context of Cere Validators & Nominators:
This concept is part of ongoing efforts to optimize the staking mechanisms in Cere to ensure scalability and efficiency.
You can learn about their origin story, and dive much deeper into the technical explanations around the Bags concept in the substrate wiki and reddit.
Imagine you have a huge box of assorted candies, and you want to distribute them to your friends based on the type and number of candies they like. If you had to search through the entire box every time, it would take forever! "Bags" are like smaller containers inside this big box. Each container holds candies of a specific type or range. So, if you know a friend likes a particular type of candy, you can quickly go to the specific container (or "bag") and grab what you need.
On Cere Network people can "stake" or lock up their digital coins to support the network. In return, they get rewards. If the system has to go through every single person's stake every time it wanted to give out rewards, it would be like searching through the entire box of candies each time. Instead, "bags" are used to group people based on how much they've staked. So, when it's time to give out rewards, the system can quickly and efficiently go to the right "bag" and distribute the rewards.
Using "bags" makes the system faster and more efficient. It ensures that everyone gets their fair share of rewards without causing delays or slowing down the network. In short, "bags" are a smart way to organize and manage stakes in Cere, making the reward process smoother for everyone involved.
Re-bagging is generally not necessary unless you are not receiving rewards, since if you’re not receiving rewards it might mean you’re in the wrong bag to get selected with higher probability. If you’re not receiving rewards, consider re-bagging to get into a better position again once you have everything back in order. Try to put your account in front of the accounts with less stake than you.
To repeat, if you are staking the required amount and still not receiving rewards, you might need to reposition your address in its bag. You can put your account in front of accounts with a lower stake using the voterList.putInFrontOf
extrinsic. It can also be managed using the Cere Explorer.
This process should puts you in front of an account with a lower stake. Therefore, the process doesn't guarantee that you will start getting rewards: it's possible that your account may be put in front of an account that itself isn't included in the set. However, if you have staked more than the dynamic minimum, you should start receiving rewards after the next era.
Alice has been an active nominator in the Cere Network for several months. Initially, she had staked a moderate amount of CERE, placing her in a specific bag based on her staked funds. Over time, Alice accumulated more CEREs through various means - trading, rewards, and additional investments. One day, while reviewing her staking details, she realized that the total amount of her staked CEREs had significantly increased, potentially placing her in a higher bag range. However, she also noticed that she was still in her original bag. This meant that even though she had more CEREs, she was still at the end of her current bag due to the insertion order mechanism.
Alice understood the importance of being in the correct bag. Being in a lower bag could mean she might miss out on optimal staking rewards, especially if her chosen validators become oversubscribed. She decided to take action. Using the "rebag" feature, Alice initiated a process to move her nominator node to the appropriate bag that matched her current staked amount. This would ensure that she's correctly positioned to maximize her staking rewards and benefits.