Shareclass
The x/shareclass module enables users to delegate their RISE tokens without voting rights and earn staking rewards. This allows participation in staking using RISE tokens even without holding vRISE (non-transferable staking tokens).
Key Features
Section titled “Key Features”- Non-Voting Delegation with RISE:
- Users can delegate their RISE tokens to validators.
- Delegation does not grant voting rights, separating staking rewards from governance participation.
- Earning Staking Rewards:
- Delegators earn staking rewards based on their delegated RISE amount.
- Provides an alternative way to earn rewards for RISE token holders.
- Validator Creation:
- Supports the creation of new validators within the network.
Core Concepts
Section titled “Core Concepts”Non-Voting Delegation
Section titled “Non-Voting Delegation”Users can delegate their RISE tokens to a chosen validator. The module handles the calculation of shares and rewards. This mechanism allows users to benefit from staking rewards without needing to manage vRISE tokens or participate in governance directly.
Reward Calculation
Section titled “Reward Calculation”Staking rewards are calculated based on the amount of RISE delegated and the reward parameters of the module. Users can claim their accumulated rewards.
Workflow
Section titled “Workflow”1. Delegate RISE (Non-Voting)
Section titled “1. Delegate RISE (Non-Voting)”- User sends a
MsgNonVotingDelegatetransaction, specifying the validator and the amount of RISE to delegate. - The module records the delegation and calculates the corresponding shares.
2. Claim Rewards
Section titled “2. Claim Rewards”- User sends a
MsgClaimRewardstransaction to claim their accumulated staking rewards for a specific validator. - The module transfers the rewards to the user’s account.
3. Undelegate RISE (Non-Voting)
Section titled “3. Undelegate RISE (Non-Voting)”- User sends a
MsgNonVotingUndelegatetransaction to withdraw their delegated RISE. - The module processes the undelegation request, and the tokens become available after an unbonding period.
4. Create Validator (Optional)
Section titled “4. Create Validator (Optional)”- A user can send a
MsgCreateValidatortransaction to register a new validator node on the network.
Sequence Diagram: Non-Voting Delegation and Rewards
Section titled “Sequence Diagram: Non-Voting Delegation and Rewards”sequenceDiagram
participant User
participant ShareclassModule as x/shareclass Module
participant StakingModule as x/staking Module
participant BankModule as x/bank Module
User->>ShareclassModule: MsgNonVotingDelegate (RISE)
ShareclassModule->>StakingModule: Delegate to Validator (internally)
ShareclassModule-->>User: Return Shares and Initial Rewards (if any)
loop Reward Period
StakingModule-->>ShareclassModule: Distribute Staking Rewards
end
User->>ShareclassModule: MsgClaimRewards
ShareclassModule->>BankModule: Transfer Rewards to User
ShareclassModule-->>User: Confirm Reward Claim
User->>ShareclassModule: MsgNonVotingUndelegate
ShareclassModule->>StakingModule: Initiate Undelegation (internally)
ShareclassModule-->>User: Confirm Undelegation and Completion Time
Messages
Section titled “Messages”The module provides various message types:
- MsgUpdateParams: Update module parameters (governance operation)
- MsgNonVotingDelegate: Delegate RISE tokens to a validator without voting rights
- MsgNonVotingUndelegate: Undelegate RISE tokens from a non-voting delegation
- MsgClaimRewards: Claim accumulated staking rewards from non-voting delegation
- MsgCreateValidator: Create a new validator in the network
Queries
Section titled “Queries”The module provides various query endpoints:
- Params: Query module parameters
- CalculateBondingAmount: Calculate tokens that would be bonded for given shares
- CalculateShare: Calculate shares that would be received for given tokens
- AddressBonded: Get total bonded amount for a specific address
- ClaimableRewards: Get claimable rewards for an address from a validator
- AddressUnbonding: Get unbonding delegations for a specific address
See Github for details.