Skip to content

Validator Stake Slashing Condition Verification with Fraud Proofs #62

Description

@JamesEjembi

Problem Statement / Feature Objective

Validators who misbehave (equivocate, propose invalid blocks, miss too many attestations) must be slashed. A slashing condition verification system must be built that detects misbehavior from on-chain evidence, verifies fraud proofs, computes the slashing amount (proportional to severity), and executes the slashing by burning the validator's stake. A challenge period must allow the accused validator to submit counter-evidence.

Technical Invariants & Bounds

  • Slashable offenses: equivocation (2 conflicting blocks at same height), unavailability (missed > 100 attestations in 24h), invalid proposal.
  • Evidence submission: anyone can submit (validator_id, offense_type, evidence: Vec<u8>, bond: u64).
  • Fraud proof: for equivocation, evidence = two signed blocks with same height and different hashes.
  • Challenge period: 7 days; accused validator can submit counter-evidence; if successful, challenger's bond is slashed.
  • Slashing amount: equivocation = 100% of stake; unavailability = 0.1% per missed attestation (max 10%); invalid proposal = 2% of stake.
  • Slashed funds: 50% burned, 50% distributed to active validators.

Codebase Navigation Guide

  • src/consensus/slashing/detector.rs — slashing condition detector.
  • src/consensus/slashing/evidence.rs — evidence submission and verification.
  • src/consensus/slashing/challenge.rs — challenge period and counter-evidence.
  • src/consensus/slashing/executor.rs — stake slashing and fund distribution.

Implementation Blueprint

  1. Implement detector.rs: scan for equivocation proposals, monitor attestation inclusion, detect invalid blocks.
  2. Implement evidence.rs: accept evidence with bond, verify cryptographic proofs.
  3. Implement challenge.rs: 7-day challenge window; if counter-evidence wins, challenger loses bond.
  4. Implement executor.rs: burn slashed stake, distribute 50% to active validators.
  5. Integration test: submit equivocation evidence, fast-forward 7 days, verify slashing execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions