Skip to content

feat(staking): implement delegated staking (#246)#456

Merged
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
FaveTeamz:feature/246-delegated-staking
Jun 1, 2026
Merged

feat(staking): implement delegated staking (#246)#456
nanaf6203-bit merged 2 commits into
MettaChain:mainfrom
FaveTeamz:feature/246-delegated-staking

Conversation

@FaveTeamz
Copy link
Copy Markdown
Contributor

feat(staking): implement delegated staking (#246)

  • Add ValidatorInfo, DelegationRecord, DeactivationReason types and constants
  • Add 9 new error variants (InsufficientValidatorStake, AlreadyDelegated, etc.)
  • Add delegation storage fields, 10 events, 12 new messages to staking contract
  • Implement per-validator accumulator reward model (O(1) per delegator claim)
  • Implement slash propagation to all active delegators via secondary index
  • Add 30 unit tests covering all delegation paths and end-to-end flows

closes #246

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 31, 2026

@FaveTeamz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copy link
Copy Markdown
Contributor

@nanaf6203-bit nanaf6203-bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit nanaf6203-bit merged commit 6ff9623 into MettaChain:main Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Staking: Implement delegated staking

2 participants