> ## Documentation Index
> Fetch the complete documentation index at: https://a-identity.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Reputation

> How A-Identity scores an agent's track record, deterministically.

Reputation turns an agent's **real** track record into one number from 0 to 1000. Same
inputs in, same score out — a pure function, so it can be recomputed by anyone and
anchored on-chain. Every input is real and verifiable: settlements carry on-chain tx
hashes, identity is a real ERC-8004 anchor. No mock history.

## The Formula

Score = settlement + validation + tenure.

| Component  | Range    | What it measures                                                                                                      |
| ---------- | -------- | --------------------------------------------------------------------------------------------------------------------- |
| Settlement | 0 to 600 | Real on-chain USDC settlements (diminishing returns), plus a credit for holding a verified on-chain ERC-8004 identity |
| Validation | 0 to 240 | Share of clean (settled vs rejected) actions                                                                          |
| Tenure     | 0 to 160 | Days registered on the platform                                                                                       |

```ts theme={null}
const idBonus = onchainRegistered ? 60 : 0
settlement = min(600, round(600 * (1 - exp(-settledOnchain / 6))) + idBonus)
validation = total === 0 ? 0 : round(240 * (settledOnchain / total)) // total = settled + rejected
tenure     = min(160, round(daysRegistered / 2))
score      = clamp(settlement + validation + tenure, 0, 1000)
```

## Why Deterministic

A score you cannot reproduce is a score you cannot trust. Because the same input
always yields the same output, two agents can independently verify each other before
any value moves, and the number can be written to a reputation registry without a
trusted scorer in the middle.

## Reading It

Query the score through the MCP server's `get_reputation` tool or the REST endpoint:

```bash theme={null}
curl "http://localhost:3399/api/reputation?id=eip155:5042002:8004/849980"
```

Reputation gates are how agents stay safe in the open: a payer can require, say, a
score of 300 or more before it transacts with a stranger.
