{"eip":1616,"title":"Attribute Registry Standard","description":"EIP-1616 provides a basic interface for querying a registry for attribute metadata assigned to Ethereum accounts.","authors":["0age (@0age)","Santiago Palladino (@spalladino)","Leo Arias (@elopio)","Alejo Salles (@fiiiu)","Stephane Gosselin (@thegostep)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2018-11-23","requires":[165],"discussionsTo":"https://github.com/ethereum/EIPs/issues/1616","repo":"ERCs","label":"ERC-1616","officialUrl":"https://eips.ethereum.org/EIPS/eip-1616","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1616.md","url":"https://eips.huatuo.xyz/eip-1616/","tldr":{"en":"A four-function read interface for registries that assign one canonical uint256 attribute value per type per address, so contracts can check things like KYC status from a single trusted source.","ja":"アドレスごと・タイプごとに 1 つの正規の uint256 属性値を割り当てるレジストリ向けの、4 関数の読み取りインターフェース。コントラクトは KYC ステータスなどを、信頼できる単一の情報源から確認できる。","ko":"주소마다 유형별로 하나의 정규 uint256 속성 값을 부여하는 레지스트리를 위한, 함수 네 개짜리 읽기 인터페이스. 컨트랙트는 KYC 상태 같은 정보를 하나의 신뢰할 수 있는 출처에서 확인할 수 있다.","zh":"一个只有四个函数的只读接口，适用于为每个地址、每种类型分配一个规范的 uint256 属性值的注册表，使合约可以从单一可信来源检查诸如 KYC 状态之类的信息。"},"tags":["identity","registry","attributes","compliance","stagnant"],"explainers":{"en":{"lang":"en","tldr":"A four-function read interface for registries that assign one canonical uint256 attribute value per type per address, so contracts can check things like KYC status from a single trusted source.","tags":["identity","registry","attributes","compliance","stagnant"],"related":[165,2009],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1616/","markdown":"## What problem does it solve?\n\nContracts sometimes need to know something about an address: has it passed KYC, is it an accredited investor, is it on an allow-list? Earlier claim standards (ERC-735 and ERC-780) let many issuers attach claims to the same address for the same topic. A verifier then has to decide which issuers to trust and how to resolve conflicting claims.\n\nERC-1616 moves that trust decision up one level. A curated **Attribute Registry** aggregates whatever sources it trusts and exposes a single answer. Verifiers only need to trust the registry, and do not care how the information was obtained.\n\n## How it works\n\nAttributes are a flat `uint256 → uint256` key-value store per account, with a key rule: **each attribute type has exactly one value per address** (not one per issuer). The interface is:\n\n| Function | Behaviour |\n| --- | --- |\n| `hasAttribute(account, typeId)` | `true` if assigned and currently valid. Must never revert; errors from external calls are caught and return `false` |\n| `getAttributeValue(account, typeId)` | The value. Must revert if `hasAttribute` would return `false` |\n| `countAttributeTypes()` | Number of attribute types the registry defines. Must not revert |\n| `getAttributeTypeID(index)` | Type ID at an index; reverts only when out of range |\n\nBoth lookup functions must be deterministic: two consecutive calls with the same arguments return the same result regardless of caller or `tx.origin`. The registry must also support [ERC-165](/eip-165/) and report interface ID `0x5f46473f`.\n\nHow attributes are issued, revoked or expire is deliberately out of scope. Advanced registries can encode boolean expressions into a type ID, point values at off-chain metadata, or delegate to other registries without changing the interface.\n\n## Sample code\n\nA token that only allows transfers to accounts holding an attribute:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IAttributeRegistry {\n    function hasAttribute(address account, uint256 attributeTypeID) external view returns (bool);\n    function getAttributeValue(address account, uint256 attributeTypeID) external view returns (uint256);\n    function countAttributeTypes() external view returns (uint256);\n    function getAttributeTypeID(uint256 index) external view returns (uint256);\n}\n\ncontract GatedVault {\n    IAttributeRegistry public immutable registry;\n    uint256 public immutable requiredType; // e.g. an \"approved investor\" attribute ID\n\n    constructor(IAttributeRegistry r, uint256 typeId) {\n        registry = r;\n        requiredType = typeId;\n    }\n\n    modifier onlyAttested(address who) {\n        require(registry.hasAttribute(who, requiredType), \"missing attribute\");\n        _;\n    }\n\n    function deposit() external payable onlyAttested(msg.sender) {\n        // ...\n    }\n}\n```\n\n## Things to know\n\n- Status is **Stagnant**. The spec points to the TPL (Transaction Permission Layer) contracts as a more complex implementation of the interface.\n- Centralising trust in a registry curator is the design: whoever controls the registry controls who passes the check.\n- Because `hasAttribute` must not revert, a registry that calls other contracts must wrap those calls and return `false` on failure.\n- The standard adds no metadata about attributes beyond the value; naming schemes were left to a possible future EIP. A related compliance-check design is [ERC-2009](/eip-2009/).\n"},"ja":{"lang":"ja","tldr":"アドレスごと・タイプごとに 1 つの正規の uint256 属性値を割り当てるレジストリ向けの、4 関数の読み取りインターフェース。コントラクトは KYC ステータスなどを、信頼できる単一の情報源から確認できる。","tags":["identity","registry","attributes","compliance","stagnant"],"related":[165,2009],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1616/","markdown":"## 何を解決するのか\n\nコントラクトは、あるアドレスについて何かを知る必要がある場合があります。KYC を通過したか、適格投資家か、許可リストに載っているか、といったことです。以前のクレーム標準（ERC-735 と ERC-780）では、多数の発行者が同じアドレスに同じトピックのクレームを付けることができました。そのため検証者は、どの発行者を信頼するか、矛盾するクレームをどう解決するかを決める必要があります。\n\nERC-1616 は、その信頼の判断を 1 段階上に移します。厳選された**属性レジストリ（Attribute Registry）**が、信頼するあらゆる情報源を集約し、単一の答えを公開します。検証者はレジストリだけを信頼すればよく、情報がどのように得られたかを気にする必要はありません。\n\n## 仕組み\n\n属性は、アカウントごとのフラットな `uint256 → uint256` のキー/値ストアで、重要なルールが 1 つあります。**各属性タイプは、アドレスごとにちょうど 1 つの値を持つ**（発行者ごとではない）ということです。インターフェースは次のとおりです。\n\n| 関数 | 挙動 |\n| --- | --- |\n| `hasAttribute(account, typeId)` | 割り当て済みで現在有効なら `true`。revert してはならない。外部呼び出しのエラーは捕捉して `false` を返す |\n| `getAttributeValue(account, typeId)` | 値。`hasAttribute` が `false` を返す場合は revert しなければならない |\n| `countAttributeTypes()` | レジストリが定義する属性タイプの数。revert してはならない |\n| `getAttributeTypeID(index)` | インデックスにあるタイプ ID。範囲外の場合にのみ revert する |\n\n2 つの検索関数はどちらも決定論的でなければなりません。同じ引数での連続した 2 回の呼び出しは、呼び出し元や `tx.origin` に関係なく同じ結果を返します。レジストリは [ERC-165](/eip-165/) もサポートし、インターフェース ID `0x5f46473f` を報告しなければなりません。\n\n属性がどのように発行、取り消し、失効されるかは、意図的に範囲外とされています。高度なレジストリは、ブール式をタイプ ID にエンコードしたり、値をオフチェーンのメタデータに向けたり、インターフェースを変えずに他のレジストリに委譲したりできます。\n\n## サンプルコード\n\nある属性を持つアカウントにしか移転を許可しないトークン:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IAttributeRegistry {\n    function hasAttribute(address account, uint256 attributeTypeID) external view returns (bool);\n    function getAttributeValue(address account, uint256 attributeTypeID) external view returns (uint256);\n    function countAttributeTypes() external view returns (uint256);\n    function getAttributeTypeID(uint256 index) external view returns (uint256);\n}\n\ncontract GatedVault {\n    IAttributeRegistry public immutable registry;\n    uint256 public immutable requiredType; // e.g. an \"approved investor\" attribute ID\n\n    constructor(IAttributeRegistry r, uint256 typeId) {\n        registry = r;\n        requiredType = typeId;\n    }\n\n    modifier onlyAttested(address who) {\n        require(registry.hasAttribute(who, requiredType), \"missing attribute\");\n        _;\n    }\n\n    function deposit() external payable onlyAttested(msg.sender) {\n        // ...\n    }\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。仕様は、このインターフェースのより複雑な実装として TPL（Transaction Permission Layer）コントラクトを挙げています。\n- 信頼をレジストリの管理者に集中させることが、この設計の本質です。レジストリを管理する者が、誰がチェックを通過するかを決めます。\n- `hasAttribute` は revert してはならないため、他のコントラクトを呼び出すレジストリは、それらの呼び出しをラップし、失敗時に `false` を返す必要があります。\n- この標準は、値以外の属性に関するメタデータを追加しません。命名方式は、将来の EIP の可能性に委ねられました。関連するコンプライアンスチェックの設計に [ERC-2009](/eip-2009/) があります。\n"},"ko":{"lang":"ko","tldr":"주소마다 유형별로 하나의 정규 uint256 속성 값을 부여하는 레지스트리를 위한, 함수 네 개짜리 읽기 인터페이스. 컨트랙트는 KYC 상태 같은 정보를 하나의 신뢰할 수 있는 출처에서 확인할 수 있다.","tags":["identity","registry","attributes","compliance","stagnant"],"related":[165,2009],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1616/","markdown":"## 어떤 문제를 해결하나요?\n\n컨트랙트는 때때로 어떤 주소에 대해 무언가를 알아야 합니다. KYC를 통과했는지, 적격 투자자인지, 허용 목록에 있는지 같은 것들입니다. 이전의 클레임 표준(ERC-735와 ERC-780)은 여러 발급자가 같은 주소에 같은 주제로 클레임을 붙일 수 있게 했습니다. 그러면 검증자는 어떤 발급자를 신뢰할지, 서로 충돌하는 클레임을 어떻게 해결할지 정해야 합니다.\n\nERC-1616은 그 신뢰 결정을 한 단계 위로 올립니다. 선별된 **속성 레지스트리(Attribute Registry)**가 신뢰하는 모든 출처를 모아 하나의 답을 노출합니다. 검증자는 레지스트리만 신뢰하면 되고, 정보가 어떻게 얻어졌는지는 신경 쓰지 않아도 됩니다.\n\n## 어떻게 동작하나요?\n\n속성은 계정별 평평한 `uint256 → uint256` 키/값 저장소이며, 핵심 규칙이 하나 있습니다. **각 속성 유형은 주소당 값이 정확히 하나**(발급자당 하나가 아님)라는 것입니다. 인터페이스는 다음과 같습니다.\n\n| 함수 | 동작 |\n| --- | --- |\n| `hasAttribute(account, typeId)` | 할당되어 있고 현재 유효하면 `true`. 절대 revert해서는 안 됨. 외부 호출의 오류는 잡아서 `false`를 반환 |\n| `getAttributeValue(account, typeId)` | 값. `hasAttribute`가 `false`를 반환할 경우 반드시 revert해야 함 |\n| `countAttributeTypes()` | 레지스트리가 정의한 속성 유형의 수. revert해서는 안 됨 |\n| `getAttributeTypeID(index)` | 인덱스 위치의 유형 ID. 범위를 벗어날 때만 revert |\n\n두 조회 함수는 모두 결정론적이어야 합니다. 같은 인자로 연속해서 두 번 호출하면 호출자나 `tx.origin`과 관계없이 같은 결과를 반환합니다. 레지스트리는 [ERC-165](/eip-165/)도 지원하고 인터페이스 ID `0x5f46473f`를 보고해야 합니다.\n\n속성이 어떻게 발급되고 폐기되고 만료되는지는 의도적으로 범위 밖입니다. 고급 레지스트리는 불리언 식을 유형 ID에 인코딩하거나, 값이 오프체인 메타데이터를 가리키게 하거나, 인터페이스를 바꾸지 않고 다른 레지스트리에 위임할 수 있습니다.\n\n## 샘플 코드\n\n어떤 속성을 가진 계정으로만 전송을 허용하는 토큰:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IAttributeRegistry {\n    function hasAttribute(address account, uint256 attributeTypeID) external view returns (bool);\n    function getAttributeValue(address account, uint256 attributeTypeID) external view returns (uint256);\n    function countAttributeTypes() external view returns (uint256);\n    function getAttributeTypeID(uint256 index) external view returns (uint256);\n}\n\ncontract GatedVault {\n    IAttributeRegistry public immutable registry;\n    uint256 public immutable requiredType; // e.g. an \"approved investor\" attribute ID\n\n    constructor(IAttributeRegistry r, uint256 typeId) {\n        registry = r;\n        requiredType = typeId;\n    }\n\n    modifier onlyAttested(address who) {\n        require(registry.hasAttribute(who, requiredType), \"missing attribute\");\n        _;\n    }\n\n    function deposit() external payable onlyAttested(msg.sender) {\n        // ...\n    }\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 명세는 이 인터페이스의 더 복잡한 구현으로 TPL(Transaction Permission Layer) 컨트랙트를 가리킵니다.\n- 신뢰를 레지스트리 관리자에게 집중시키는 것이 이 설계의 핵심입니다. 레지스트리를 통제하는 사람이 누가 검사를 통과하는지를 통제합니다.\n- `hasAttribute`는 revert해서는 안 되므로, 다른 컨트랙트를 호출하는 레지스트리는 그 호출을 감싸고 실패 시 `false`를 반환해야 합니다.\n- 이 표준은 값 이외의 속성 메타데이터를 추가하지 않으며, 이름 짓는 방식은 향후 EIP 가능성에 남겨 두었습니다. 관련된 컴플라이언스 검사 설계로 [ERC-2009](/eip-2009/)가 있습니다.\n"},"zh":{"lang":"zh","tldr":"一个只有四个函数的只读接口，适用于为每个地址、每种类型分配一个规范的 uint256 属性值的注册表，使合约可以从单一可信来源检查诸如 KYC 状态之类的信息。","tags":["identity","registry","attributes","compliance","stagnant"],"related":[165,2009],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1616/","markdown":"## 它解决什么问题？\n\n合约有时需要了解某个地址的某些信息：它是否通过了 KYC，是否是合格投资者，是否在白名单中？早期的声明（claim）标准（ERC-735 和 ERC-780）允许多个发行者针对同一主题给同一个地址附加声明。验证者就必须决定信任哪些发行者，以及如何解决相互冲突的声明。\n\nERC-1616 把这一信任决策上移了一层。由经过策划的**属性注册表（Attribute Registry）**汇总它所信任的各种来源，并给出唯一的答案。验证者只需要信任注册表，而不必关心信息是如何获得的。\n\n## 它如何运作\n\n属性是每个账户一份扁平的 `uint256 → uint256` 键值存储，并有一条关键规则：**每种属性类型在每个地址上恰好只有一个值**（而不是每个发行者一个）。接口如下：\n\n| 函数 | 行为 |\n| --- | --- |\n| `hasAttribute(account, typeId)` | 若已分配且当前有效则返回 `true`。绝不能 revert；外部调用的错误要被捕获并返回 `false` |\n| `getAttributeValue(account, typeId)` | 返回该值。如果 `hasAttribute` 会返回 `false`，则必须 revert |\n| `countAttributeTypes()` | 注册表定义的属性类型数量。不得 revert |\n| `getAttributeTypeID(index)` | 某个索引处的类型 ID；仅在超出范围时 revert |\n\n两个查询函数都必须是确定性的：使用相同参数的两次连续调用，无论调用者或 `tx.origin` 是谁，都返回相同的结果。注册表还必须支持 [ERC-165](/eip-165/)，并报告接口 ID `0x5f46473f`。\n\n属性如何发放、撤销或过期，被有意排除在范围之外。高级注册表可以把布尔表达式编码进类型 ID，让值指向链下元数据，或者在不改变接口的情况下委托给其他注册表。\n\n## 示例代码\n\n一个只允许向持有某项属性的账户转账的代币：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IAttributeRegistry {\n    function hasAttribute(address account, uint256 attributeTypeID) external view returns (bool);\n    function getAttributeValue(address account, uint256 attributeTypeID) external view returns (uint256);\n    function countAttributeTypes() external view returns (uint256);\n    function getAttributeTypeID(uint256 index) external view returns (uint256);\n}\n\ncontract GatedVault {\n    IAttributeRegistry public immutable registry;\n    uint256 public immutable requiredType; // e.g. an \"approved investor\" attribute ID\n\n    constructor(IAttributeRegistry r, uint256 typeId) {\n        registry = r;\n        requiredType = typeId;\n    }\n\n    modifier onlyAttested(address who) {\n        require(registry.hasAttribute(who, requiredType), \"missing attribute\");\n        _;\n    }\n\n    function deposit() external payable onlyAttested(msg.sender) {\n        // ...\n    }\n}\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。规范把 TPL（Transaction Permission Layer）合约指为该接口的一个更复杂的实现。\n- 把信任集中在注册表的策划者手中正是这一设计的本意：谁控制注册表，谁就控制谁能通过检查。\n- 由于 `hasAttribute` 不得 revert，调用其他合约的注册表必须包装这些调用，并在失败时返回 `false`。\n- 该标准除了值之外没有为属性添加任何元数据；命名方案留给可能出现的未来 EIP。一个相关的合规检查设计是 [ERC-2009](/eip-2009/)。\n"}}}
