Skip to main content

Module offense

Module offense 

Source
Expand description

OffenseType — the four discrete slashable consensus offenses.

Traces to: SPEC.md §3.2, catalogue row DSL-001.

Scope reminder: validator slashing only. DFSP / storage-provider slashing is out of scope for this crate.

§Design

Four variants, three BPS floors (both attester variants share ATTESTATION_BASE_BPS). The variant-to-BPS mapping is protocol law — it lives in base_penalty_bps() and nowhere else in the codebase. Downstream callers (the base-slash formula in SlashingManager::submit_evidence, DSL-022; the reporter-penalty path in AppealAdjudicator, DSL-069) query this method rather than hard-coding the BPS values.

Serde + Copy + Eq + Hash derives keep the enum cheap to pass by value through every downstream type (SlashingEvidence, VerifiedEvidence, AppealAdjudicationResult).

Enums§

OffenseType
The four slashable consensus offenses.