# PIP-0021 · Risk signals and assessments

Members file signals about a payee key, tied to a payment they handled. Before paying, a member asks the network for a signed assessment of the payee, with a level and reason codes. The filer is never disclosed.

## Why

Each rail and each member has its own fraud controls. None of them sees what other members saw about the same payee. A PATH network holds a directory of keys shared by its members. This PIP adds a shared view of risk on those keys: members report what they observed, and the network answers one question before a payment: how risky is this payee for the network?

It complements payee verification ([PIP-0013](/pips/0013)) and the ownership proofs of PATH ID. Those prove who the payee is. An assessment tells what the network knows about them.

## Terms

| Term | Meaning |
|---|---|
| **Target** | A key of the directory: an identifier type and its hash, computed as the directory computes it |
| **Signal** | A report by one member about one target, tied to a payment that member handled |
| **Assessment** | The network's signed answer about a target: a level, a score and reason codes |

## Signals

```json
{
  "target": { "type": "phone", "value": "+221771234567" },
  "kind": "scam_beneficiary",
  "evidence": { "receipt": "rcp_7q2m9k4x8v3p1z5t6w0y" }
}
```

| Kind | The member reports |
|---|---|
| `scam_beneficiary` | The target received funds obtained by deceiving the payer |
| `mule` | The target receives and passes on funds for others |
| `account_takeover` | The account behind the target is controlled by someone other than its holder |
| `fraud_reported` | A customer reported a fraudulent payment to the target |
| `first_party_fraud` | The holder of the target disputes payments they made or received in good order |

- A signal names the receipt or the instruction of the payment it concerns. A signal without one is refused.
- The value of the target is hashed on arrival and is not kept. The member may send the hash instead.
- One member has at most one open signal per target and kind.
- A signal expires. Its validity depends on its kind.
- A member has a monthly filing allowance.

### States

| State | Meaning |
|---|---|
| `active` | Filed and counted |
| `contested` | The member holding the target in the directory contests it. It counts for less until decided |
| `upheld` | The network confirmed it |
| `dismissed` | The network rejected it |
| `withdrawn` | The filer withdrew it |
| `expired` | Its validity ended |

The filer may withdraw its signal. The member holding the target may contest it. The network decides a signal: `upheld` or `dismissed`. A member's decided signals form its record, and its record weighs on how much its signals count.

## Assessment

A member asks before paying:

```json
{ "target": { "type": "address", "value": "path:4a91c2f7e8d3" }, "nonce": "b0b5c4e2a9d14f6e" }
```

The network answers with a signed object:

```json
{
  "kind": "risk_assessment",
  "network": "openconnect",
  "target": { "type": "address", "hash": "3f9a…c1" },
  "requester": "member-a",
  "nonce": "b0b5c4e2a9d14f6e",
  "level": "elevated",
  "score": 44,
  "reasons": ["network_reports"],
  "assessed_at": "2026-11-18T12:00:00Z",
  "expires_at": "2026-11-18T12:05:00Z"
}
```

| Level | Expected treatment |
|---|---|
| `low` | The payment proceeds |
| `elevated` | The payment is reviewed by a person, or confirmed by the payer after a warning |
| `high` | The payment is not executed |

| Reason | Meaning |
|---|---|
| `network_reports` | Open signals exist on the target |
| `upheld_reports` | At least one signal was confirmed by the network |
| `several_reporters` | Signals come from more than one member |
| `contested_reports` | Every signal counted is contested |
| `new_target` | The network saw the target recently for the first time |
| `fan_in` | The target is being paid by many members at once |

- An assessment never names a filer and never states a number of signals.
- A target with no signal and a target the network never saw answer in the same shape.
- A member's own signals do not count in the assessments it receives.
- The score is between 0 and 100. The model that produces it is the operator's and is not published. Its parameters may change without a new PIP; the shape of the answer may not.
- Assessments draw on the same reciprocity budget as directory searches, and the network keeps a journal of them, hashes only.
- An assessment is valid until `expires_at`. A member keeps it with the payment it covered.

## On the rail `path-flash-1.0`

An operator of `path-flash-1.0` ([PIP-0020](/pips/0020)) assesses the payee before executing a payment on the rail and applies the treatment of the level. A member may also assess a payee before a payment on any native rail.

## Interface

| Call | Who | Effect |
|---|---|---|
| `POST /risk/assess` | A member | A signed assessment of a target |
| `POST /risk/signals` | A member | Files a signal |
| `GET /risk/signals` | A member | The signals it filed |
| `POST /risk/signals/{reference}/withdraw` | The filer | Withdraws the signal |
| `POST /risk/signals/{reference}/contest` | The member holding the target | Contests the signal |
| `POST /risk/signals/{reference}/decide` | The network | Upholds or dismisses the signal |

A signal another member filed reads as `404` to everyone but its filer, the member holding the target and the network.

## Compatibility

Additive. No signed object of an earlier PIP changes.