{"eip":7093,"title":"Social Recovery Interface","description":"Interfaces for social recovery account supporting various guardian types and customizable recovery policies.","authors":["John Zhang (@johnz1019)","Davis Xiang (@xcshuan)","Kyle Xu (@kylexyxu)","George Zhang (@odysseus0)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-05-29","requires":[1271],"discussionsTo":"https://ethereum-magicians.org/t/eip-social-recovery-interface/14494","repo":"ERCs","label":"ERC-7093","officialUrl":"https://eips.ethereum.org/EIPS/eip-7093","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7093.md","url":"https://eips.huatuo.xyz/eip-7093/","tldr":{"en":"A draft interface for smart-account social recovery that separates who the guardians are, how their signatures or proofs are checked, and which policy is enough, so accounts can use passkeys, email, NFTs or friends as guardians without upgrading the wallet.","ja":"スマートアカウントのソーシャルリカバリー用のドラフトインターフェース。ガーディアンが誰か、その署名や証明をどう検証するか、どのポリシーで十分とするかを分離し、ウォレットをアップグレードせずに、パスキー、メール、NFT、友人などをガーディアンにできる。","ko":"스마트 계정 소셜 복구를 위한 초안 인터페이스. 가디언이 누구인지, 그 서명이나 증명을 어떻게 검사하는지, 어떤 정책이면 충분한지를 분리해, 지갑을 업그레이드하지 않고도 패스키, 이메일, NFT, 친구를 가디언으로 쓸 수 있게 한다.","zh":"智能账户社交恢复的草案接口，将\"谁是守护者\"、\"如何检查其签名或证明\"以及\"何种策略足够\"分离开来，使账户无需升级钱包即可使用 passkey、邮箱、NFT 或朋友作为守护者。"},"tags":["account-abstraction","social-recovery","smart-wallet","guardians","security"],"explainers":{"en":{"lang":"en","tldr":"A draft interface for smart-account social recovery that separates who the guardians are, how their signatures or proofs are checked, and which policy is enough, so accounts can use passkeys, email, NFTs or friends as guardians without upgrading the wallet.","tags":["account-abstraction","social-recovery","smart-wallet","guardians","security"],"related":[1271,712,4337,6900,7579],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7093/","markdown":"## What problem does it solve?\n\nLose the key to a normal wallet and the funds are gone. **Social recovery** lets a group of trusted *guardians* approve moving a smart account to a new owner key. Existing implementations tend to hard-code one guardian type (usually other Ethereum accounts) and one rule (M of N), baked into the account contract.\n\nERC-7093 makes recovery pluggable. Guardians can be anything that can produce something verifiable on-chain, such as a passkey (WebAuthn) signature, an email DKIM signature, an OpenID token, a zero-knowledge proof or an NFT/SBT, and the recovery rules can be changed without changing the account's code.\n\n## How it works\n\nFour building blocks:\n\n- **Identity** — `{ guardianVerifier, signer }`. If `signer` is empty, `guardianVerifier` is itself an EOA or contract account, and its signature is checked as ECDSA or [ERC-1271](/eip-1271/). Otherwise `signer` is, for example, a public key or email hash, and the check is delegated to the `guardianVerifier` contract.\n- **`IPermissionVerifier`** — verifies a non-account guardian: `isValidPermission(hash, signer, signature)` and a batch version.\n- **`IRecoveryPolicyVerifier`** (optional) — `verifyRecoveryPolicy(permissions, properties)` decides whether the guardians who signed meet the policy. Each guardian has a `property` (a weight, percentage or role) and the config has a list of `{threshold, lockPeriod}`.\n- **`IRecoveryAccount`** (or a **RecoveryModule** for modular accounts) — the account side: `updateGuardians`, `startRecovery`, `executeRecovery`, `cancelRecovery`, `cancelRecoveryByGuardians`, plus status queries and events.\n\nTypical flow from the spec's example:\n\n1. Guardians A (weight 30), B (30) and C (40); thresholds `50 → 24h lock` and `100 → no lock`.\n2. A and B each sign an [EIP-712](/eip-712/) `StartRecovery` message (config index, new owners, recovery nonce).\n3. A relayer or bundler calls `startRecovery`. Signatures are checked, and the policy sums 60, which passes the first threshold with a 24-hour lock.\n4. The account stores the pending owner change and emits `RecoveryStarted`. The real owner can cancel during the lock.\n5. After the lock, anyone calls `executeRecovery`, which rotates the owner key.\n\nThe recovery nonce is kept separate from the account's transaction nonce and stops guardian approvals from being replayed.\n\n## Sample code\n\nA guardian signing a recovery approval (ethers v6), using the typed data from the spec's example:\n\n```ts\nconst domain = {\n  name: await account.DOMAIN_SEPARATOR_NAME(),\n  version: await account.DOMAIN_SEPARATOR_VERSION(),\n  chainId,\n  verifyingContract: accountAddress,   // check this is really the user's account\n};\nconst types = {\n  StartRecovery: [\n    { name: \"configIndex\", type: \"uint256\" },\n    { name: \"newOwners\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n  ],\n};\nconst message = { configIndex: 0n, newOwners, nonce: await account.getRecoveryNonce() };\n\nconst signature = await guardianWallet.signTypedData(domain, types, message);\n// EOA guardian: signer is empty, guardianVerifier is the guardian's address\nconst permission = { guardian: { guardianVerifier: guardianWallet.address, signer: \"0x\" }, signature };\n\n// later, a relayer submits all collected permissions\nawait account.startRecovery(0n, newOwners, [permission, otherPermission]);\n```\n\n## Things to know\n\n- **Status: Draft.** Reference implementation is \"TBD\" and Security Considerations say \"Needs discussion\".\n- The spec text has some inconsistencies (e.g. the type string for `StartRecovery` and the example message fields do not fully match the struct). Expect changes before relying on exact hashes.\n- Guardians should check the EIP-712 domain (`verifyingContract`, chain id) and the new owner before signing; a convincing request to \"help me recover\" is a classic phishing route.\n- Use a lock period for lower thresholds so the real owner can notice and cancel a hostile recovery.\n- Fits smart accounts built on [ERC-4337](/eip-4337/) and modular designs such as [ERC-6900](/eip-6900/) and [ERC-7579](/eip-7579/).\n"},"ja":{"lang":"ja","tldr":"スマートアカウントのソーシャルリカバリー用のドラフトインターフェース。ガーディアンが誰か、その署名や証明をどう検証するか、どのポリシーで十分とするかを分離し、ウォレットをアップグレードせずに、パスキー、メール、NFT、友人などをガーディアンにできる。","tags":["account-abstraction","social-recovery","smart-wallet","guardians","security"],"related":[1271,712,4337,6900,7579],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7093/","markdown":"## 何を解決するのか\n\n通常のウォレットは鍵を失うと資金も失われます。**ソーシャルリカバリー**では、信頼できる*ガーディアン*のグループが、スマートアカウントを新しいオーナー鍵に移すことを承認します。既存の実装は、1 種類のガーディアン（通常は他の Ethereum アカウント）と 1 つのルール（N 人中 M 人）をアカウントコントラクトに固定してしまいがちです。\n\nERC-7093 はリカバリーを差し替え可能にします。ガーディアンは、パスキー（WebAuthn）署名、メールの DKIM 署名、OpenID トークン、ゼロ知識証明、NFT/SBT など、オンチェーンで検証可能なものを生成できる何であってもよく、リカバリーのルールはアカウントのコードを変えずに変更できます。\n\n## 仕組み\n\n4 つの構成要素：\n\n- **Identity** — `{ guardianVerifier, signer }`。`signer` が空なら、`guardianVerifier` 自体が EOA またはコントラクトアカウントで、その署名は ECDSA または [ERC-1271](/eip-1271/) として検証されます。そうでなければ `signer` はたとえば公開鍵やメールのハッシュで、検証は `guardianVerifier` コントラクトに委任されます。\n- **`IPermissionVerifier`** — アカウント以外のガーディアンを検証します。`isValidPermission(hash, signer, signature)` とそのバッチ版があります。\n- **`IRecoveryPolicyVerifier`**（任意）— `verifyRecoveryPolicy(permissions, properties)` が、署名したガーディアンがポリシーを満たすかどうかを判定します。各ガーディアンには `property`（重み、割合、ロール）があり、設定には `{threshold, lockPeriod}` のリストがあります。\n- **`IRecoveryAccount`**（モジュラーアカウントの場合は **RecoveryModule**）— アカウント側：`updateGuardians`、`startRecovery`、`executeRecovery`、`cancelRecovery`、`cancelRecoveryByGuardians`、さらにステータス照会とイベント。\n\n仕様の例による典型的な流れ：\n\n1. ガーディアン A（重み 30）、B（30）、C（40）。しきい値は `50 → 24 時間ロック` と `100 → ロックなし`。\n2. A と B がそれぞれ [EIP-712](/eip-712/) の `StartRecovery` メッセージ（設定インデックス、新しいオーナー、リカバリー nonce）に署名します。\n3. リレイヤーまたはバンドラーが `startRecovery` を呼び出します。署名が検証され、ポリシーの合計は 60 となり、24 時間ロックの最初のしきい値を満たします。\n4. アカウントは保留中のオーナー変更を保存し、`RecoveryStarted` を発行します。本来のオーナーはロック中にキャンセルできます。\n5. ロック後、誰でも `executeRecovery` を呼び出せます。これによりオーナー鍵が入れ替わります。\n\nリカバリー nonce はアカウントのトランザクション nonce とは別に管理され、ガーディアンの承認のリプレイを防ぎます。\n\n## サンプルコード\n\nガーディアンがリカバリーの承認に署名する例（ethers v6）。仕様の例の型付きデータを使用:\n\n```ts\nconst domain = {\n  name: await account.DOMAIN_SEPARATOR_NAME(),\n  version: await account.DOMAIN_SEPARATOR_VERSION(),\n  chainId,\n  verifyingContract: accountAddress,   // check this is really the user's account\n};\nconst types = {\n  StartRecovery: [\n    { name: \"configIndex\", type: \"uint256\" },\n    { name: \"newOwners\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n  ],\n};\nconst message = { configIndex: 0n, newOwners, nonce: await account.getRecoveryNonce() };\n\nconst signature = await guardianWallet.signTypedData(domain, types, message);\n// EOA guardian: signer is empty, guardianVerifier is the guardian's address\nconst permission = { guardian: { guardianVerifier: guardianWallet.address, signer: \"0x\" }, signature };\n\n// later, a relayer submits all collected permissions\nawait account.startRecovery(0n, newOwners, [permission, otherPermission]);\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** リファレンス実装は「TBD」で、Security Considerations は「Needs discussion」となっています。\n- 仕様の文章には不整合がいくつかあります（たとえば `StartRecovery` の型文字列と例のメッセージのフィールドが、構造体と完全には一致していません）。正確なハッシュに依存する前に、変更があることを想定してください。\n- ガーディアンは署名する前に、EIP-712 ドメイン（`verifyingContract`、チェーン ID）と新しいオーナーを確認すべきです。もっともらしい「リカバリーを手伝って」という依頼は、典型的なフィッシングの手口です。\n- 低いしきい値にはロック期間を設け、本来のオーナーが気づいて悪意のあるリカバリーをキャンセルできるようにしてください。\n- [ERC-4337](/eip-4337/) 上に構築されたスマートアカウントや、[ERC-6900](/eip-6900/)、[ERC-7579](/eip-7579/) のようなモジュラー設計に適合します。\n"},"ko":{"lang":"ko","tldr":"스마트 계정 소셜 복구를 위한 초안 인터페이스. 가디언이 누구인지, 그 서명이나 증명을 어떻게 검사하는지, 어떤 정책이면 충분한지를 분리해, 지갑을 업그레이드하지 않고도 패스키, 이메일, NFT, 친구를 가디언으로 쓸 수 있게 한다.","tags":["account-abstraction","social-recovery","smart-wallet","guardians","security"],"related":[1271,712,4337,6900,7579],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7093/","markdown":"## 어떤 문제를 해결하나요?\n\n일반 지갑은 키를 잃으면 자금도 사라집니다. **소셜 복구**는 신뢰하는 *가디언* 그룹이 스마트 계정을 새 소유자 키로 옮기는 것을 승인하게 합니다. 기존 구현은 한 가지 가디언 유형(보통 다른 이더리움 계정)과 한 가지 규칙(N명 중 M명)을 계정 컨트랙트에 하드코딩하는 경향이 있습니다.\n\nERC-7093은 복구를 플러그형으로 만듭니다. 가디언은 패스키(WebAuthn) 서명, 이메일 DKIM 서명, OpenID 토큰, 영지식 증명, NFT/SBT처럼 온체인에서 검증 가능한 무언가를 만들어 낼 수 있는 무엇이든 될 수 있고, 복구 규칙은 계정 코드를 바꾸지 않고도 변경할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n네 가지 구성 요소:\n\n- **Identity** — `{ guardianVerifier, signer }`. `signer`가 비어 있으면 `guardianVerifier` 자체가 EOA 또는 컨트랙트 계정이며, 그 서명은 ECDSA 또는 [ERC-1271](/eip-1271/)로 검사합니다. 그렇지 않으면 `signer`는 예컨대 공개키나 이메일 해시이고, 검사는 `guardianVerifier` 컨트랙트에 위임됩니다.\n- **`IPermissionVerifier`** — 계정이 아닌 가디언을 검증합니다. `isValidPermission(hash, signer, signature)`와 배치 버전이 있습니다.\n- **`IRecoveryPolicyVerifier`**(선택) — `verifyRecoveryPolicy(permissions, properties)`가 서명한 가디언들이 정책을 충족하는지 판단합니다. 각 가디언에게는 `property`(가중치, 비율, 역할)가 있고, 설정에는 `{threshold, lockPeriod}` 목록이 있습니다.\n- **`IRecoveryAccount`**(모듈형 계정은 **RecoveryModule**) — 계정 측: `updateGuardians`, `startRecovery`, `executeRecovery`, `cancelRecovery`, `cancelRecoveryByGuardians`, 그리고 상태 조회와 이벤트.\n\n명세 예시의 일반적인 흐름:\n\n1. 가디언 A(가중치 30), B(30), C(40). 임계값은 `50 → 24시간 락`과 `100 → 락 없음`.\n2. A와 B가 각각 [EIP-712](/eip-712/) `StartRecovery` 메시지(설정 인덱스, 새 소유자, 복구 nonce)에 서명합니다.\n3. 릴레이어나 번들러가 `startRecovery`를 호출합니다. 서명이 검사되고, 정책 합계는 60이 되어 24시간 락이 걸린 첫 번째 임계값을 통과합니다.\n4. 계정은 대기 중인 소유자 변경을 저장하고 `RecoveryStarted`를 발생시킵니다. 실제 소유자는 락 기간 동안 취소할 수 있습니다.\n5. 락이 끝나면 누구나 `executeRecovery`를 호출할 수 있으며, 이로써 소유자 키가 교체됩니다.\n\n복구 nonce는 계정의 트랜잭션 nonce와 별도로 관리되며, 가디언의 승인이 재사용(replay)되는 것을 막습니다.\n\n## 샘플 코드\n\n가디언이 복구 승인에 서명하는 예(ethers v6). 명세 예시의 타입 데이터를 사용합니다.\n\n```ts\nconst domain = {\n  name: await account.DOMAIN_SEPARATOR_NAME(),\n  version: await account.DOMAIN_SEPARATOR_VERSION(),\n  chainId,\n  verifyingContract: accountAddress,   // check this is really the user's account\n};\nconst types = {\n  StartRecovery: [\n    { name: \"configIndex\", type: \"uint256\" },\n    { name: \"newOwners\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n  ],\n};\nconst message = { configIndex: 0n, newOwners, nonce: await account.getRecoveryNonce() };\n\nconst signature = await guardianWallet.signTypedData(domain, types, message);\n// EOA guardian: signer is empty, guardianVerifier is the guardian's address\nconst permission = { guardian: { guardianVerifier: guardianWallet.address, signer: \"0x\" }, signature };\n\n// later, a relayer submits all collected permissions\nawait account.startRecovery(0n, newOwners, [permission, otherPermission]);\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 레퍼런스 구현은 \"TBD\"이고 Security Considerations는 \"Needs discussion\"이라고 되어 있습니다.\n- 명세 본문에 몇 가지 불일치가 있습니다(예: `StartRecovery`의 타입 문자열과 예시 메시지 필드가 구조체와 완전히 일치하지 않습니다). 정확한 해시에 의존하기 전에 변경이 있을 것으로 예상하세요.\n- 가디언은 서명하기 전에 EIP-712 도메인(`verifyingContract`, 체인 id)과 새 소유자를 확인해야 합니다. 그럴듯한 \"복구를 도와주세요\" 요청은 전형적인 피싱 경로입니다.\n- 낮은 임계값에는 락 기간을 두어 실제 소유자가 악의적인 복구를 알아채고 취소할 수 있게 하세요.\n- [ERC-4337](/eip-4337/) 기반 스마트 계정과 [ERC-6900](/eip-6900/), [ERC-7579](/eip-7579/) 같은 모듈형 설계에 맞습니다.\n"},"zh":{"lang":"zh","tldr":"智能账户社交恢复的草案接口，将\"谁是守护者\"、\"如何检查其签名或证明\"以及\"何种策略足够\"分离开来，使账户无需升级钱包即可使用 passkey、邮箱、NFT 或朋友作为守护者。","tags":["account-abstraction","social-recovery","smart-wallet","guardians","security"],"related":[1271,712,4337,6900,7579],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7093/","markdown":"## 它解决什么问题？\n\n普通钱包丢了密钥，资金就没了。**社交恢复**让一组受信任的*守护者*批准把智能账户转移到新的所有者密钥。现有实现往往把一种守护者类型（通常是其他以太坊账户）和一条规则（N 选 M）硬编码在账户合约里。\n\nERC-7093 让恢复变得可插拔。守护者可以是任何能在链上产生可验证内容的东西，例如 passkey（WebAuthn）签名、邮件 DKIM 签名、OpenID 令牌、零知识证明或 NFT/SBT，而恢复规则无需修改账户代码就能更改。\n\n## 它如何运作\n\n四个构件：\n\n- **Identity** — `{ guardianVerifier, signer }`。如果 `signer` 为空，则 `guardianVerifier` 本身就是 EOA 或合约账户，其签名按 ECDSA 或 [ERC-1271](/eip-1271/) 检查。否则 `signer` 是例如公钥或邮箱哈希，检查委托给 `guardianVerifier` 合约。\n- **`IPermissionVerifier`** — 验证非账户类守护者：`isValidPermission(hash, signer, signature)` 及其批量版本。\n- **`IRecoveryPolicyVerifier`**（可选）— `verifyRecoveryPolicy(permissions, properties)` 判断已签名的守护者是否满足策略。每个守护者都有一个 `property`（权重、百分比或角色），配置中有一个 `{threshold, lockPeriod}` 列表。\n- **`IRecoveryAccount`**（模块化账户则是 **RecoveryModule**）— 账户一侧：`updateGuardians`、`startRecovery`、`executeRecovery`、`cancelRecovery`、`cancelRecoveryByGuardians`，以及状态查询和事件。\n\n规范示例中的典型流程：\n\n1. 守护者 A（权重 30）、B（30）和 C（40）；阈值为 `50 → 24 小时锁定` 和 `100 → 无锁定`。\n2. A 和 B 各自签署一条 [EIP-712](/eip-712/) 的 `StartRecovery` 消息（配置索引、新所有者、恢复 nonce）。\n3. 中继器或 bundler 调用 `startRecovery`。签名被检查，策略累计得到 60，通过带 24 小时锁定的第一个阈值。\n4. 账户存储待生效的所有者变更并发出 `RecoveryStarted`。真正的所有者可以在锁定期间取消。\n5. 锁定结束后，任何人都可以调用 `executeRecovery`，从而轮换所有者密钥。\n\n恢复 nonce 与账户的交易 nonce 分开保存，用来防止守护者的批准被重放。\n\n## 示例代码\n\n守护者对恢复批准签名（ethers v6），使用规范示例中的类型化数据：\n\n```ts\nconst domain = {\n  name: await account.DOMAIN_SEPARATOR_NAME(),\n  version: await account.DOMAIN_SEPARATOR_VERSION(),\n  chainId,\n  verifyingContract: accountAddress,   // check this is really the user's account\n};\nconst types = {\n  StartRecovery: [\n    { name: \"configIndex\", type: \"uint256\" },\n    { name: \"newOwners\", type: \"bytes\" },\n    { name: \"nonce\", type: \"uint256\" },\n  ],\n};\nconst message = { configIndex: 0n, newOwners, nonce: await account.getRecoveryNonce() };\n\nconst signature = await guardianWallet.signTypedData(domain, types, message);\n// EOA guardian: signer is empty, guardianVerifier is the guardian's address\nconst permission = { guardian: { guardianVerifier: guardianWallet.address, signer: \"0x\" }, signature };\n\n// later, a relayer submits all collected permissions\nawait account.startRecovery(0n, newOwners, [permission, otherPermission]);\n```\n\n## 需要注意\n\n- **状态：Draft。** 参考实现为 \"TBD\"，Security Considerations 写的是 \"Needs discussion\"。\n- 规范文本存在一些不一致（例如 `StartRecovery` 的类型字符串和示例消息字段与结构体并不完全吻合）。在依赖确切哈希之前，请预期会有变化。\n- 守护者在签名前应检查 EIP-712 域（`verifyingContract`、链 id）和新所有者；一个看似可信的\"帮我恢复\"请求是典型的钓鱼途径。\n- 对较低的阈值使用锁定期，这样真正的所有者可以发现并取消恶意恢复。\n- 适用于基于 [ERC-4337](/eip-4337/) 构建的智能账户，以及 [ERC-6900](/eip-6900/)、[ERC-7579](/eip-7579/) 等模块化设计。\n"}}}
