03. Configure required claim topics
The required claim topics are what an investor has to prove to hold the asset: identity verified, accredited, resident of a permitted jurisdiction. The Issuer sets them in the asset's eligibility registry, as a default set and, where needed, as a separate set for one type of identity. It does so before the first mint, and again whenever the requirements of the asset change. A change applies to every holder at the next eligibility check.
At a glance
Triggered by
Issuer
Actors
Issuer, Claim Issuer, Investor, Platform
Contracts
TREXRegistry
Preconditions
Result
TREXRegistry holds the set of claim topics an identity must satisfy, by default and per identity type
Actors and roles
Issuer
Decides the requirements and submits the changes.
OWNER on the TREXRegistry
Claim Issuer
Issues claims under the topics the Issuer requires. Does not transact in this flow.
Trusted for those topics (see 04)
Investor
Is affected: its eligibility is evaluated against the new set. Does not transact.
An ONCHAINID carrying claims
Platform
Runs the reads and submits with the Issuer's key.
The Issuer's signing key, or a key authorized for it
Sequence
Step by step
Step 1. Assess the change
Who: Platform, on behalf of the Issuer
Call: Off-chain, using read calls
Before the call: The Issuer knows which topic it adds or removes. A topic is a number agreed between the Issuer and its Claim Issuers, for example <KYC topic>.
What happens: The Platform reads TREXRegistry.getClaimTopics() and, for each identity type the Issuer distinguishes, TREXRegistry.getClaimTopicsForIdentityType(identityType). Before adding a topic, it reads TREXRegistry.getTrustedIssuersForClaimTopic(topic). If that list is empty, no claim can satisfy the topic and every identity held to it becomes ineligible as soon as the topic is required. The Issuer trusts a Claim Issuer for the topic first (see 04). For an asset that already has holders, the Platform also estimates how many of them hold a valid claim for the topic.
What changes: Nothing on-chain.
Step 2. Add a topic to the default set
Who: Issuer (OWNER)
Call: TREXRegistry.addClaimTopic(claimTopic)
Before the call: Step 1 is done.
What the contract checks:
The caller holds
OWNERin the asset's domain. Otherwise the call reverts withAccessManagedUnauthorized.The default set holds fewer than 15 topics. Otherwise
MaxClaimTopicsReached.The topic is not already in the set. Otherwise
ClaimTopicAlreadyExists.
What changes: The topic is added to the default set. The registry emits ClaimTopicAdded(claimTopic). From the next eligibility check, every identity held to the default set needs a valid claim for this topic from a Claim Issuer trusted for it.
Step 3. Define a set for one identity type
Optional. Use it when one type of identity has different requirements, for example legal entities.
Who: Issuer (OWNER)
Call: TREXRegistry.addClaimTopicForIdentityType(identityType, claimTopic), once per topic of the set
Before the call: The Issuer has listed every topic that identities of that type must satisfy. The set of a type replaces the default set for that type. It does not add to it.
What the contract checks:
The caller holds
OWNER. OtherwiseAccessManagedUnauthorized.identityTypeis not zero. OtherwiseInvalidIdentityType.The set of that type holds fewer than 15 topics. Otherwise
MaxClaimTopicsReached.The topic is not already in that set. Otherwise
ClaimTopicAlreadyExists.
What changes: The topic is added to the set of that type. The registry emits ClaimTopicAddedForIdentityType(identityType, claimTopic). As soon as the set of a type holds one topic, identities of that type are held to that set and no longer to the default set.
Step 4. Remove a topic
Who: Issuer (OWNER)
Call: TREXRegistry.removeClaimTopic(claimTopic), or TREXRegistry.removeClaimTopicForIdentityType(identityType, claimTopic)
Before the call: The Issuer has decided that the topic is no longer required.
What the contract checks:
The caller holds
OWNER. OtherwiseAccessManagedUnauthorized.For the per-type function:
identityTypeis not zero. OtherwiseInvalidIdentityType.
What changes: The topic leaves the set and the registry emits ClaimTopicRemoved(claimTopic) or ClaimTopicRemovedForIdentityType(identityType, claimTopic). Removing a topic that is not in the set does nothing and emits nothing. When the set of a type becomes empty, identities of that type are held to the default set again.
State after the flow
TREXRegistry.getClaimTopics()returns the default set.TREXRegistry.getClaimTopicsForIdentityType(identityType)returns the set of a type, empty when the type follows the default.TREXRegistry.isVerified(address)reflects the new requirements for every address, without any other transaction.No balance has changed. A holder that no longer satisfies the requirements keeps its position and cannot receive more.
Failure modes
Reverts with AccessManagedUnauthorized
The caller does not hold OWNER in the asset's domain (check 1 of steps 2 to 4)
Grant the role: 25
Reverts with MaxClaimTopicsReached
The set already holds 15 topics (step 2, check 2; step 3, check 3)
Remove a topic that is no longer needed
Reverts with ClaimTopicAlreadyExists
The topic is already in the set (step 2, check 3; step 3, check 4)
Nothing to do
Reverts with InvalidIdentityType
identityType is zero (step 3, check 2; step 4, check 2)
Use the value of a real type
After adding a topic, every investor is ineligible
No Claim Issuer is trusted for the topic, or investors hold no claim for it yet
A topic added to the default set is not required from companies
CORPORATE has its own set, which replaces the default
Add the topic to the set of that type as well
removeClaimTopic succeeds and nothing changes
The topic was not in the set
Read the set first
Common misunderstandings
Wrong: "Adding a claim topic adds the KYC to the investors."
Right: A topic is a requirement, not a credential. Requiring a topic makes every identity that lacks a valid claim for it ineligible. The credentials come from Claim Issuers, who sign claims on each identity.
Wrong: "The set for a type adds to the default set."
Right: It replaces it. An identity is held either to the set of its type or to the default set, never to both. A topic that every holder must satisfy is added to the default set and to each set defined for a type.
Wrong: "A change of topics applies to new investors only."
Right: Eligibility is evaluated at each transfer, against the current configuration. A new requirement applies at once to every holder. Those who do not meet it keep their position and can no longer receive.
Wrong: "Removing a topic revokes the claims issued under it."
Right: The claims stay on the identities and stay valid. The asset stops asking for them.
Integration notes
Read
getTrustedIssuersForClaimTopic(topic)before requiring a topic. An empty list makes the topic unsatisfiable.For a live asset, add the trusted issuer first, let claims be issued, then require the topic. The order avoids an interval in which holders cannot receive.
The type of an identity is read from
IdentityFactory.identityTypeOf(identity). An identity the factory did not create has no type and is held to the default set.There is no batch function for topics. Group several calls in one transaction through the caller's own account if it is a smart account.
Index
ClaimTopicAdded,ClaimTopicRemovedand the two per-type events to keep an off-chain view of the requirements.Topic identifiers are a convention between the Issuer and its Claim Issuers. Document them next to the asset.
Related flows
04 Add a trusted Claim Issuer : whose claims satisfy a topic
01 Deploy a token suite : sets the first topics
05 Issue a claim to an investor : how an identity comes to satisfy a topic
20 Remove a trusted Claim Issuer : the other way requirements tighten
08 Mint a position to an investor : where eligibility is first checked
Last updated