Skip to main content

Module bonds

Module bonds 

Source
Expand description

Bond-escrow surface: tag enum, error enum, and BondEscrow trait.

Traces to: SPEC.md §12.3, catalogue rows DSL-121..126.

§Scope

dig-slashing does NOT own escrow storage. The escrowed mojos live in dig-collateral (or a dedicated bond-escrow crate) that implements BondEscrow. This module defines the narrow trait surface the slashing manager + appeal adjudicator call through.

§Symmetry

Reporter and appellant bonds share the same trait + error surface. They are distinguished by the BondTag variant, which doubles as the unique escrow key — two concurrent bonds on the same principal cannot collide because the envelope/appeal hash is mixed in.

Enums§

BondError
Failure modes for BondEscrow operations.
BondTag
Bond categorisation + escrow key.

Traits§

BondEscrow
Bond-escrow storage interface consumed by the slashing manager + appeal adjudicator.