Skip to content

[TASK] Tangle Cloud: Full Slashing Lifecycle UXΒ #3120

@vutuanlinh2k2

Description

@vutuanlinh2k2

Goal

Expose full slashing lifecycle (propose, dispute, execute, cancel) to all authorized roles β€” not just operator dispute.

Status

πŸ”΄ INCOMPLETE β€” Only operator dispute/cancel hooks exist; propose, execute, batch-execute, and executable-discovery surfaces are missing.

Must-Have Tasks

# Task Type Contract Function Current State
1.1 Add propose-slash action for service/blueprint owners Feature Slashing.proposeSlash() Not implemented
1.2 Add execute-slash action (single) Feature Slashing.executeSlash() Not implemented
1.3 Add execute-slash-batch action Feature Slashing.executeSlashBatch() Not implemented
1.4 Add executable-slash discovery surface Feature Slashing.getExecutableSlashes() Not implemented
1.5 Add cancel-slash admin action Feature Slashing.cancelSlash() Hook exists, no admin UI surface
1.6 Add slash status timeline (proposed β†’ disputed β†’ executed/cancelled) Feature N/A Not implemented
1.7 Add role-aware guardrails (prevent invalid actions by role/time/status) Feature N/A Not implemented

Files

  • apps/tangle-cloud/src/pages/operators/manage/page.tsx β€” existing operator slash UI
  • libs/tangle-shared-ui/src/data/graphql/useSlashing.ts β€” existing hooks (dispute, cancel only)
  • ../tnt-core/src/interfaces/ITangleSlashing.sol β€” contract interface
  • ../tnt-core/src/core/Slashing.sol β€” contract implementation

Test Criteria

  • Service/blueprint owner can propose a slash from UI
  • Authorized caller can execute a single slash post-dispute-window
  • Authorized caller can batch-execute eligible slashes
  • Executable slashes are discoverable with explicit reason when not executable
  • Admin can cancel a pending slash
  • Slash detail shows full status timeline (proposed time, dispute deadline, state transitions)
  • Actions are disabled/hidden based on role and slash state

Nice-to-Have

  • Slash proposal templates for common violation types
  • Notification/alert when dispute window is closing

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Completed βœ…

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions