---
# System prepended metadata

title: Slasher Overview

---

# Slasher Overview

## Slasher client
The slasher client is software that connects to a beacon chain node that watches every message propagated by validators for possible malicious messages.

The slasher is sent every block and attestation received by the beacon node, and builds up a local database of every validators history. The slasher uses this per-validator history in order to detect when a validator has committed a slashing, either through attestations or blocks.

## Why run a slasher?
Slashers help protect the chain from validators that commit malicious messages. Without slashers, it would be difficult for the network to remain secure as malicious actors would not be punished. The amount of data required to detect slashings is too much data for a standard beacon node to record, so a separate client is used.

As long as there is 1 slasher running on the network, slashable messages can be detected and submitted, with the penalizing validators slashed. 

## Slashings
In order to maintain the security of the Ethereum 2.0 network, honest validators must ensure they don't accidentally sign an offencinve message (attestation or block) while malicious actors must be slashed and kicked out(exited) from the network. 
Validators must always ensure they’re not double voting or conflicting themselves, while running a slasher as well to be able to detect slashings and possibly get rewarded.

## How to use the slasher
To use the slasher, you can use `bazel run //slasher`. It also has a `--datadir` flag similar to the beacon node. 
Someone using the slasher may add `--enable-historical-detection` to perform detection from 1st epoch to the current head epoch. 
But please note this also requires `--historical-slasher-node` on the beacon node and requires much more disk space/cpu usage than usual.
