> For the complete documentation index, see [llms.txt](https://docs.t-rex.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.t-rex.network/reference/identity-suite/reputationregistry.md).

# ReputationRegistry

`ReputationRegistry` stores a score per identity, a default score per identity type, and one threshold. The `ERC734Validator` reads it to decide whether a Claim Issuer can add its own claims to an identity that did not give it a claim key. The concept is in [Claim issuers, trust and reputation](/identity-onchainid/claim-issuers-trust-and-reputation.md).

### At a glance

|                 |                                                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Source**      | `contracts/reputation/ReputationRegistry.sol`                                                                     |
| **Interface**   | `IReputationRegistry`                                                                                             |
| **Deployed as** | One contract per network, not upgradeable. Built with the access manager of the network and the `IdentityFactory` |
| **Scores**      | `uint128` values. The registry gives them no unit and no maximum                                                  |

### Reads

| View                       | Returns                                                                                                                                         |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `reputationOf(identity)`   | The score of the identity when one was set, zero included. Otherwise the default of its type, for an identity the factory deployed. Otherwise 0 |
| `entryOf(identity)`        | The stored `score` and the time it was set, `setAt`. Both are 0 when no score was set                                                           |
| `defaultFor(identityType)` | The default score of a type                                                                                                                     |
| `claimAddThreshold()`      | The score a Claim Issuer needs to add or remove its own claims on an identity without a claim key                                               |

### Writes

| Function                               | Access             | Reverts with                         |
| -------------------------------------- | ------------------ | ------------------------------------ |
| `setReputation(identity, newScore)`    | Network governance | `ZeroAddress`. Emits `ReputationSet` |
| `setDefault(identityType, newDefault)` | Network governance | Emits `DefaultSet`                   |
| `setClaimAddThreshold(newThreshold)`   | Network governance | Emits `ClaimAddThresholdSet`         |

A score that was set stays set: the default of the type no longer applies to that identity, even when the score is zero.

### What the score decides

| It gates                                                                                 | It does not gate                                                         |
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `addClaimTo` and `addClaim` by a Claim Issuer on an identity where it holds no claim key | The signature of a claim, and the validity of claims already issued      |
| `removeClaim` by a Claim Issuer on an identity where it holds no `CLAIM_SIGNER` key      | Delivery of a claim by the Identity Owner, or under a key grant          |
|                                                                                          | Revocation by digest                                                     |
|                                                                                          | Eligibility for any asset: each Issuer lists the Claim Issuers it trusts |

### Events

| Event                                                                                                      | Emitted when                 |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------- |
| `ReputationSet(address indexed identity, uint128 oldScore, uint128 newScore, address indexed setter)`      | A score is set               |
| `DefaultSet(uint256 indexed identityType, uint128 oldDefault, uint128 newDefault, address indexed setter)` | The default of a type is set |
| `ClaimAddThresholdSet(uint128 oldThreshold, uint128 newThreshold, address indexed setter)`                 | The threshold is set         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.t-rex.network/reference/identity-suite/reputationregistry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
