---
eip: 6981
label: ERC-6981
title: Reserved Ownership Accounts
status: Draft
type: Standards Track
category: ERC
created: 2023-04-25
requires: 1167, 1271, 6492
official: https://eips.ethereum.org/EIPS/eip-6981
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6981.md
canonical: https://eips.huatuo.xyz/eip-6981/
lang: en
tldr: A draft registry pattern that lets a web service give each user a deterministic smart-account address that can receive assets right away, which the user can later claim with a service-signed message and fully control.
tags: [account, smart-wallet, onboarding, create2, draft]
---

# ERC-6981: Reserved Ownership Accounts

> A registry for generating future-deployed smart contract accounts owned by users on external services

**TL;DR:** A draft registry pattern that lets a web service give each user a deterministic smart-account address that can receive assets right away, which the user can later claim with a service-signed message and fully control.

## What problem does it solve?

Many web services let users "own" on-chain assets without ever touching a wallet. Usually that means a custodial setup: EOAs whose keys sit in the service's database, or one omnibus contract with balances tracked off-chain. The service effectively controls the assets, and the user has no on-chain identity of their own.

ERC-6981 proposes **reserved ownership accounts**. The service assigns each user an Ethereum address that is computed deterministically and can receive tokens immediately, with no transaction needed. Later, if the user wants self-custody, they claim the account and the service permanently gives up control.

## How it works

Each service deploys its own **Account Registry**, tied to one immutable account implementation. The service keeps a mapping from each user's login identity to a unique `salt`.

| Registry function | Purpose |
| --- | --- |
| `account(salt)` | Compute the user's address (CREATE2, so it is known before deployment) |
| `createAccount(salt)` | Deploy an [ERC-1167](/eip-1167/) proxy at that address, owned initially by the registry |
| `claimAccount(owner, salt, expiration, message, signature)` | Verify the service's signature, deploy if needed, and hand ownership to `owner` |
| `isValidSignature(hash, sig)` | Fallback signature check for unclaimed accounts |

**Claim flow:**

1. The user authenticates with the service (email, OAuth…).
2. The service signs a message binding `owner`, `salt` and an optional `expiration` with its registered signer key.
3. The user submits it to `claimAccount`. The registry checks the signature (ECDSA, or [ERC-1271](/eip-1271/) if the signer is a contract) and calls `setOwner` on the account, relinquishing all control.

**Signatures before claiming.** Accounts implement ERC-1271. Unclaimed accounts forward checks to the registry, which accepts signatures from the service signer over `keccak256(originalHash ‖ accountAddress)`. For accounts not yet deployed, that signature is wrapped per [ERC-6492](/eip-6492/) so verifiers can simulate deployment first.

Front-running `createAccount` or `claimAccount` is harmless: changing `owner` invalidates the signature, and an identical deployment still gives the rightful owner the address.

## Sample code

Service side and user side, following the spec's reference registry (ethers v6):

```ts
import { Contract, solidityPacked, getBytes, hashMessage } from "ethers";

// --- service backend (after the user logs in) ---
const packed = getBytes(solidityPacked(
  ["address", "uint256", "uint256"], [userWallet, userSalt, expiration],
));
const message = hashMessage(packed);               // "\x19Ethereum Signed Message:\n84" ‖ packed
const signature = await serviceSigner.signMessage(packed);

// --- user ---
const registry = new Contract(registryAddress, [
  "function account(uint256) view returns (address)",
  "function claimAccount(address,uint256,uint256,bytes32,bytes) returns (address)",
], userSigner);

console.log("reserved address:", await registry.account(userSalt));
await (await registry.claimAccount(userWallet, userSalt, expiration, message, signature)).wait();
```

## Things to know

- **Status: Draft.** Interfaces and signing details may still change.
- Until a user claims, the **service signer effectively controls** the account (it can sign on its behalf and authorise claims). Users must trust the service not to authorise a claim to the wrong owner.
- Registries are per-service by design, not a single global registry, so services can apply their own authorisation rules. Compare [ERC-6551](/eip-6551/), which uses one canonical registry for NFT-owned accounts.
- The message format in the sample comes from the reference implementation; the spec itself only says the signature must bind owner, salt and expiration.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-6981
