> 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/guides/issuer/20.-remove-a-trusted-claim-issuer.md).

# 20. Remove a trusted Claim Issuer

Removing a trusted Claim Issuer stops the asset from counting that issuer's attestations. The Issuer does it when it ends its relationship with a provider, or when a provider is compromised. The claims the issuer signed stay on the identities and stay valid. They no longer satisfy any required topic of this asset, from the next eligibility check.

## At a glance

|                   |                                                                                                                                                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Triggered by**  | Issuer                                                                                                                                                                                                                      |
| **Actors**        | Issuer, Claim Issuer, Investor, Platform                                                                                                                                                                                    |
| **Contracts**     | `TREXRegistry`                                                                                                                                                                                                              |
| **Preconditions** | The Claim Issuer is trusted for the asset (see [04](/guides/issuer/04.-add-a-trusted-claim-issuer.md)); the caller holds `OWNER` in the asset's domain (see [25](/guides/issuer/25.-commission-a-suite-and-grant-roles.md)) |
| **Result**        | `TREXRegistry` no longer lists the Claim Issuer, and its claims no longer count toward eligibility for the asset                                                                                                            |

## Actors and roles

| Actor        | Role in this flow                                                                                           | What they hold                                       |
| ------------ | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| Issuer       | Decides to stop relying on the Claim Issuer and submits the removal.                                        | `OWNER` on the `TREXRegistry`                        |
| Claim Issuer | Stops being trusted for the asset. Does not transact.                                                       | Its ONCHAINID, unchanged                             |
| Investor     | Is affected: an identity that relied on this issuer alone becomes ineligible to receive. Does not transact. | An ONCHAINID carrying claims, unchanged              |
| Platform     | Assesses the impact and submits with the Issuer's key.                                                      | The Issuer's signing key, or a key authorized for it |

## Sequence

```mermaid
sequenceDiagram
    participant Platform
    participant Issuer
    participant Registry as TREXRegistry

    Platform->>Registry: getTrustedIssuerClaimTopics(claimIssuer) (read)
    Platform->>Registry: getTrustedIssuersForClaimTopic(topic) (read)
    Platform->>Issuer: impact assessed, submit
    Issuer->>Registry: removeTrustedIssuer(claimIssuer)
    Registry->>Registry: caller holds OWNER, issuer is trusted
    Registry-->>Platform: TrustedIssuerRemoved(claimIssuer)
```

## Step by step

### Step 1. Assess the impact

**Who:** Platform, on behalf of the Issuer

**Call:** Off-chain, using read calls

**Before the call:** The Issuer knows which Claim Issuer it removes and why.

**What happens:** The Platform reads `TREXRegistry.getTrustedIssuerClaimTopics(claimIssuer)` to list the topics the issuer covers. For each of those topics that is required, it reads `TREXRegistry.getTrustedIssuersForClaimTopic(topic)`. If the issuer is the only one trusted for a required topic, every identity held to that topic becomes ineligible to receive as soon as the issuer is removed. For an orderly change, the Issuer first trusts another Claim Issuer for the topic and lets investors obtain claims from it. For a compromised issuer, the Issuer removes it at once.

**What changes:** Nothing on-chain.

### Step 2. Remove the trusted issuer

**Who:** Issuer (`OWNER`)

**Call:** `TREXRegistry.removeTrustedIssuer(trustedIssuer)`

**Before the call:** Step 1 is done.

**What the contract checks:**

1. The caller holds `OWNER` in the asset's domain. Otherwise the call reverts with `AccessManagedUnauthorized`.
2. `trustedIssuer` is not the zero address. Otherwise `ZeroAddress`.
3. The issuer is trusted. Otherwise `NotATrustedIssuer`.

**What changes:** The registry removes the issuer and its entry under each topic it was trusted for. It emits `TrustedIssuerRemoved(trustedIssuer)`. From the next eligibility check, no claim from this issuer satisfies a topic of the asset.

## State after the flow

* `TREXRegistry.isTrustedIssuer(claimIssuer)` is false.
* `TREXRegistry.getTrustedIssuersForClaimTopic(topic)` no longer includes the issuer, for any topic.
* `TREXRegistry.isVerified(address)` is false for every address whose identity relied on this issuer alone for a required topic.
* No claim has been removed from any identity, and no balance has changed. Holders that became ineligible keep their positions and can no longer receive.
* The Claim Issuer's standing in the network is unchanged. Other assets that trust it still do.

## Failure modes

| Symptom                                                             | Cause                                                                    | Fix                                                                                                                      |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| Reverts with `AccessManagedUnauthorized`                            | The caller does not hold `OWNER` in the asset's domain (step 2, check 1) | Grant the role: [25](/guides/issuer/25.-commission-a-suite-and-grant-roles.md)                                           |
| Reverts with `ZeroAddress`                                          | The address is zero (step 2, check 2)                                    | Pass the Claim Issuer's address                                                                                          |
| Reverts with `NotATrustedIssuer`                                    | The issuer is not in the registry (step 2, check 3)                      | Read `isTrustedIssuer` first. Nothing to remove                                                                          |
| After the removal, transfers to many investors revert               | Those investors relied on the removed issuer alone for a required topic  | Trust another Claim Issuer for the topic ([04](/guides/issuer/04.-add-a-trusted-claim-issuer.md)) and have claims issued |
| The issuer was removed and its claims still count for another asset | Trust is per asset. Each asset has its own registry                      | Remove it from the registry of each asset concerned                                                                      |

## Common misunderstandings

> **Wrong:** "Removing the issuer revokes the claims it issued."
>
> **Right:** The claims stay on the identities and still read as valid. Revoking a claim is the Claim Issuer's own act. Removing a trusted issuer changes what this asset counts, and nothing else.

> **Wrong:** "Investors who lose eligibility lose their tokens."
>
> **Right:** Eligibility is checked on the recipient of a movement. A holder that is no longer eligible keeps its position and cannot receive more. What happens to the position is the Issuer's decision, through the agent operations.

> **Wrong:** "To narrow what an issuer is trusted for, remove it and add it again."
>
> **Right:** `updateIssuerClaimTopics` replaces the list of topics in one call, with no interval in which the issuer is not trusted. See [04](/guides/issuer/04.-add-a-trusted-claim-issuer.md).

> **Wrong:** "Lowering the issuer's reputation in the network has the same effect."
>
> **Right:** Reputation decides whether an issuer can write claims onto identities without a key grant. It does not change what any asset counts. Only the asset's own registry does.

## Integration notes

* Before removing, count the holders that depend on the issuer alone for a required topic. The registry does not do it.
* For an orderly change, the order is: add the replacement issuer, let claims be issued, then remove the old issuer.
* For a compromised issuer, remove first. An interval in which some holders cannot receive is preferable to counting forged claims.
* Index `TrustedIssuerRemoved` and re-evaluate `isVerified` for the addresses your application shows as eligible.
* An Issuer with several assets repeats the removal on each registry. Registries do not share their trusted issuers, even when they share an identity storage.

## Related flows

* [04 Add a trusted Claim Issuer](/guides/issuer/04.-add-a-trusted-claim-issuer.md) : the inverse operation, and narrowing an issuer's topics
* [03 Configure required claim topics](/guides/issuer/03.-configure-required-claim-topics.md) : the other half of eligibility
* [19 Revoke a claim](/guides/claim-issuer/19.-revoke-a-claim.md) : what the Claim Issuer does on its side
* [05 Issue a claim to an investor](/guides/claim-issuer/05.-issue-a-claim-to-an-investor.md) : how investors regain eligibility through another issuer
* [13 Freeze and unfreeze an address or a partial balance](/guides/agents/13.-freeze-and-unfreeze-an-address-or-a-partial-balance.md) : what the Issuer can do about a holder that became ineligible


---

# 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/guides/issuer/20.-remove-a-trusted-claim-issuer.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.
