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 explores EIP6963, a proposal that lets users select the correct wallet even when several wallet extensions are installed at the same time.
This article translates, summarizes, and expands on the following specification.
I also cover various EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.
Overview
EIP6963 provides a secure and fair way to discover multiple wallet providers on a web page. Here, a wallet provider is the Ethereum interface that a browser-extension wallet such as MetaMask injects into a web page.
Traditionally, Ethereum-enabled web applications have communicated with wallets through a global object called window.ethereum.
This window.ethereum object is a common interface for exposing the Ethereum Provider defined in EIP1193 to a web page.
For more on EIP1193, see the following article.
[ERC1193] Understanding the Ethereum Provider API
EIP6963 defines an alternative method of wallet discovery that does not depend on window.ethereum.
Specifically, it introduces a bidirectional communication protocol based on JavaScript window events.
This makes it possible to:
- Discover multiple wallet extensions on the same web page.
- Let users explicitly choose which wallet to use.
- Enable Ethereum libraries and wallet extensions to communicate in a standardized way.
In other words, EIP6963 puts the decision about which wallet to use in the hands of the user rather than the extensions.
Motivation
Problems with the current wallet injection mechanism
Browser-extension wallets currently inject the Ethereum provider (EIP1193) directly into window.ethereum.
This approach has a structural problem.
When multiple wallet extensions are installed, they compete with one another.
This is because every wallet attempts to use the same window.ethereum object.
Moreover, the order in which browser extensions load on a web page is not guaranteed. It varies across browsers and environments and is not stable.
As a result:
- There is no control over which wallet takes ownership of
window.ethereum. - The wallet that loads last wins.
- Users may struggle to tell which wallet they are actually using.
This problem is known as a race condition. A race condition occurs when multiple operations compete and the outcome depends on their execution order.
Impact on user experience and new wallets
The problem goes beyond a technical malfunction.
First, it degrades the user experience.
- Even users who want to switch between several wallets may effectively be limited to one.
- A wallet other than the one the user intended may be selected.
- The web application may also struggle to determine which wallet it is connected to.
It also creates a significant barrier for new wallet providers.
- Users may find that they cannot use a wallet without uninstalling another one.
- As a result, established wallets continue to dominate usage.
- New entrants face greater barriers, undermining healthy competition.
Unfair workarounds and lack of interoperability
Some wallet extensions implement their own workarounds to avoid this problem.
Examples include:
- Deliberately delaying provider injection.
- Overwriting an existing
window.ethereumobject.
Neither addresses the underlying problem.
- These approaches tend to exclude other wallets.
- Wallets cannot compete on equal terms.
- Because the approaches are not standardized, they lack interoperability.
Ultimately, the health of the ecosystem suffers.
The solution proposed by EIP6963
EIP6963 was designed to address these problems.
Its central ideas are:
- Avoid reliance on a single
window.ethereumobject. - Let wallets and web applications communicate through window events.
- Discover multiple wallets simultaneously.
- Let users choose their wallet.
The expected improvements are:
| Aspect | Improvement |
|---|---|
| User experience | Users can choose the wallet they want to use. |
| Fairness | All wallets can be discovered under the same conditions. |
| Extensibility | New wallets can enter the ecosystem more easily. |
| Interoperability | Ethereum libraries and extensions can interact through a standard mechanism. |
EIP6963 is intended to make the Ethereum wallet experience safer, fairer, and more extensible. Rather than breaking existing mechanisms, it addresses the problem by enabling coexistence and choice.
Specification
Definitions
The following terms are defined in EIP6963.
Wallet Provider
A user agent that manages the user's keys (private keys) and can execute Ethereum transactions, such as transfers and contract calls. A user agent is software that acts on behalf of the user, such as a browser extension or mobile application.
Decentralized Application (DApp)
A web page that uses Web3 APIs exposed by a wallet, including APIs for connecting to Ethereum. In other words, it is a web application that interacts with Ethereum through a wallet.
Provider Discovery Library
A library or other software that helps a DApp interact with wallets. For example, it can encapsulate the logic for listing discovered wallets and letting the user select one.
Provider information
EIP6963 defines a common format in which each wallet provider introduces itself.
This format is called EIP6963ProviderInfo.
Required fields of EIP6963ProviderInfo
The required fields of EIP6963ProviderInfo are listed below.
EIP6963 requires all of these fields to be present.
| Field | Type | Purpose |
|---|---|---|
uuid |
string | A unique ID that distinguishes otherwise similar providers during the lifetime of the page. |
name |
string | The human-readable wallet name displayed by the DApp. |
icon |
string | A URI pointing to the wallet's icon image. |
rdns |
string | A reverse-DNS string used as a stable identifier. |
Additional properties are allowed. The DApp should ignore any additional properties it does not recognize.
Meaning of uuid
The uuid field must conform to UUIDv4.
UUIDv4 uses a high degree of randomness, making collisions between independently generated IDs unlikely.
This lets the DApp distinguish separate providers even if their metadata looks similar.
The important point is that multiple EIP-1193 provider sessions with similar information can be distinguished while the same page is open (during its lifetime).
Meaning of name
This is a local alias for display to the user. The specification gives Example Wallet Extension as an example. It is intended for use in the DApp's wallet selection UI.
Meaning of icon
This is a URI pointing to an image. Additional constraints are described in Images/Icons below.
Meaning and limitations of rdns
The rdns field is a reverse-DNS identifier. It lists domain components in reverse order, as in com.example.subdomain.
The wallet must provide this value.
However, the value is self-attested. Like a browser user-agent string, it may have any of the following problems, as the specification explicitly notes:
- The value may be unknown.
- The format may be invalid.
- The value may be incorrect.
- The value may impersonate another wallet.
DApps should therefore handle these failure cases without substantially impairing their functionality.
Interface definition
/**
* Represents the assets needed to display a wallet
*/
interface EIP6963ProviderInfo {
uuid: string;
name: string;
icon: string;
rdns: string;
}Images/Icons
EIP6963 uses URI-encoded images for wallet icons. This allows different ways of representing images, such as data URIs, rather than limiting retrieval to HTTP.
The specification gives examples of SVG and PNG data URIs.
# svg (data uri)
data:image/svg+xml,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" viewBox="0 0 32 32"><circle fill="red" cx="16" cy="16" r="12"/></svg>
# png (data uri)
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==Requirements for icon
- The
iconfield must be a data URI as defined in RFC-2397. A data URI embeds the image data itself as a string. - Images should be square, with a recommended minimum size of 96x96px.
- A lossless format or vector image, such as PNG, WebP, or SVG, is recommended. Lossless compression reduces size without degrading image quality.
SVG security requirements
SVG may contain executable JavaScript.
Applications and libraries must therefore render SVG using an <img> tag.
This prevents untrusted JavaScript from executing.
RDNS (reverse DNS)
The rdns field is intended to provide a stable identifier across sessions.
Reverse-DNS notation is used to avoid name collisions, where different parties use the same identifier.
The format is broadly as follows:
- Start with the domain controlled by the provider, in reverse order.
- Append a subdomain, product name, or similar component.
Example: com.example.MyBrowserWallet
Requirements for rdns
The requirements in the specification can be summarized as follows.
| Requirement | Level | Description |
|---|---|---|
rdns must be a valid domain name under RFC-1034. |
MUST | It must be syntactically valid as a domain name. |
| The DNS portion of rdns should be a valid domain controlled by the provider. | SHOULD | This is recommended but not mandatory. |
| A DApp may reject providers that do not follow the reverse-DNS convention. | MAY | The DApp is permitted to reject them. |
A DApp should not use rdns for feature detection. |
SHOULD NOT | This is unsafe because the value is self-attested and can be spoofed. |
| Feature discovery and verification are out of scope. | - | EIP6963 does not address them. |
Provider details
In EIP6963, a wallet announces both its metadata and the actual provider object together.
The format for this is EIP6963ProviderDetail.
The required structure is:
info:EIP6963ProviderInfoprovider:EIP1193Provideras defined by EIP-1193
The interface is shown below.
interface EIP6963ProviderDetail {
info: EIP6963ProviderInfo;
provider: EIP1193Provider;
}Window events
To avoid competition over window.ethereum, EIP6963 defines a discovery protocol using window events.
The assumption is that there is no guarantee about whether the DApp or wallet extension code executes first. The events are therefore designed so that discovery can succeed despite a race condition.
The following APIs are used for sending and receiving events:
- Send:
window.dispatchEvent - Receive:
window.addEventListener
Announce and request events
EIP6963 uses two event types.
- Wallet → DApp:
eip6963:announceProvider - DApp → Wallet:
eip6963:requestProvider
These create a bidirectional discovery mechanism, allowing the two sides to find each other regardless of which executes first.
announceProvider (wallet announcement event)
EIP6963AnnounceProviderEvent must be a CustomEvent.
Its type is fixed to "eip6963:announceProvider", and its detail contains an EIP6963ProviderDetail.
The detail object should also be frozen with Object.freeze().
Freezing prevents subsequent modification of the object, helping preserve the integrity of the announced information.
// Announce Event dispatched by a Wallet
interface EIP6963AnnounceProviderEvent extends CustomEvent {
type: "eip6963:announceProvider";
detail: EIP6963ProviderDetail;
}requestProvider (DApp discovery event)
EIP6963RequestProviderEvent is an Event whose type is fixed to "eip6963:requestProvider".
// Request Event dispatched by a DApp
interface EIP6963RequestProviderEvent extends Event {
type: "eip6963:requestProvider";
}Required wallet behavior
EIP6963 requires wallets to do the following.
- Send
eip6963:announceProviderwithwindow.dispatchEvent(). - Listen for
eip6963:requestProviderusingwindow.addEventListener(). - When a request arrives, send another
announceevent.
The third step is important. Even if the wallet announces before the DApp installs its event listener, the DApp can send a request and receive another announcement, reducing the risk of missing the wallet.
This removes the need to pollute window.ethereum and compete to overwrite it, avoiding unstable wallet selection.
The wallet-side example is shown below.
let info: EIP6963ProviderInfo;
let provider: EIP1193Provider;
const announceEvent: EIP6963AnnounceProviderEvent = new CustomEvent(
"eip6963:announceProvider",
{ detail: Object.freeze({ info, provider }) }
);
// The Wallet dispatches an announce event which is heard by
// the DApp code that had run earlier
window.dispatchEvent(announceEvent);
// The Wallet listens to the request events which may be
// dispatched later and re-dispatches the `EIP6963AnnounceProviderEvent`
window.addEventListener("eip6963:requestProvider", () => {
window.dispatchEvent(announceEvent);
});Required DApp behavior
DApps must do the following.
- Listen for
eip6963:announceProviderusingwindow.addEventListener(). - Keep that event listener registered for the lifetime of the page.
- After installing the listener, send
eip6963:requestProviderusingwindow.dispatchEvent().
The specification explicitly says for the lifetime of the page so that the DApp can continue to handle late-loading wallets and repeated announcements, not just those received immediately after the initial page load.
The DApp-side example is shown below.
// The DApp listens to announced providers
window.addEventListener(
"eip6963:announceProvider",
(event: EIP6963AnnounceProviderEvent) => {}
);
// The DApp dispatches a request event which will be heard by
// Wallets' code that had run earlier
window.dispatchEvent(new Event("eip6963:requestProvider"));Handling multiple wallets and rediscovery
EIP6963 allows a DApp to retain multiple EIP6963ProviderDetail objects.
If the user wants to switch to a different wallet later, the DApp can immediately redirect transaction requests to that wallet.
The DApp may also send another eip6963:requestProvider event when it needs to repeat discovery.
It may then discover a different set of wallets.
How the event design handles race conditions
The event structure of EIP6963 allows eventual wallet discovery in either of the following cases:
- The wallet executes first (
announceis sent first). - The DApp executes first (the
announce listeneris installed first).
The DApp always sends a request when it starts, and the wallet always re-sends announce when it receives a request, allowing them to discover each other regardless of execution order.
The following diagram illustrates the flow. The original diagram retains its Japanese labels.
sequenceDiagram participant Wallet as Wallet(拡張) participant DApp as DApp(Webページ) rect rgb(245,245,245) note over Wallet,DApp: どちらが先に動くか不定 end DApp->>DApp: announceProvider のリスナーを登録 DApp->>Wallet: requestProvider を dispatch Wallet->>DApp: announceProvider を dispatch(info + provider) DApp->>DApp: 受け取った provider を保存・UIに表示 Wallet-->>Wallet: requestProvider を監視し続ける DApp-->>DApp: announceProvider を監視し続ける
Rationale
Earlier approaches relied on a single global object, such as window.ethereum, to discover wallets.
Because multiple extensions write to the same location, however, they can easily overwrite one another and produce unstable results.
EIP6963 uses an event-based approach primarily to avoid the following problems.
The first is race conditions. There is no guarantee whether the wallet extension or the DApp executes first, so information from the side that executes first may be missed.
The second is namespace collisions.
Multiple extensions compete for the same window.ethereum object, making which wallet is active unpredictable.
Another aim is to avoid pollution attacks.
These attacks insert unintended values or fake implementations into a shared object (in this case, window.ethereum), disrupting the behavior of other code or causing it to malfunction.
Shared, mutable objects are particularly susceptible to this type of attack.
The event-based mechanism does not require the parties to compete over a shared object. Instead, the DApp and wallet communicate by sending events to each other. The events create a bidirectional channel through which the parties can repeat discovery and announcements whenever necessary, allowing them to respond to changing circumstances over time.
The event names follow JavaScript event naming conventions.
Specifically, they use present-tense verbs such as announce and request, with the eip6963: prefix.
This prevents collisions with event names used for other purposes.
Interfaces
Why ProviderInfo is standardized
EIP6963 standardizes EIP6963ProviderInfo so that a DApp can build a wallet selection UI for its users.
With the information required for the selection screen, such as the wallet name (name) and icon (icon), the DApp can display a list of wallets in a human-readable form.
This is particularly important for DApps that use libraries that automatically generate wallet selection modals, such as Web3Modal, RainbowKit, Web3-Onboard, and ConnectKit. The more complete the wallet metadata, the better these libraries can present the wallet list and selection experience.
Why ProviderDetail leaves EIP1193 unchanged
EIP6963 uses EIP6963ProviderDetail for wallet announcements.
It combines info (display metadata) with provider (the actual provider object).
Crucially, EIP1193's provider is reused as the type of provider without changing EIP1193 itself.
The reason is to preserve backward compatibility so that older DApps do not break.
This structure enables the following:
- EIP6963-compatible DApps can connect to EIP6963-compatible wallets through events.
- EIP6963-compatible wallets can still inject an EIP1193 provider into
window.ethereumto support older DApps.
The specification also notes a limitation.
When an older DApp is used, or when even an EIP6963-compatible DApp connects to an older wallet, selecting the correct wallet cannot be guaranteed if multiple wallets coexist.
Combinations that cannot use event-based selection still face the problem of competition over window.ethereum.
Backward compatibility
EIP6963 does not require window.ethereum to be replaced.
It therefore does not introduce a change that immediately breaks existing applications.
DApps that cannot be updated can continue to operate.
The specification is nevertheless quite explicit about recommended practices.
Recommendations for DApps
DApps are encouraged to implement EIP6963. This enables discovery of multiple wallets and lets users choose between them.
DApps should also disable use of window.ethereum by default, relying on it only as a fallback if EIP6963 discovery fails.
A fallback is an alternative mechanism.
In other words, the DApp should rely on window.ethereum only if event-based discovery is unsuccessful.
Recommendations for wallets
Wallets should also maintain compatibility with window.ethereum.
Many DApps do not yet support EIP6963, and removing compatibility would leave users unable to access more sites.
However, injecting window.ethereum directly brings back the old namespace collision problem.
The specification therefore also recommends the following approach for wallets.
- First, inject the provider into a wallet-specific namespace, for example
window.<walletSpecific>. - Expose that object through
window.ethereumusing a proxy.
A proxy is an intermediary.
Instead of competing directly for the same object, the wallet keeps its own namespace as the source of truth and exposes window.ethereum for compatibility.
Summary of recommended practices
| Party | Recommendation | Goal |
|---|---|---|
| DApp | Implement EIP6963. | Enable discovery and selection of multiple wallets. |
| DApp | Use window.ethereum only when discovery fails. |
Avoid conflicts and instability. |
| Wallet | Maintain compatibility with window.ethereum. |
Support DApps that have not adopted the standard. |
| Wallet | Inject into its own namespace and proxy to window.ethereum. |
Reduce namespace collisions. |
Further explanation: why execution order does not matter
The design of EIP6963 explicitly accounts for the fact that either the DApp or the wallet may execute first.
Repeated announcements are built into the mechanism. If the DApp starts later, it can send a request to discover wallets; if a wallet starts later, it can send an announce to be discovered.
This property explains why the parties can be re-orchestrated over time.
The original sequence diagram retains its Japanese labels.
sequenceDiagram participant Wallet as Wallet(拡張) participant DApp as DApp(Webページ) note over Wallet,DApp: 実行順が不定でも成立させる DApp->>DApp: announceProvider のリスナー登録 DApp->>Wallet: requestProvider を dispatch Wallet->>DApp: announceProvider を dispatch(再通知も含む) DApp->>DApp: 候補を保存してユーザーに選ばせる
Reference implementation
Wallet Provider
The following is a reference implementation of a script injected by a wallet provider to support the new interface alongside the existing pattern.
function onPageLoad() {
let provider: EIP1193Provider;
window.ethereum = provider;
function announceProvider() {
const info: EIP6963ProviderInfo = {
uuid: "350670db-19fa-4704-a166-e52e178b59d2",
name: "Example Wallet",
icon: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>",
rdns: "com.example.wallet"
};
window.dispatchEvent(
new CustomEvent("eip6963:announceProvider", {
detail: Object.freeze({ info, provider }),
})
);
}
window.addEventListener(
"eip6963:requestProvider",
(event: EIP6963RequestProviderEvent) => {
announceProvider();
}
);
announceProvider();
}DApp reference implementation
The following DApp reference implementation displays and tracks multiple wallet providers injected by browser extensions.
const providers: EIP6963ProviderDetail[];
function onPageLoad() {
window.addEventListener(
"eip6963:announceProvider",
(event: EIP6963AnnounceProviderEvent) => {
providers.push(event.detail);
}
);
window.dispatchEvent(new Event("eip6963:requestProvider"));
}Security considerations
EIP1193 security considerations
Implementers of EIP6963 (DApps, wallets, and libraries) must understand the threats and considerations covered by EIP1193.
Implementers are also expected to consider and follow the guidance provided by the wallet provider they use. Wallets can differ in implementation details and recommended connection or signing flows, so reading EIP1193 alone is not sufficient.
Prototype pollution of wallet provider objects
Browser extensions, including wallet extensions, can modify the contents of a web page by design. For the same reason, the contents of the provider object supplied by a wallet can be modified by the page or other extensions.
The provider object is regarded as a highly trusted interface because it exchanges transaction data such as recipients, amounts, and contract call details. If it is modified unexpectedly, communication between the DApp and wallet may be altered in unforeseen ways.
The recommended best practice is:
- Before sending
eip6963:announceProvider, the wallet freezes its EIP1193 provider object withObject.freeze(). Freezing prevents properties from being added or modified later.
There is a practical difficulty, however. For web compatibility, the page may need to monkey-patch the provider object.
Monkey-patching means replacing an existing object or function after its creation to change its behavior. It is commonly used for compatibility with older sites, instrumentation, and wrapping. Freezing the object prevents such modifications.
Wallet implementers must therefore consider the trade-off between security and web compatibility, as the specification notes.
The trade-off can be summarized as follows.
| Goal | Mechanism | Benefit | Potential drawback |
|---|---|---|---|
| Prevent provider modification | Object.freeze(provider) |
Greater resistance to unexpected modifications. | Compatibility-related monkey-patching may no longer be possible. |
Wallet impersonation and tampering
The specification also notes that a page or another extension may interfere with other wallets or impersonate one. DApps are therefore expected to actively detect malicious behavior, such as modifications to properties or functions.
One example of a detection method is a comparison of uuid values.
Specifically, if two EIP6963ProviderInfo objects have the same uuid, this can be an indication that something may be wrong.
However, a uuid check alone is not stated to be sufficient.
DApps and discovery libraries should also account for other ways in which EIP6963ProviderInfo might be tampered with and consider additional safeguards.
The specification leaves the choice of safeguards open to implementers.
Preventing JavaScript execution in SVG images
Supporting SVG as an icon format is useful, but SVG can contain JavaScript code. That JavaScript may execute in the context of the page and modify its content or other wallet-related elements. This is a risk comparable to XSS (cross-site scripting).
When rendering icons, DApps must account for this risk and take measures to ensure malicious images cannot be used as a means of concealing page tampering (an obfuscation tool).
As noted earlier in the specification, the requirement to render SVG with an <img> tag is closely related to this risk.
Embedding SVG through mechanisms such as innerHTML can expose the page to unsafe execution paths for scripts in the SVG.
The following is an example of a safer way to render an icon on the DApp side.
<!-- SVG icon は <img> で描画する -->
<img alt="wallet icon" src="data:image/svg+xml,..." />Preventing wallet fingerprinting
Fingerprinting is a technique for identifying a user's environment.
Here, the issue is that whether window.ethereum is injected and which wallets are installed can become signals used to identify a user.
The event loop design of EIP6963 has the advantage of working whether the DApp or the wallet initiates communication. This lets wallet implementers reconsider whether to announce the wallet's presence to every page by default.
The specification gives the following examples of alternative approaches.
- Delay injection of the provider object until the DApp sends
eip6963:requestProvider. - When the request is received, use a UI to ask the user for consent to share their address.
- This allows wallets to offer features such as private connect.
Private connect is an approach in which the wallet does not reveal its presence or address as soon as a page opens and instead discloses it only when the user explicitly grants permission.
There is still a caveat to this approach.
Wallets must consider how to maintain backward compatibility with DApps that do not support EIP6963.
Simply removing window.ethereum entirely in order to increase fingerprinting resistance may break older DApps.
The following diagram illustrates the flow. The original Japanese labels have been retained.
sequenceDiagram
participant DApp as DApp
participant Wallet as Wallet(拡張)
participant User as User
DApp->>Wallet: eip6963:requestProvider
Wallet->>User: アドレス共有の同意UIを表示
User-->>Wallet: 同意 / 拒否
alt 同意
Wallet->>DApp: eip6963:announceProvider(providerを通知)
else 拒否
Wallet-->>DApp: 何も通知しない、または限定的に通知
end
note over Wallet: ただし非対応DApp向け互換性も検討が必要
Citation
Pedro Gomes (@pedrouid), Kosala Hemachandra (@kvhnuke), Richard Moore (@ricmoo), Gregory Markou (@GregTheGreek), Kyle Den Hartog (@kdenhartog), Glitch (@glitch-txs), Jake Moxey (@jxom), Pierre Bertet (@bpierre), Darryl Yeo (@darrylyeo), Yaroslav Sergievsky (@everdimension), "EIP-6963: Multi Injected Provider Discovery," Ethereum Improvement Proposals, no. 6963, May 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6963.
Conclusion
This article covered EIP6963, a proposal for enabling users to select the correct wallet even when multiple wallet extensions coexist. I hope you found it useful.
If you have questions, feel free to send me a direct message on Twitter.
I also publish content on the following platforms, so feel free to take a look.



