Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

What is staking and slashing? How we take it to a new level

Robert
Dec 6, 2022 · edited
B
Blogs
cover

What is Staking ?

The term "staking" has been misused and misinterpreted in the blockchain space and in crypto for a very long time. Most people have heard of the word "staking" from Proof-of-Stake (PoS), is an alternative mechanism to the traditional proof-of-work (PoW) used by Bitcoin. But what exactly does "staking" mean? 

The term "staking" in the context of finance likely originates from the concept of staking a claim, as in to assert ownership of something. In the context of proof-of-stake systems, users are essentially staking their assets, or putting them up as collateral, in order to receive a reward. This is similar to the idea of staking a claim on a piece of land or some other resource.

There are malicious blockchain or especially some DeFi projects that usually use "Staking" as a term of "earning interests" and use it to lure users to lockup their tokens in order to "gain" high yield interests. In this article we are not discussing any of those marketing tricks or scams, instead we solely focus on the serious meaning of "staking" in the system design. 

What's the benefit of staking?

Usually staking gives users some benefits, that's why users want to stake their assets. In proof-of-stake systems, staking can provide a number of benefits to users. For one, it allows users to earn rewards simply by holding onto their assets, which can provide a passive income stream. Additionally, staking can help to increase the security of the network by ensuring that there are enough assets at stake to make attacks on the network unprofitable. This can make the network more decentralized and resistant to attacks. Finally, staking can also help to increase the value of the assets being staked, as the limited supply of staked assets can drive up demand.

In ArcBlock's staking design, we make the benefit of staking even more valuable, e.g. in the upcoming upgrade, we supported a new featured "staking for gas-free", users only need to stake a small amount of ABT token, their gas fee will be waived completely, and applications can stake for their customers to waive gas fee to make user onboarding and experience better. 

By allowing applications built upon ArcBlock to offer additional benefit for the users, this will enable a lot of new use scenarios,   as well as providing a safe and secure environment for users to transact with dApps. 

What is Slashing?

Slashing is a penalty mechanism used to deter malicious actors from attempting to compromise the security of a network or breaking the rules. When someone tries to break the rules in any way, they are subject to being slashed—meaning they lose their part or entire staked assets. 

Staking refers to the practice of holding a certain amount of a particular asset in order to receive a reward. This helps to secure the network and provides users with a potential source of income.

Slashing, on the other hand, refers to the practice of penalizing users who engage in behavior that is harmful to the network. This could include things like attempting to cheat the system or engaging in activities that could compromise the security of the network. By imposing penalties on bad actors, the system can help to ensure that users are incentivized to behave in a way that is beneficial to the network as a whole.

Whenever there is "Staking" there is risk of "being slashed"

"Staking" and "Slashing" are two pairs in a well designed stake system, if there is no "slashing", there is no point of "staking" at all. "Staking" and "slashing" are often used in combination to create a system that is both secure and incentivizes good behavior from users. 

Together, staking and slashing create a system that rewards good behavior and punishes bad behavior, which can help to ensure the security and stability of the network. Without the threat of punishment through slashing, users may not have any incentive to act in the best interests of the network, which could lead to its downfall.

A lot of users didn't notice there is a risk to lose part of all of their staked assets, and only focus on the benefit they can get, this is what people really need to be careful about. 

For example, In the recently changed PoS Ethereum, the system only requires 32 ETH to be staked before a user can become a validator, and they could possibly make more ETH during the mining. This is true and exciting, however they could also risk losing part or all of those 32 ETH if their node does not behave correctly, no matter if it's an intentional bad node, or simply because the network issue or system gets hacked by attackers. 

Another example, in the latest ArcBlock, users only need to stake 1 ABT and all gas fee of the transactions will be waived, however if a user takes advantage of this by sending malicious amounts of transactions, they will risk losing the staked token and losing the privilege of gas-free. 


What staking and slashing can be useful for dApps?

Staking can not only be used in Blockchain, but also it can be useful for dApps (decentralized applications) in a number of ways. For one, staking can help to increase the security of a dApp by ensuring that there are enough assets at stake to make attacks on the network unprofitable. This can make the dApp more decentralized and resistant to attacks. Additionally, staking can also provide a source of funding for the development and maintenance of the dApp, as users who stake their assets can earn rewards that can be used to support the dApp.

Furthermore, staking can also help to increase the user adoption and engagement of a dApp. By providing users with the ability to earn rewards simply by holding onto their assets, staking can create a strong incentive for users to use and support the dApp. This can help to drive up the demand for the dApp's native token, which can in turn increase its value.

Overall, staking can be a valuable tool for dApps, providing benefits in terms of security, funding, and user adoption.

ArcBlock's Blockchain design takes "staking" and "slashing" seriously and considers it can be useful for dApps from very early on. The staking transactions were introduced in the first version in 2019, however we stay low profile and keep improving it until we think it's generic enough for applications. 


How ArcBlock's generic Staking and Slashing mechanism works?

  • Any Tokens, NFT or their combination can be staked

Any digital assets can be staked, no matter if it's a system native token like ABT, or a user issued token, or any NFT can be staked. It's the application's sole decision what kind of digital assets they request users to stake. 

Staking is a special transaction in ArcBlock, usually the staking transaction is prepared by the application and needs to be signed by the user with their DID Wallet. The DID Wallet will clearly display and explain for the users what assets will be staked and what the terms of staking, if users agree they can sign the transaction. 

  • Staked assets are secured in special blockchain accounts 

This is a unique design of ArcBlock blockchain, unlike other systems, staking only means users send their token to other's address (user usually can't tell it's a smart contract or just somebody else's account), the staked assets are secured in special accounts dedicated for this users and this application, all thanks to the under layer DID:ABT protocol we use in the blockchain. 

Assets in staking accounts can only be unstaked (return to the original account) or slashed (sent to a special slashing account). Slashing can only be initialized by pre-agreed slasher accounts which are signed during staking transactions. 

The common rug run problem or hacker attack problem would be hard in this design, the blockchain ensures the assets in the staking accounts can only go back to the original account or be slashed by a designated slasher, and can not move freely to the attacker's account. 

  • User can unstake anytime for any reason 

The user can start the unstake process anytime and directly from their DID Wallet.  In DID Wallet we build dedicated pages to help users see all their staked assets in one page, and they can unstake the assets anytime directly from the DID Wallet with one button tap.  

This design helps users from protecting their staked assets, and the unstake doesn’t need any help or information from the application, even if the application is no longer active or malfunctioned, users can simply unstake from the wallet without need to go to the application. 

  • Cool down period for un-stake

Unstake transactions are "two-phase" transactions on ArcBlock blockchain: first the users can send Unstake TX to request for unstaking, if the unstake request is successful, a pre-agreed "cool down" period will be required before user can send Claim Stake to take back the assets on stake. 

The cool down period is designed for protecting the system and the application from the attackers, bad actors could stake the requested assets and do something bad and then instantly unstake to try to escape from the punishments.  The cool down period make this much harder, the application should designate a reasonable cool down period to ensure it has enough time to detect the malicious behaviors. 

When users start the staking, DID Wallet will warn the users how long  the cool down period could be, they should only sign if they understand the risks. 

  • Slasher will not directly have benefit by slashing 

To avoid slasher slash the assets for their own benefit instead of punishing the misbehaviors, the system designed that the slashed assets will NOT be sent to the slasher, instead they will be sent to the community pool of the whole ArcBlock blockchain system and become reward for the ecosystem.  


What are some use scenarios for staking?

There are a lot of use scenarios that can be enabled with staking features to provide a better decentralized application community.  The nature of decentralized application means there is no centralized controller and censorships,  this is great for freedom of speech however it also opens up some vulnerability for bad actors and malicious users.  The staking and slashing mechanism is a powerful tool to self-governance the system with the power of blockchain and smart contracts. 

Here are just a few examples we are working on, and there are a lot more possibilities that can be explored by the developers. 

Staking for Gas-free 

This is the first widely used staking feature we enabled for ArcBlock.  Users can stake a small amount of ABT in exchange for the gas-free privilege.  Applications can stake a small amount of ABT and provide gas-free services for its customers. 

Misuse the gas-free privilege is safeguarded by the blockchain validator nodes and slash the bad behaved actors, no matter if it's a user, or bots or misbehavior applications. 

Staking for Cross-Chain Bridges 

Cross-chain bridges are necessary components in a multi-chain world; however, cross-chain bridges contributed the most exploits and security issues for the DeFi attack. In ArcBlock’s ArcBridge (we also called it DID Rollup) we combined the staking and slashing mechanism as well as many other security features to safeguard the bridge. 

Bridge nodes, validators need to stake tokens for the amount of cross-chain token they can validate and endorse. If they have misbehavior, no matter if it's intentional or technical difficulty their stake could be slashed and sometimes as a payback to the users who become the victim.  We have been using a staking and slashing mechanism in ArcBridge and running for years with zero incident as of today. 

Staking for Proposal/Vote 

Proposals and votes are powerful tools for DAO (decentralized anonymous organizations) and sometimes very useful for the DAO or blockchain governance.  A DAO can request proposer stake assets in order to propose a proposal, or even stake assets in order to vote.  The malicious proposals or votes which were intentionally proposed to be harmful for the governance will be slashed. E.g. A Proposal can be voted as Yes/No or No+Veto.  If an agreed percentage of participants vote to “No+Veto” the staked assets from the proposer and those who voted “Yes” will be slashed.  (Note: this is just an example, the taking and slashing rule is decided by the organization) 

Staking for Comments

Spams, hate speeches and bad content are popular and they hurt the community and waste system resources.   The community operator can define their own rule of staking for comments, a commenter (usually new to community and haven’t built up trusted status) need to stake for comments, if their content has been voted as harmful and breaking community rules, their stake will be slashed.  Once their comment is approved their stake will be returned and over time commenters can be awarded with certain status (usually as NFT or SBT) so they don’t need to stake for comment. 

Staking for Marketplace Listing 

The blocklet stores, NFT stores are decentralized marketplaces. How could the marketplace operators ensure those who request for listing are not trying to put malware, illegal NFTs etc. to scam others?  They can use staking for listing, users need to stake certain tokens in order to be listed in the marketplace, and bad behaviors will risk losing their staked assets.

Staking for X 

ArcBlock blockchain provides powerful application level staking and slashing transactions, and ArcBlock’s Blocklet framework makes it even easier by providing “Staking for X” APIs to let the application developers implement their staking feature easily within just a few lines of code. 

With “Staking for X”, the application developers can quickly enable staking in their application and focus on their core futures and without worrying about implementation, security and fairness of the staking mechanism. 

2.0.175