-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Implement staking functionality allowing token holders to lock tokens for rewards, governance participation, or other benefits.
Files to Modify
contracts/manage_hub/src/staking.rs- Create staking modulecontracts/manage_hub/src/types.rs- Add staking structurescontracts/manage_hub/src/rewards.rs- Add reward calculationcontracts/manage_hub/src/lib.rs- Add staking endpoints
Key Changes Required
- Stake Function - Lock tokens for specified duration
- Unstake Function - Unlock tokens after lock period
- Reward Calculation - Calculate rewards based on stake duration
- Lock Periods - Support different lock period options
- Emergency Unstake - Add emergency unstake with penalties
- Staking Tiers - Implement different staking tiers with benefits
Acceptance Criteria
- Implement stake_tokens function with lock duration
- Add unstake_tokens function with lock period validation
- Calculate and distribute staking rewards
- Emit Staked and Unstaked events
- Add get_stake_info query function
- Support multiple staking tiers
- Implement reward multipliers for longer stakes
- Add emergency unstake with penalty mechanism
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program