Skip to main content

Slashing Manager

Purpose​

Apply bond slashing for providers that violate protocol rules.

Scope​

This contract triggers bond slashing in ProviderRegistry. It does not adjudicate disputes; it executes authorized slashing actions.

Actors and Roles​

  • Slasher role: allowed to call slashProvider.
  • Owner: configures slashers and provider registry address.

State and Storage Model (High-Level)​

  • Mapping of slasher addresses to authorization status.
  • Reference to ProviderRegistry.

Core Flows (State Machine)​

  • setSlasher(address, bool) by owner to grant or revoke slashing rights.
  • slashProvider(provider, amount, reason) by slasher to reduce provider bond.

Protocol Guarantees​

  • Only authorized slashers can trigger slashing.
  • Slashed amounts are routed according to ProviderRegistry policy.

Security Invariants​

  • Unauthorized actors cannot slash providers.
  • Slashing amount cannot exceed available bond in ProviderRegistry.

Threat Model​

  • Unauthorized slashing attempts.
  • Misconfigured slasher roles.

Economic Constraints​

  • Slashes are bounded by the provider’s bonded amount.

Governance and Admin Controls​

Owner can set or revoke slashers and update the provider registry address.

Events (Optional)​

  • SlasherSet(address slasher, bool authorized)
  • ProviderSlashed(address provider, uint256 amount, string reason)

Integration Notes​

  • Consume slashing status before assigning new work to actors.

Test Coverage Map (No Code)​

  • Authorization of slashing submissions.
  • Correct application and clearing of penalties.