Skip to content

feat(frontend): Attestor Staking, Dispute Resolution & Slashing Management Interface (#296) - #336

Closed
huangji6693-max wants to merge 1 commit into
LynxXProtocol:mainfrom
huangji6693-max:feat/attestor-staking-dispute-ui-296
Closed

huangji6693-max wants to merge 1 commit into
LynxXProtocol:mainfrom
huangji6693-max:feat/attestor-staking-dispute-ui-296

Conversation

@huangji6693-max

Copy link
Copy Markdown

Closes #296

Summary

Implements the Attestor Staking, 14-Day Unbonding, M-of-N Dispute Resolution & Slashing Management Interface wired to contracts/registry/src/staking.rs and contracts/registry/src/voting.rs:

  • Soroban Staking, Unbonding & Dispute Helpers (frontend/src/lib/soroban.ts, frontend-dashboard-remote/src/lib/soroban.ts, frontend-wizard-remote/src/lib/soroban.ts):
    • Added UNBONDING_PERIOD_SECONDS = 1_209_600 (14 days), ATTESTOR_VOTE_TIMEOUT_SECONDS = 604_800 (7 days), and SLASH_PERCENT = 10.
    • Implemented fetchAttestorStakeInfo, submitStakeAttestor, submitRequestUnstake, submitFinalizeUnstake, submitCastDisputeVote, submitCheckDisputeTimeout, formatUnbondingCountdown, and calculateSlashedBalance.
    • Extended CreateCommitmentParams and submitCreateCommitment to encode M-of-N attestors (Vec<Address>) and vote_threshold (u32) when an attestor panel is selected, while preserving the single-resolver default ([], 0).
  • Attestor Staking & Dispute Resolution Modal (frontend/src/components/AttestorStakingModal.tsx, frontend-dashboard-remote/src/components/AttestorStakingModal.tsx):
    • Displays staked collateral balance, dispute panel lock status, 10% dissent slashing exposure, collateral deposit form, 14-day unbonding countdown progress bar & withdrawal trigger, active M-of-N dispute panel assignments, and cryptographic verdict voting (Fulfilled, Late, Breached) with slashing alerts.
  • Reputation Dashboard & Commitment Wizard Integration (frontend-dashboard-remote/src/ReputationDashboard.tsx, frontend-wizard-remote/src/CreateCommitmentWizard.tsx):
    • Added the Attestor Staking & Disputes trigger and modal in ReputationDashboard.
    • Added the Single Arbitrator vs M-of-N Attestor Staking Panel selector, staked attestor picker, and quorum threshold (M of N) configuration in CreateCommitmentWizard.

Verification

  • npx vitest run src/components/AttestorStakingModal.test.tsx (5/5 tests passing)
  • npm run lint (0 errors)
  • npm run build across frontend, frontend-dashboard-remote, and frontend-wizard-remote (all exit 0)

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5f9b117d-164c-4287-a5f6-89de43c66555
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

feat(frontend): Add attestor staking and unstaking flow

3 participants