DepositSlashed

Event v154 → current #5

Emitted when a deposit is slashed (not returned) due to abuse.

View events on chain
Useful for: validatorsdevelopersanalytics

The Big Picture

Someone's deposit was confiscated because governance determined their safe-mode activation was frivolous or malicious. This is the enforcement mechanism that gives deposits teeth - without slashing risk, deposits would just be temporary locks.

Use Cases

  • Track governance enforcement actions
  • Build reputation systems based on safe-mode behavior
  • Monitor for abuse patterns

From Chain Metadata

An account had reserve slashed that was reserved.

Triggers

Preconditions

  • Account has a deposit at the specified block
  • ForceDepositOrigin authorized slash

Effects

Storage Modified

Postconditions

  • Deposit is forfeited (not returned to account)
  • Deposit entry removed from storage

Side Effects

  • Slashed funds typically go to treasury

Event Data

#NameTypeDescription
0
account
AccountId Account whose deposit was slashed (hex -> SS58)
1
amount
u64 Slashed deposit amount (RAO) (RAO -> TAO (/ 10^9))

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to DepositSlashed events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SafeMode") &&
      event.method === "DepositSlashed"
    )
    .forEach(({ event }) => {
      console.log("DepositSlashed:", event.data.toHuman());
    });
});

Runtime Info

Pallet Index
20
Event Index
5
First Version
v154
Current Version
v393