# Identities and UBIDs

Every identity has one permanent name. It's a hash, and nobody issues it.

## The Universal Binding Identifier

A UBID is **derived, not issued**. It is the hash of the controller's coordinates - which chain, which adapter, which standard, which address, which token id - so anyone can compute it offline for anything, before a single transaction is sent. A 10,000-token collection already has 10,000 UBIDs.

```solidity
ubid = keccak256(abi.encode(
    interoperableAddress(chainId, adapter),  // ERC-7930: the adapter, on this chain
    uint8(standard),                         // the control rule - see Controllers and standards
    boundAddress,                            // the token contract, the contract, or the account
    tokenId                                  // 0 for account and contract standards
))
```

The live contract computes it with `hashBinding(standard, boundAddress, tokenId)`. Because the standard is in the preimage, the same token claimed under two standards is two identities. That is why the create flow shows the rule before anyone signs.

## Untouched, claimed, registered

Reviews and attestations attach to a UBID whether or not anything has been registered under it. A counterfactual claim is a cheap transaction that does basic validation and emits an event - no storage, no external calls. A full registration mints an ERC-8004 agent. All three states share the same UBID.

|  | Untouched | Claimed (counterfactual) | Registered |
| --- | --- | --- | --- |
| Costs | nothing | one cheap transaction | one transaction |
| Has a UBID | **yes** - derivable by anyone | **yes** - the same one | **yes** - the same one |
| Can receive reviews | **yes** | **yes** | **yes** |
| Can set its own URI and wallet | no | yes | yes |
| Stored in | nowhere | the event log | the adapter's storage |
| ERC-8004 agent | none | none | minted |

Register the same token again and the record follows the newest agent. The earlier agent ids are superseded: they stay in the history and still find the record in search, but the profile shows one live agent, not two.

UntouchedClaimedRegistered

the same UBID throughout`0x989abafdb21e6029…9eb199fcb9`

## What a record holds

-   **Agent URI** - where the agent's card lives, an ERC-8004 registration file.
-   **Metadata** - key-value pairs, bytes-valued. `name` is what the explorer shows when it decodes as text.
-   **Operating wallet** - the address the agent signs from, once the wallet has confirmed it. See [Operating wallets](https://docs.adapterscan.com/wallets.md).
-   **Reputation** - stars, ratings, reviews and transaction records from anyone. See [Reputation](https://docs.adapterscan.com/reputation.md).

> **Latest wins.** A counterfactual record is whatever the most recent events say. A new claim restates the whole record; a URI or metadata update changes one field. There is no delete - an empty value is how you clear a key.
