> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockgence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Guard

> Active monitoring of wallets, yours or an attacker's, with alerts in the app, by signed webhook and by email.

Guard keeps a wallet under watch and tells you what it does, block by block. It serves two purposes:

> [card] Your wallets
>
> Hot wallets, treasury: a large outflow, an outflow the wallet did not sign, a new approval, a delegation or a risky
> counterparty.

> [card] An attacker's wallet
>
> Every outgoing movement and where it goes: to an exchange (the moment to ask for a freeze), to a bridge, to a mixer, or
> to a new account that Guard can follow on its own.

> [!NOTE]
>
> The app's interface is in Spanish. Screens, tabs and buttons are named as they appear, with their English meaning.

Open it from **app.blockgence.com → Guard**. The tabs are **Alertas** (alerts) and **Wallets**, plus **Avisos**
(notifications: webhook and email setup) and **Protocolos** (protocols: Watchtower).

![Watched wallets in Guard](https://mintcdn.com/blockgence/jIDqBW86tOU_Ini-/images/products/guard/wallets.png?fit=max\&auto=format\&n=jIDqBW86tOU_Ini-\&q=85\&s=5299e405c6f439a568308cf126492c43)

Watched wallets, with synthetic data.

## Watch a wallet

**1. Enter the address and the network**

In **Wallets**, paste the address and pick the network. The top of the screen says which networks Guard watches and
whether the monitor is reading them.

**2. Choose the purpose**

**Una wallet propia** (own) or **La wallet de un atacante** (attacker's). Each purpose comes with its default rules, which you can adjust later.

**3. Share it, if you want**

A shared watch is visible to your whole organization, and anyone who sees it can work its alerts.

Guard watches **from the moment the wallet is added, not backward**: the detail of each watch says from which block it
was watched, plus the pauses and the monitor's gaps. For anything earlier, use the trace in
[Investigation](https://docs.blockgence.com/en/products/investigation.md).

You can also start a watch from other parts of the app: the **vigilar** (watch) link on an address in [Monitor](https://docs.blockgence.com/en/products/monitor.md),
the last step of incident mode (it loads the attacker's accounts) and the copilot, if you ask it to.

## What counts as activity

The transaction the wallet signs (even if it reverts), the native coin with its internal movements, ERC-20 tokens,
ERC-721 and ERC-1155 NFTs, approvals (Permit2 included), EIP-7702 delegations (even when someone else submits them) and
the contracts it creates. Each event is valued in USD, with the counterparty's label.

**Noise** is stored, marked, and does not alert: spam tokens, zero-value transfers (the signature of address
poisoning), spoofed senders and dust.

## Rules

| Rule | What triggers it | Severity | Own | Attacker |
| - | - | - | - | - |
| Large outflow | A priced outflow above a threshold (default US\$10,000) | High | Yes | No |
| Large inflow | A priced inflow above a threshold (default US\$1,000) | Medium | No | Yes |
| Any outflow | Every signed transaction and every outflow of funds | Medium | No | Yes |
| Unsigned outflow | A third party pulls from one of the wallet's allowances | Critical on an own wallet | Yes | Yes |
| Approval | A new approval (not revocations) | High; critical if the spender is risky | Yes | Yes |
| Delegation | An EIP-7702 delegation | Critical | Yes | Yes |
| Risky counterparty | Funds to or from a sanctioned, darknet or scam address, a mixer or a known attacker | Critical outgoing, high incoming | Yes | Yes |
| Exchange | An outflow to an exchange | Critical | No | Yes |
| Bridge | An outflow to a bridge | High | No | Yes |
| Contract created | The wallet deploys a contract | High | No | Yes |
| Follow the hops | Also watch the new accounts it sends funds to | High | No | Off by default |

A transaction produces **a single alert** per watch, with the most severe rule and the list of every rule it triggered.

### Follow the hops

On an attacker's wallet, **Seguir los saltos** (follow the hops) makes Guard also watch the accounts it sends funds to, from US\$1,000
accumulated per destination. That way the attacker does not get away by switching addresses. The derived watch inherits
the rules, follows its own hops up to a depth of 2 (10 derived watches per tree, adjustable) and counts against your
plan's cap.

> [!NOTE]
>
> It only follows into a regular account without a label. It does not follow into exchanges, bridges, routers, mixers,
> contracts or EIP-7702 delegated accounts, and every cut is shown with its reason. An account that received the
> attacker's funds is not necessarily the attacker's: the derived watch can be deleted.

## Work the alerts

Each alert says what happened and where the funds went, with the transaction and the block. You **reconocer** (acknowledge),
**asignar** (assign), **resolver** (resolve) with a reason or **descartar** (dismiss) it, and every change stays in its history. **Abrir un caso en
Investigación** (open a case in Investigation) turns the alert into a case with the transaction's graph, at no credit cost. If a reorganization drops
the transaction from the chain, the alert is retracted (not deleted) and comes back if the transaction reappears.

![Guard alert detail](https://mintcdn.com/blockgence/jIDqBW86tOU_Ini-/images/products/guard/alert.png?fit=max\&auto=format\&n=jIDqBW86tOU_Ini-\&q=85\&s=df1aa0f8a9e7b0c2409b6536aafc4c53)

An alert, with synthetic data.

## Notifications outside the app

> [tab] Signed webhook
>
> One JSON POST per alert (new, retracted or back), signed with HMAC-SHA256 following **Standard Webhooks**, with one
> secret per destination that can be rotated. The scope can be one watch, your watches or your organization's shared
> ones. Deliveries are retried for about 15 hours. From **Avisos** you can send a test and see the deliveries.

> [tab] Email digest
>
> One per person, never one per alert. By default it only includes high and critical alerts.

> [!WARNING]
>
> The webhook reports alerts, not every movement, and it does not report changes made by a person (acknowledge, resolve).

## Watchtower: a protocol's contracts

A protocol registers its contracts in **Protocolos** and Guard watches them with their own rules: a large net withdrawal
per transaction in USD (default US\$1,000,000), a change of owner, admin or admin role, a proxy upgrade, a pause, and
two-step owner or admin transfers (it alerts on the proposal, before it is accepted). It also reads the events the
protocol declares, and if its timelock or governor is registered, it says what a scheduled call would change before it
runs.

> [!NOTE]
>
> Watchtower is enabled per server. If it is not on, the **Protocolos** tab says so.

## Through the API

The same features are under `/v1/guard/*`, with an API key **assigned to a person** (a key without an owner gets 403).
Guard does not charge credits: the cap is the number of watches in your plan.

```bash Watch a wallet theme={null}
curl -X POST https://app.blockgence.com/v1/guard/watches \
  -H "X-API-Key: $BKG_KEY" -H "Content-Type: application/json" \
  -d '{"chain": "ethereum", "address": "0x2222222222222222222222222222222222222222", "name": "Treasury", "purpose": "own"}'
```

```bash Active alerts theme={null}
curl https://app.blockgence.com/v1/guard/alerts -H "X-API-Key: $BKG_KEY"
```

Each route is detailed in the [API reference](https://docs.blockgence.com/en/api/reference.md).

## What it does not cover

* **It watches from the moment the wallet is added**, not backward.
* Ethereum is read block by block. On Base, Optimism, Arbitrum, BSC and Polygon, when they are enabled, Guard reads the
  logs of the watched wallets: coverage is narrower, and whatever cannot be placed is declared per event.
* The **false alert rate** on real wallets is not measured.
* Watchtower only sees what the contract emits. The owner of a ProxyAdmin, the owner of a Safe or a beacon upgrade are
  left out unless those contracts are registered too, and the response declares it.
* Guard does not block transactions or revoke permissions: it alerts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.