Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC7555, a proposal for consistently identifying the same user account across applications and domains.

The following material is translated, summarized, and supplemented with explanations.

I have also covered various EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ERC7555 proposes a common interface and standardized behavior for applications to discover user accounts. These include externally owned accounts (EOAs), ordinary wallet addresses directly controlled by private keys, and smart accounts implemented as smart contracts.

The proposal particularly addresses accounts configured and deployed with signing keys that do not use Ethereum's usual secp256k1 curve. Examples include passkeys (FIDO-based authentication integrated into browsers or operating systems), YubiKeys (hardware security keys), and secure hardware on iOS or Android devices.

ERC7555 aims to standardize how user addresses are obtained across applications and domains. Applications can access a user's addresses through a common method rather than developing incompatible approaches.

Motivation

Growing Flexibility and Complexity of Account Abstraction

Account abstraction through ERC4337 has substantially increased wallet flexibility.

For more on ERC4337, see the following article.

[ERC4337] Implementing Account Abstraction Without Protocol Changes

Examples include the following.

  • Multisignature transactions Require signatures from multiple parties before allowing a transfer.
  • Social recovery Recover a wallet through approvals from friends or other devices.
  • Contract and account allowlists Permit transfers or calls only to specified recipients.
  • Session keys Temporary keys authorizing particular operations for a limited period.

This flexibility introduces a new complexity: account fragmentation. Users may not know all the accounts associated with them, and applications may be unable to discover them correctly. ERC7555 is proposed as a way to reduce this problem.

What Is Account Fragmentation?

Account fragmentation occurs when addresses associated with one user exist separately as EOAs and smart accounts without a shared awareness of their relationships.

For example, another application may fail to recognize a smart account the user created elsewhere and treat the person as a new user. Consequently, users accumulate multiple accounts across which their assets are distributed. The underlying issue is the absence of a common method for applications to discover the accounts a user already has.

Signing Methods Before and After ERC4337

Before ERC4337

Before ERC4337, interacting with smart contract accounts commonly relied on signatures produced by key pairs based on the secp256k1 elliptic curve. These are the same types of keys used by ordinary Ethereum wallets, including MetaMask and hardware wallets.

Under this assumption, the relationship between a private key, an EOA, and an associated smart account was relatively consistent.

After ERC4337

With ERC4337, alternative signing methods that do not rely on secp256k1 became more widely usable.

  • Passkeys FIDO-based credentials provided by browsers and operating systems, commonly used to sign in to websites.
  • YubiKey Hardware security keys connected through USB or NFC.
  • Secure hardware on iOS and Android Generate and store keys within protected areas of a smartphone without exporting them.

These mechanisms often use curves or signing schemes different from Ethereum's standard secp256k1 keys and cannot directly sign ordinary Ethereum transactions. In ERC4337, smart accounts can validate alternative signatures, and bundlers submit UserOperations to the network through transactions. Paymasters may separately sponsor gas fees.

Many wallet providers and services also incorporate additional key generation or management mechanisms.

  • Shamir's secret sharing Split a secret key into shares that can be reconstructed when a sufficient number are collected.
  • MPC(Multi-Party Computation) Multiple servers or devices cooperate in cryptographic computations without storing a complete private key in any one location.
  • Secure hardware integration Handle private keys exclusively within protected device hardware so applications cannot directly access them.

With these varied implementations, there is no universal method for reproducing the same EOA or smart account address when a user uses multiple applications.

Different Keys Across Domains

Passkeys and security devices such as YubiKeys often generate distinct key pairs for different relying parties. For example, app-a.example.com and app-b.example.com may be treated as different relying parties, with separate keys associated with each.

This can produce the following situation.

  • There are two applications: mobile App A and web App B.
  • Both implement passkey authentication.
  • When the user signs in to each application, App A and App B obtain different key pairs.

Although the person is the same in both applications, each application sees credentials associated with a different identity.

Users expect the same address wherever they use their wallet, as with ordinary wallet applications or hardware wallets. In practice, relying-party-specific credentials can prevent this expectation from being met.

How ERC4337 Can Amplify the Problem

Applications using ERC4337 aim to abstract away users' key management and simplify onboarding. For example, users may be able to set up a wallet using only an email address or a passkey.

However, without a common discovery mechanism, an application cannot determine whether a user has already deployed an ERC4337 smart account elsewhere. The following situation can arise.

  1. A user creates and uses an ERC4337 smart account through one service.
  2. Another application subsequently provides ERC4337 onboarding.
  3. That application cannot discover the user's existing smart account.
  4. It deploys a new smart account associated with its own domain.

As a result, the user has a separate smart account for each application, increasing fragmentation.

Effects of Account Fragmentation on Users and Applications

When existing accounts cannot be identified and shared correctly, the following effects arise.

  • Applications mistakenly treat existing users as new users and create new accounts.
  • Users accumulate numerous accounts without necessarily realizing it.
  • Assets such as tokens and NFTs are spread across multiple accounts, making holdings difficult to track.
  • Applications cannot recognize users as the same person, complicating single sign-on (SSO), which allows authentication across services through one sign-in.

ERC7555 aims to reduce fragmentation and enable users and applications to share consistent account information.

Objectives of ERC7555

The proposed standard aims to address the following issues.

Objective Description
Enable applications to obtain users' signing addresses through a standard method Applications can query which addresses users use to sign transactions through a common interface rather than relying on application-specific implementations.
Standardize single sign-on (SSO) for alternative signing methods Provide a common sign-in experience across applications using alternatives to secp256k1, including passkeys, YubiKeys, and secure hardware. Users can reuse their identity across services.
Standardize disclosure of smart accounts created through applications Applications or onboarding services can disclose the smart accounts they have deployed for users in a form other applications can use to discover those existing accounts.

What ERC7555 Does Not Cover

ERC7555 is not a comprehensive specification for every aspect of wallet behavior. It explicitly leaves several areas outside its scope.

Out-of-scope item Description
Signing messages across domains The standard does not define detailed mechanisms for reusing keys or accounts created on one domain in another, or how cross-domain signatures are produced.
How providers generate user key pairs Wallet and authentication providers determine how keys are generated and stored, including whether to use Shamir's secret sharing, MPC, or secure hardware. The ERC does not prescribe their internal implementation.
Application UI logic The standard does not specify screens, user flows, or buttons. Application developers are free to design the user experience.

Specification

Definitions

Term Description
Smart account A smart contract account conforming to ERC4337. The design is assumed to support modular features such as replaceable signature verification and policies.
Domain A string identifying a server or website, such as ethereum.org or ABCDE12345.com.example.app. It resembles the domain names used when accessing websites through a browser.
EOA Externally Owned Account. A conventional Ethereum account controlled by a private key, such as an ordinary wallet address.
Provider A third-party service capable of authenticating users and generating key pairs for them. Wallet and authentication services can act as providers.

A key pair refers to a cryptographic public and private key pair. It provides the underlying information used to sign transactions and messages.

Redirect Mechanism

ERC7555 uses a redirect mechanism when an application authenticates a user.

The application redirects the user to a URI supplied by a particular provider, following the URI request syntax. A URI here is an identifier such as https://example.com/auth?....

The application must implement a redirect URI to which the user returns after authentication. Without a correctly implemented redirect URI, the application cannot receive the provider's callback and response containing information such as smart account addresses.

The application must perform two operations.

  • Redirect the user to the provider's URI with the required query parameters.
  • Prepare a redirect_uri as the provider's return destination and receive the response there.

Available Routes

ERC7555 defines two routes (endpoints) that a provider must support at minimum.

Route Purpose
/auth/ Authenticate a user and obtain information (credentials) concerning their smart account.
/sendTransaction/ Request a user's transaction signature. It is a convenience route for combining authentication and plugin registration in one redirect.

/sendTransaction/ is intended to combine authentication and transaction signing instead of handling /auth/ and transaction submission separately.

Schema

ERC7555 also specifies the format for returning smart account addresses.

smart_account_address must be returned in CAIP10 format.

For more on CAIP10, see the following article.

[CAIP10] Managing Blockchain Accounts Through a Common Identifier

CAIP10 is a standard format for representing blockchain addresses together with chain information. For example, it represents a chain ID and an address as a single string such as eip155:1:0x1234.... This makes it easier to uniquely identify an address on a particular chain.

Auth Route

The Auth route authenticates a user and obtains their associated smart account address.

Request Schema

text
parameters:
  - in: query
    name: redirect_uri
    schema:
      type: string
    description: The uri that the provider should redirect back to.

  - in: query
    name: chain_id
    schema:
      type: string
    description: The chain_id of a given network.

The parameters are as follows.

Parameter Description
redirect_uri The URI to which the provider redirects the user after authentication. It serves as the application's callback endpoint.
chain_id A string representing the target network's chain ID. Use 1 for Ethereum mainnet or the relevant ID for another chain or testnet.

The chain ID is a numeric identifier uniquely identifying a blockchain network, passed as a string.

Response Schema

The Auth route response is also defined using query parameters.

text
parameters:
  - in: query
    name: smart_account_address
    schema:
      type: string
    description: The on-chain address for a given smart account, formatted using CAIP-10

The response contains the following information.

Parameter Description
smart_account_address The on-chain address of the target smart account, represented in CAIP10 format as a string combining the chain identifier and address.

Request Syntax

A request URI for the Auth route uses the following syntax.

text
https://<PROVIDER_DOMAIN>/auth/?
    redirect_uri=<YOUR_REDIRECT_URI>
    &chain_id=<CHAIN_ID>

<PROVIDER_DOMAIN> contains the provider's base URL, with redirect_uri and chain_id supplied as query parameters. The application redirects the user to this URL to reach the provider's authentication interface.

Response Syntax

After authentication, the provider redirects the user to the application's redirect_uri in the following format.

text
https://<YOUR_REDIRECT_URI>/auth/?
    smart_account_address=<SMART_ACCOUNT_ADDRESS>

The application reads the smart_account_address query parameter attached to its redirect_uri to obtain the smart account address associated with the authenticated user (in CAIP10 format).

The sendTransaction Route

The sendTransaction route is used to sign and submit a transaction using the user's smart account. Like the Auth route, it also returns the smart account address.

Request Schema

The specification defines the request as follows.

text
parameters:
  - in: query
    name: redirect_uri
    schema:
      type: string
    description: The uri that the provider should redirect back to.

  - in: query
    name: chain_id
    schema:
      type: string
    description: The chain_id of a given network.

  - in: query
    name: transaction
    schema:
      type: string
    description: The RLP encoded transaction that needs to be signed

The parameters have the following meanings.

Parameter Description
redirect_uri The URI to which the provider returns after transaction processing.
chain_id A string representing the ID of the chain to which the transaction is submitted.
transaction A string containing the RLP-encoded transaction to sign. RLP (Recursive Length Prefix) is a standard Ethereum encoding method for converting data such as transactions into byte sequences.

The application constructs the transaction, encodes it using RLP, and passes it in the transaction parameter.

Response Schema

The sendTransaction response includes the smart account address and transaction hash.

text
parameters:
  - in: query
    name: smart_account_address
    schema:
      type: string
    description: The on-chain address for a given smart account, formatted using CAIP-10

  - in: query
    name: tx_hash
    schema:
      type: string
    description: The hash of the transaction

The returned information is as follows.

Parameter Description
smart_account_address The address of the smart account that executed the transaction, returned in CAIP10 format.
tx_hash The hash of the transaction actually submitted to the network, used to track the transaction and check its status through a block explorer.

Request Syntax

The request URI for the sendTransaction route is as follows.

text
https://<PROVIDER_DOMAIN>/sendTransaction/?
    redirect_uri=<YOUR_REDIRECT_URI>
    &chain_id=<CHAIN_ID>
    &transaction=<RLP_ENCODED_TRANSACTION>

The application includes the RLP-encoded transaction in transaction and passes it to the provider together with redirect_uri and chain_id.

Response Syntax

After transaction processing, the provider redirects to the application's redirect_uri in the following format.

text
https://<YOUR_REDIRECT_URI>/sendTransaction/?
    smart_account_address=<SMART_ACCOUNT_ADDRESS>
    &tx_hash=<TX_HASH>

The application reads the query parameters to obtain the smart account used to submit the transaction (smart_account_address) and the transaction hash (tx_hash).

Additional Details

Why Use Redirects?

ERC7555 draws on the SSO mechanisms commonly used on the web. With mechanisms such as Google sign-in and OAuth, the client application redirects the user to an authentication service and receives them back after authentication, creating a simple request-response flow.

ERC7555 follows the same approach for interactions between applications and providers.

  • Application to provider: redirect requesting authentication or signing.
  • Provider to application: redirect returning the result.

The interaction consists of these two steps. This supports simple browser-based interactions without requiring complex HTTP sessions or server-side state in the basic flow.

Application Behavior

Initial Request

When an application wants to authenticate a user, it redirects the user to the specified provider. The callback URL (redirect_uri) is the central information passed to the provider, alongside other parameters required by the route.

The intention is to avoid requiring the provider to maintain unnecessary application state and allow its website to operate with a stateless server-side design. Using the supplied redirect_uri, the provider can concentrate on two responsibilities.

  • Authenticate the user.
  • Return the result through redirect_uri.
Processing the Provider Response

When the user is redirected back from the provider, the application parses the URL query parameters and extracts the necessary information.

The original rationale describes the returned information as follows.

  • Signer address
  • Corresponding smart account address

The application can use this information to determine which address represents the user and which smart account to use. The actual response must follow the route schema.

Provider Behavior

When the user reaches the provider's website, for example https://eth-sso.ethereum.org/auth, the provider first parses the redirect URL. Here, the redirect URL means the request URL containing the redirect_uri supplied by the application.

The provider authenticates the user based on the request. The specification does not prescribe an authentication method, provided that a valid public address can be obtained and smart accounts deployed through the provider can be recovered.

For example, passkeys, hardware keys, or MPC wallets may be used. The important point is to obtain the following two items.

  • A public address representing the user, such as an EOA-equivalent address.
  • A smart account deployed through that address, if one exists.

The provider then returns the result to the application's redirect_uri.

Reference Implementation

Choosing Between location.replace and location.href

ERC7555 does not specify whether client-side redirects should use window.location.replace() or window.location.href. The choice is left to the application's user experience design.

  • location.replace() replaces the current history entry, so the browser's Back button does not return to the replaced page.
  • location.href adds a new history entry, allowing the user to return to the previous page using the Back button.

For example, choose location.replace() when returning to an intermediate SSO page would not be useful.

Sample URI Request

The specification provides the following sample request.

text
https://eth-sso.ethereum.org/auth?redirect_uri=http://myapp.com/eth-sso/callback/&chain_id=1

The components of this example have the following meanings.

Component Description
https://eth-sso.ethereum.org/auth The /auth route supplied by the provider.
redirect_uri=http://myapp.com/eth-sso/callback/ Specifies the callback destination after authentication.
chain_id=1 Specifies Ethereum mainnet (chain ID 1).

The application prepares the eth-sso/callback/ path within its own domain (myapp.com in this example) as the endpoint for receiving the response.

Sample Response

The following is an example of a provider response to the application.

text
http://myapp.com/callback/?smart_account_address=0xb...c

The smart_account_address query parameter contains the smart account address associated with the user. The application obtains this address and uses it for subsequent operations, such as displaying balances and submitting transactions, after appropriate verification.

Example Application Logic

The specification provides illustrative JavaScript for the application.

javascript
// https://myapp.com
// User triggered authentication function
function auth() {
    window.location.replace("https://eth-sso.ethereum.org/auth?redirect_uri=myapp.com&chain_id=1/eth-sso/callback/");
};

// App level routing logic (generic router)
route("/eth-sso/callback/", function() {
    let params = (new URL(document.location)).searchParams;
    let smartAccountAddress = params.get("smart_account_address");
});

The logic is summarized below.

Component Description
auth function Invoked when the user presses a sign-in button. It redirects to the provider's /auth route using window.location.replace().
route("/eth-sso/callback/", ...) Handles application routing. When /eth-sso/callback/ is accessed, it executes the callback and parses query parameters using a URL object.
params.get("smart_account_address") Retrieves smart_account_address from the query parameters for use as the smart account address.

This logic allows the application to implement both initiating sign-in and retrieving its result.

Example Provider Logic

Illustrative provider-side code is also provided.

javascript
// eg: https://eth-sso.ethereum.org/auth
route("/eth-sso/callback/", function("/auth") {
    let params = (new URL(document.location)).searchParams;
    let redirectUrl = params.get("redirect_uri");
    // Authenticate the user (eg: with passkeys)
    let address = "...";
    // Get smart account if available
    let smartAccountAddress = getSmartAccount(address);
    window.location.replace(`http://${redirectUrl}/?smart_account_address=${smartAccountAddress}`);
});

The example works as follows.

Step Description
1 The provider's routing logic receives a request to the path corresponding to /auth.
2 Extract query parameters from document.location and retrieve redirect_uri, which contains the application's callback URL.
3 Authenticate the user. The comments describe passkeys as an example for obtaining the authenticated user's address.
4 Call getSmartAccount(address) using the address obtained through authentication to retrieve the user's associated smart account, if one exists.
5 Include smartAccountAddress in the query parameters and redirect to redirectUrl using window.location.replace.

This enables the provider to return information to the application after authentication and smart account recovery.

Security

Address Spoofing and Countermeasures

The specification addresses the concern that users may be able to spoof another person's address. For example, a malicious user could bypass the provider and access redirect_uri directly with an arbitrary smart_account_address parameter.

The following illustrates a manually constructed URL of this kind.

text
http://myapp.com/eth-sso/callback/?smart_account_address=任意のアドレス

If the application assumes that the presence of smart_account_address proves that a response came from the genuine provider, it may incorrectly treat someone else's address as belonging to the attacker.

To address this issue, the specification suggests having users sign a challenge message. A challenge is a message containing a one-time random value or context such as timestamps and client information. It is signed to establish control of the relevant account.

A concrete example is SIWE (Sign-In with Ethereum). SIWE is a protocol for web sign-in using Ethereum signatures, in which users sign a message containing information such as the following.

  • Domain
  • Address
  • Expiration time
  • Nonce (a unique random value)

The server verifies the signature to establish that the signer controls the claimed account.

In the context of ERC7555, combining this signature-based verification with account discovery helps achieve the following properties.

  • Direct access to redirect_uri without valid authentication is rejected.
  • Only users who demonstrate control of the relevant account can claim its address.

Why Redirect URI Wildcards Are Disallowed

The specification disallows wildcard redirect URIs, such as https://myapp.com/*. This is intended to prevent nested open redirect vulnerabilities.

An open redirect vulnerability allows an attacker to manipulate a URL on one website so that it redirects to an arbitrary destination. Attackers can exploit this behavior in the following ways.

  • Make a link appear to point to a legitimate, trusted domain.
  • Redirect the user from that domain to a malicious page, such as a phishing website.

Allowing wildcard redirect URIs can enable the following sequence.

  1. The provider accepts any URI matching https://myapp.com/*.
  2. An attacker uses an open redirect path such as https://myapp.com/redirect?target=malicious-site within the allowed domain to direct the user to a phishing website.
  3. Both the provider and myapp.com initially appear legitimate, but the user ultimately reaches an unsafe site.

If the wildcard-authorized range contains another open redirect endpoint, redirects can be chained and the attack becomes easier.

ERC7555 avoids wildcard redirect URIs to address this problem. The intended approach is to allow only exact paths or a small, predetermined set of fixed URIs.

Citation

Alexander Müller (@alexmmueller), Gregory Markou (@GregTheGreek), Willem Olding (@Wollum), Belma Gutlic (@morrigan), Marin Petrunić (@mpetrunic), Pedro Gomes (@pedrouid), "ERC-7555: Single Sign-On for Account Discovery [DRAFT]," Ethereum Improvement Proposals, no. 7555, November 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7555.

Conclusion

This article covered ERC7555, a proposal for consistently identifying the same user account across applications and domains. I hope you found it useful.

If you have questions, feel free to contact me by direct message on Twitter.

Twitter @cardene777

I also share information on other platforms, so feel free to explore them.