{"eip":5851,"title":"On-Chain Verifiable Credentials","description":"Interface for contracts that manage verifiable claims and identifiers as Soulbound tokens.","authors":["Yu Liu (@yuliu-debond)","Junyi Zhong (@Jooeys)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2022-10-18","requires":[721,1155,1167,1967,3475],"discussionsTo":"https://ethereum-magicians.org/t/eip-5815-kyc-certification-issuer-and-verifier-standard/11513","repo":"ERCs","label":"ERC-5851","officialUrl":"https://eips.ethereum.org/EIPS/eip-5851","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-5851.md","url":"https://eips.huatuo.xyz/eip-5851/","tldr":{"en":"A stagnant proposal for issuer and verifier contracts that record off-chain identity checks (KYC, age, jurisdiction) as soulbound certificates, so other contracts can ask on-chain whether an address meets a set of claims.","ja":"オフチェーンの本人確認（KYC、年齢、法域）をソウルバウンドな証明書として記録する発行者コントラクトと検証者コントラクトの、停滞中（Stagnant）の提案。他のコントラクトが、あるアドレスが一連の主張（claim）を満たすかをオンチェーンで尋ねられる。","ko":"오프체인 신원 확인(KYC, 나이, 관할권)을 소울바운드 증명서로 기록하는 발행자 및 검증자 컨트랙트에 대한 정체된(Stagnant) 제안. 다른 컨트랙트가 어떤 주소가 일련의 주장(claim)을 충족하는지 온체인에서 물어볼 수 있다.","zh":"一项处于停滞状态（Stagnant）的提案：发行方和验证方合约把链下身份检查（KYC、年龄、司法辖区）记录为灵魂绑定证书，使其他合约可以在链上询问某个地址是否满足一组声明（claim）。"},"tags":["identity","kyc","credentials","soulbound","sbt"],"explainers":{"en":{"lang":"en","tldr":"A stagnant proposal for issuer and verifier contracts that record off-chain identity checks (KYC, age, jurisdiction) as soulbound certificates, so other contracts can ask on-chain whether an address meets a set of claims.","tags":["identity","kyc","credentials","soulbound","sbt"],"related":[5192,3475,721,1155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-5851/","markdown":"## What problem does it solve?\n\nMany on-chain applications need to know something about the person behind an address: that they passed KYC, are over 18, live in an allowed jurisdiction, or are a unique human (to prevent Sybil attacks in voting). The checks themselves happen off-chain, but there was no common way to *commit* the result on-chain so any contract could rely on it.\n\nERC-5851 proposes a standard split between:\n\n- **Issuers**, which define the claims that make up a credential and certify (or revoke) addresses as meeting them, represented as a non-transferable \"soulbound\" token (SBT).\n- **Verifiers**, contracts such as DeFi protocols or DAOs that simply ask \"is this address certified for credential X?\" before allowing an action.\n\n## How it works\n\n**Describing claims.** Each credential, identified by an `SBTID`, has an array of `Claim` structs. A claim combines:\n\n- `Metadata` – `title`, `_type` and `description` of the field (e.g. \"age\", \"uint\").\n- `logic` – a comparison operator as a string, one of `⊄ ⊂ \u003c \u003c= == != \u003e= \u003e`.\n- `expectation` – a `Values` struct (string / uint / address / bool), reused from [ERC-3475](/eip-3475/).\n\n```json\n{ \"title\": \"age\", \"type\": \"uint\", \"description\": \"age from legal document\",\n  \"logic\": \"\u003e=\", \"value\": \"18\" }\n```\n\n**Issuer interface** (admin-controlled):\n\n| Function | Purpose |\n| --- | --- |\n| `standardClaim(SBTID)` | Read the claims defining a credential |\n| `changeStandardClaim(SBTID, claims)` | Create or change those claims; emits `StandardChanged` |\n| `certify(claimer, SBTID)` | Mark an address as holding the credential; emits `Certified` |\n| `revoke(claimer, SBTID)` | Remove it; emits `Revoked` |\n\n**Verifier interface:** `ifVerified(claimer, SBTID)` returns `true` if the address holds that certificate. The reference implementation wraps this in a modifier that gated functions can use.\n\nThe actual evidence (documents, zero-knowledge proofs) stays off-chain; only the issuer's attestation is recorded.\n\n## Sample code\n\nA protocol restricting a function to certified addresses:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IERC5851Verifier {\n    function ifVerified(address claimer, uint256 SBTID) external view returns (bool);\n}\n\ncontract GatedVault {\n    IERC5851Verifier public immutable issuer;\n    uint256 public immutable requiredId; // e.g. the \"KYC passed, age \u003e= 18\" credential\n\n    constructor(IERC5851Verifier _issuer, uint256 _id) {\n        issuer = _issuer;\n        requiredId = _id;\n    }\n\n    modifier onlyCertified() {\n        require(issuer.ifVerified(msg.sender, requiredId), \"not certified\");\n        _;\n    }\n\n    function deposit() external payable onlyCertified {\n        // ...\n    }\n}\n```\n\n## Things to know\n\n- **Status: Stagnant.** The Rationale section is still \"TBD\" and the spec has inconsistencies (for example, the operator table and Unicode code points do not fully match).\n- Everything depends on the **issuer's admin key**: it defines the claims and certifies or revokes addresses. Changing a credential's claims later affects everyone already certified under it.\n- An on-chain certificate is linked to an address and is public. Projects should consider what it reveals about a person; storing raw personal data on-chain is not part of the design.\n- Related soulbound work: [ERC-5192](/eip-5192/) for minimal non-transferable NFTs.\n"},"ja":{"lang":"ja","tldr":"オフチェーンの本人確認（KYC、年齢、法域）をソウルバウンドな証明書として記録する発行者コントラクトと検証者コントラクトの、停滞中（Stagnant）の提案。他のコントラクトが、あるアドレスが一連の主張（claim）を満たすかをオンチェーンで尋ねられる。","tags":["identity","kyc","credentials","soulbound","sbt"],"related":[5192,3475,721,1155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-5851/","markdown":"## 何を解決するのか\n\n多くのオンチェーンアプリケーションは、アドレスの背後にいる人物について、KYC を通過した、18 歳以上である、許可された法域に住んでいる、あるいは唯一の人間である（投票でのシビル攻撃を防ぐため）といったことを知る必要があります。確認自体はオフチェーンで行われますが、その結果をオンチェーンに*コミット*し、どのコントラクトも頼れるようにする共通の方法はありませんでした。\n\nERC-5851 は、次の 2 者への標準的な分担を提案します。\n\n- **発行者（Issuer）**: 資格情報を構成する claim を定義し、アドレスがそれを満たすことを認定（または取り消し）します。これは譲渡不可の「ソウルバウンド」トークン（SBT）として表されます。\n- **検証者（Verifier）**: DeFi プロトコルや DAO などのコントラクトで、アクションを許可する前に「このアドレスは資格情報 X で認定されているか」と尋ねるだけです。\n\n## 仕組み\n\n**claim の記述。** `SBTID` で識別される各資格情報は、`Claim` 構造体の配列を持ちます。claim は次を組み合わせたものです。\n\n- `Metadata` – フィールドの `title`、`_type`、`description`（例: \"age\"、\"uint\"）。\n- `logic` – 比較演算子を文字列で表したもので、`⊄ ⊂ \u003c \u003c= == != \u003e= \u003e` のいずれか。\n- `expectation` – `Values` 構造体（string / uint / address / bool）。[ERC-3475](/eip-3475/) から再利用されています。\n\n```json\n{ \"title\": \"age\", \"type\": \"uint\", \"description\": \"age from legal document\",\n  \"logic\": \"\u003e=\", \"value\": \"18\" }\n```\n\n**発行者インターフェース**（管理者が制御）:\n\n| 関数 | 役割 |\n| --- | --- |\n| `standardClaim(SBTID)` | 資格情報を定義する claim を読み取る |\n| `changeStandardClaim(SBTID, claims)` | それらの claim を作成または変更する。`StandardChanged` を発行する |\n| `certify(claimer, SBTID)` | アドレスが資格情報を保持していると記録する。`Certified` を発行する |\n| `revoke(claimer, SBTID)` | それを取り消す。`Revoked` を発行する |\n\n**検証者インターフェース:** `ifVerified(claimer, SBTID)` は、そのアドレスが当該証明書を保持していれば `true` を返します。リファレンス実装は、これをゲート付き関数が使える modifier でラップしています。\n\n実際の証拠（書類、ゼロ知識証明）はオフチェーンに残り、記録されるのは発行者の証明だけです。\n\n## サンプルコード\n\n認定されたアドレスだけに関数を制限するプロトコル:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IERC5851Verifier {\n    function ifVerified(address claimer, uint256 SBTID) external view returns (bool);\n}\n\ncontract GatedVault {\n    IERC5851Verifier public immutable issuer;\n    uint256 public immutable requiredId; // e.g. the \"KYC passed, age \u003e= 18\" credential\n\n    constructor(IERC5851Verifier _issuer, uint256 _id) {\n        issuer = _issuer;\n        requiredId = _id;\n    }\n\n    modifier onlyCertified() {\n        require(issuer.ifVerified(msg.sender, requiredId), \"not certified\");\n        _;\n    }\n\n    function deposit() external payable onlyCertified {\n        // ...\n    }\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** Rationale セクションはまだ「TBD」で、仕様には不整合があります（たとえば、演算子の表と Unicode のコードポイントが完全には一致しません）。\n- すべては**発行者の管理者キー**に依存します。それが claim を定義し、アドレスを認定または取り消します。資格情報の claim を後から変更すると、すでにそれで認定された全員に影響します。\n- オンチェーンの証明書はアドレスに紐づけられ、公開されます。プロジェクトは、それが人物について何を明かすかを考慮するべきです。生の個人データをオンチェーンに保存することは設計の一部ではありません。\n- 関連するソウルバウンドの取り組み: 最小限の譲渡不可 NFT のための [ERC-5192](/eip-5192/)。\n"},"ko":{"lang":"ko","tldr":"오프체인 신원 확인(KYC, 나이, 관할권)을 소울바운드 증명서로 기록하는 발행자 및 검증자 컨트랙트에 대한 정체된(Stagnant) 제안. 다른 컨트랙트가 어떤 주소가 일련의 주장(claim)을 충족하는지 온체인에서 물어볼 수 있다.","tags":["identity","kyc","credentials","soulbound","sbt"],"related":[5192,3475,721,1155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-5851/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 온체인 애플리케이션은 주소 뒤에 있는 사람에 대해 알아야 합니다. KYC를 통과했는지, 18세 이상인지, 허용된 관할권에 사는지, 또는 유일한 사람인지(투표에서 시빌 공격을 막기 위해) 같은 것들입니다. 확인 자체는 오프체인에서 이뤄지지만, 그 결과를 온체인에 *기록*해 어떤 컨트랙트든 의존할 수 있게 하는 공통 방법은 없었습니다.\n\nERC-5851은 다음 둘 사이의 표준적인 역할 분담을 제안합니다.\n\n- **발행자(Issuer)**: 자격 증명을 구성하는 claim을 정의하고, 주소가 이를 충족함을 인증(또는 취소)합니다. 양도 불가능한 \"소울바운드\" 토큰(SBT)으로 표현됩니다.\n- **검증자(Verifier)**: DeFi 프로토콜이나 DAO 같은 컨트랙트로, 어떤 동작을 허용하기 전에 \"이 주소가 자격 증명 X로 인증되었나?\"만 묻습니다.\n\n## 어떻게 동작하나요?\n\n**claim 기술.** `SBTID`로 식별되는 각 자격 증명은 `Claim` 구조체 배열을 가집니다. claim은 다음을 결합합니다.\n\n- `Metadata` – 필드의 `title`, `_type`, `description`(예: \"age\", \"uint\").\n- `logic` – 문자열로 된 비교 연산자로, `⊄ ⊂ \u003c \u003c= == != \u003e= \u003e` 중 하나.\n- `expectation` – `Values` 구조체(string / uint / address / bool)로, [ERC-3475](/eip-3475/)에서 재사용했습니다.\n\n```json\n{ \"title\": \"age\", \"type\": \"uint\", \"description\": \"age from legal document\",\n  \"logic\": \"\u003e=\", \"value\": \"18\" }\n```\n\n**발행자 인터페이스**(관리자가 제어):\n\n| 함수 | 역할 |\n| --- | --- |\n| `standardClaim(SBTID)` | 자격 증명을 정의하는 claim을 읽음 |\n| `changeStandardClaim(SBTID, claims)` | 해당 claim을 생성하거나 변경. `StandardChanged`를 발생시킴 |\n| `certify(claimer, SBTID)` | 주소가 자격 증명을 보유한다고 표시. `Certified`를 발생시킴 |\n| `revoke(claimer, SBTID)` | 이를 제거. `Revoked`를 발생시킴 |\n\n**검증자 인터페이스:** `ifVerified(claimer, SBTID)`는 해당 주소가 그 증명서를 보유하면 `true`를 반환합니다. 레퍼런스 구현은 이를 제한된 함수가 쓸 수 있는 modifier로 감쌉니다.\n\n실제 증거(문서, 영지식 증명)는 오프체인에 남고, 발행자의 증명만 기록됩니다.\n\n## 샘플 코드\n\n인증된 주소로만 함수를 제한하는 프로토콜:\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IERC5851Verifier {\n    function ifVerified(address claimer, uint256 SBTID) external view returns (bool);\n}\n\ncontract GatedVault {\n    IERC5851Verifier public immutable issuer;\n    uint256 public immutable requiredId; // e.g. the \"KYC passed, age \u003e= 18\" credential\n\n    constructor(IERC5851Verifier _issuer, uint256 _id) {\n        issuer = _issuer;\n        requiredId = _id;\n    }\n\n    modifier onlyCertified() {\n        require(issuer.ifVerified(msg.sender, requiredId), \"not certified\");\n        _;\n    }\n\n    function deposit() external payable onlyCertified {\n        // ...\n    }\n}\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** Rationale 섹션은 여전히 \"TBD\"이고 명세에는 불일치가 있습니다(예를 들어 연산자 표와 유니코드 코드 포인트가 완전히 일치하지 않습니다).\n- 모든 것이 **발행자의 관리자 키**에 달려 있습니다. 이 키가 claim을 정의하고 주소를 인증하거나 취소합니다. 자격 증명의 claim을 나중에 바꾸면 그 아래에서 이미 인증된 모든 사람에게 영향을 줍니다.\n- 온체인 증명서는 주소에 연결되며 공개됩니다. 프로젝트는 그것이 사람에 대해 무엇을 드러내는지 고려해야 합니다. 원본 개인 데이터를 온체인에 저장하는 것은 설계에 포함되어 있지 않습니다.\n- 관련된 소울바운드 작업: 최소한의 양도 불가능 NFT를 위한 [ERC-5192](/eip-5192/).\n"},"zh":{"lang":"zh","tldr":"一项处于停滞状态（Stagnant）的提案：发行方和验证方合约把链下身份检查（KYC、年龄、司法辖区）记录为灵魂绑定证书，使其他合约可以在链上询问某个地址是否满足一组声明（claim）。","tags":["identity","kyc","credentials","soulbound","sbt"],"related":[5192,3475,721,1155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-5851/","markdown":"## 它解决什么问题？\n\n许多链上应用需要了解地址背后的人：他们通过了 KYC、年满 18 岁、居住在允许的司法辖区，或者是独一无二的真人（以防止投票中的女巫攻击）。这些检查本身发生在链下，但此前没有通用的方式把结果*提交*到链上，让任何合约都可以依赖它。\n\nERC-5851 提出了在以下两者之间的标准分工：\n\n- **发行方（Issuer）**：定义构成凭证的声明，并认证（或撤销）地址满足这些声明，以不可转让的\"灵魂绑定\"代币（SBT）表示。\n- **验证方（Verifier）**：DeFi 协议或 DAO 等合约，在允许某项操作之前，只需询问\"这个地址是否已获得凭证 X 的认证？\"\n\n## 它如何运作\n\n**描述声明。** 每个由 `SBTID` 标识的凭证都有一个 `Claim` 结构体数组。一个声明由以下部分组成：\n\n- `Metadata` – 字段的 `title`、`_type` 和 `description`（例如 \"age\"、\"uint\"）。\n- `logic` – 以字符串表示的比较运算符，为 `⊄ ⊂ \u003c \u003c= == != \u003e= \u003e` 之一。\n- `expectation` – 一个 `Values` 结构体（string / uint / address / bool），复用自 [ERC-3475](/eip-3475/)。\n\n```json\n{ \"title\": \"age\", \"type\": \"uint\", \"description\": \"age from legal document\",\n  \"logic\": \"\u003e=\", \"value\": \"18\" }\n```\n\n**发行方接口**（由管理员控制）：\n\n| 函数 | 用途 |\n| --- | --- |\n| `standardClaim(SBTID)` | 读取定义某个凭证的声明 |\n| `changeStandardClaim(SBTID, claims)` | 创建或更改这些声明；触发 `StandardChanged` |\n| `certify(claimer, SBTID)` | 标记某个地址持有该凭证；触发 `Certified` |\n| `revoke(claimer, SBTID)` | 移除它；触发 `Revoked` |\n\n**验证方接口：** 如果地址持有该证书，`ifVerified(claimer, SBTID)` 返回 `true`。参考实现把它封装在一个 modifier 中，受限函数可以使用。\n\n真正的证据（文件、零知识证明）仍留在链下；链上只记录发行方的证明。\n\n## 示例代码\n\n一个把某个函数限制为仅限已认证地址调用的协议：\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ninterface IERC5851Verifier {\n    function ifVerified(address claimer, uint256 SBTID) external view returns (bool);\n}\n\ncontract GatedVault {\n    IERC5851Verifier public immutable issuer;\n    uint256 public immutable requiredId; // e.g. the \"KYC passed, age \u003e= 18\" credential\n\n    constructor(IERC5851Verifier _issuer, uint256 _id) {\n        issuer = _issuer;\n        requiredId = _id;\n    }\n\n    modifier onlyCertified() {\n        require(issuer.ifVerified(msg.sender, requiredId), \"not certified\");\n        _;\n    }\n\n    function deposit() external payable onlyCertified {\n        // ...\n    }\n}\n```\n\n## 需要注意\n\n- **状态：Stagnant。** Rationale 部分仍是\"TBD\"，规范存在不一致之处（例如，运算符表与 Unicode 码位并不完全匹配）。\n- 一切都取决于**发行方的管理员密钥**：它定义声明，并认证或撤销地址。之后更改某个凭证的声明，会影响所有已在该凭证下获得认证的人。\n- 链上证书与地址相关联，并且是公开的。项目应当考虑它会泄露关于一个人的哪些信息；在链上存储原始个人数据不是该设计的一部分。\n- 相关的灵魂绑定工作：[ERC-5192](/eip-5192/)，用于最小化的不可转让 NFT。\n"}}}
