Skip to content

feat(tri27): TRI-27 Staking Module #443

Closed

Description

@gHashTag

Sub-Issue #438: TRI-27 Staking Module

Files: src/tri27/staking.zig (NEW, ~400 LOC)

Tasks:

  • Create spec/staking.tri
  • Generate staking.zig via tri gen
  • Define StakingState:
    • total_staked: u128
    • stakers: AutoHashMap([32]u8 -> StakeInfo)
    • reward_pool: u128
    • apy: f64
  • Implement functions:
    • stakeTokens(amount, lock_period)
    • unstakeTokens()
    • calculateReward(compute_units) -> u128
    • distributeRewards(epoch)
  • Add Coptic mapping:
    • t21: Total staked
    • t22: Current APY
  • Add slashing:
    • Manipulation: -50% stake
    • Theft: -100% stake

Parent: #435

Activity

  1. gHashTag commented on Apr 29, 2026

    @gHashTag
    OwnerAuthor

    Implemented at deploy/trinity-nexus/network/src/token_staking.zig.

  2. added a commit that references this issue on Aug 14, 2026
    d3d6bc7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions