ERC-7946 Unidirectional Wallet Uplink (UWULink) (Unidirectional Wallet Uplink aka UWULink)
Draft · Accounts & wallets · created 2025-05-10
A one-way communication standard that lets a dApp bundle multiple contract calls into a single transaction request via QR code or NFC, without connecting to the wallet or revealing the user's address.
Why it is needed
Previously, for a dApp to interact with a wallet it first had to establish a connection (eth_requestAccounts, etc.) to learn the user's address, and multi-step operations like token approval plus swap each required a separate signature. Session-based connections like WalletConnect route through a relay server, making them heavy and overkill for one-off interactions. Also, existing URI schemes such as EIP-681 represent addresses and calldata in hexadecimal, so the payload quickly grows too large for a QR code. As a result, users had to expose their wallet and approve multiple times for every interaction, and in offline settings like posters or POS terminals where no connection is possible, there was no way to request a complex transaction at all.
What to implement
message UWULinkRequest { uint64 chain_id = 1; // EIP-155 chain ID for the target chain oneof request_type { Batch batch = 2; ResolverReference resolver = 3; } }: The top-level message wrapping the entire request, containing the target chain ID and either a static batch or a resolver reference.message Batch { repeated Call calls = 1; }: The message holding the list of calls to execute in static mode.message Call { bytes to = 1; // 20-byte address of target contract optional bytes value = 2; // (optional) up to 32-byte big-endian ETH value optional bytes data = 3; // (optional) calldata for the call }: Defines an individual contract call consisting of a target address, an ETH value, and calldata.message ResolverReference { bytes resolver_address = 1; // 20-byte address of resolver contract bytes resolver_data = 2; // opaque data to pass to resolver }: Holds the resolver contract address and the data to pass in order to generate the call list in programmable mode.function getCalls(address requester, bytes calldata data) external returns (Call[] memory calls);: Takes the requester's address and data and returns the computed array of calls to execute.function getErrorCodeDetails(uint256 errorCode) external returns (string memory information);: Returns a description string for an error code. It is meant for developer debugging rather than for display to the user.error CallGenerationFailure(uint256 errorCode);: The error raised, together with a resolver-specific error code, when generating the call list fails.
In depth
One-way communication structure
UWULink is a one-way protocol in which information flows only from the dApp to the wallet. The wallet merely receives and processes the request; it sends no data back to the dApp. With no handshake or connection session, the dApp has no way of knowing the user's address or wallet type. The request is delivered only through methods the user initiates themselves, such as scanning a QR code or tapping an NFC tag, and if the request is malformed or unsupported the wallet simply needs to notify the user and decline it.
Binary encoding and URI scheme
The request is serialized using a Protocol Buffers v3 schema, base64-encoded, and delivered as a URI in the form uwulink:<base64>. This allows a much more compact representation than the existing hexadecimal-based approach (EIP-681) on capacity-constrained channels like QR/NFC. When placing the base64 output into a URI, characters such as + and / can be percent-encoded, or a URL-safe base64 variant can be used; after decoding, the data must always conform to the fixed protobuf schema.
Static mode: Batch and Call
In static mode, the request directly contains the list of calls to execute (Batch). Each Call consists of a target address (to, 20 bytes), an optional ETH value (value, up to 32 bytes big-endian with leading zeros omitted), and optional calldata (data). The wallet must reject the message if to or resolver_address is not exactly 20 bytes, and must interpret an empty value as 0.
Programmable mode and the UWUResolver interface
In programmable mode, instead of a call list, the request contains only a resolver contract address and resolver_data. The wallet executes getCalls(requester, data) on resolver_address via eth_call with from=address(0) to obtain the array of calls. The wallet's own address is passed as requester so the resolver can produce different results per user, but this address is exposed only to the RPC server the wallet uses, not to the dApp. If the call fails, the wallet must abort the request and inform the user that generation failed. The resulting calls are displayed to the user and approved in exactly the same way as in static mode.
Atomic execution and chain identification
All calls contained in a request must execute atomically. If any one is reverted, the entire batch is reverted. The request includes a chain_id, which the wallet uses to confirm or switch to the target chain. If the wallet does not support that chain, it must reject the request. This is similar to how chainId is handled in EIP-681 URIs.
Backward compatibility
UWULink is an additive protocol that does not break existing standards. A wallet that does not recognize the uwulink: scheme can simply ignore it or show an error, and there is no risk of confusion with EIP-681 QR codes. Under proto3 rules, receivers ignore unknown fields, so adding optional fields such as expiration_timestamp or origin in the future will not prevent existing wallets from processing the core request as before. A dApp can offer UWULink alongside existing wallet connection methods at the same time.
Proposal status
This ERC is currently in Draft status. The Rationale section and reference implementation have not yet been written, and the example encoding values given are for conceptual illustration only, not actual values. Accordingly, the message schema and resolver interface may still change, or discussion of them may stall.
Things to watch out for
- Phishing QR/NFC requests: A malicious party could present a convincing-looking UWULink QR code, and if the user approves it as is, it could result in a fund transfer or token approval. The wallet must display known addresses' names or ENS, function signatures, value sizes, and the like in human-readable form.
- Trust in the resolver contract: In programmable mode, the user ends up trusting the calls generated by the resolver contract. The wallet must display the calls returned by the resolver to the user in exactly the same way as in static mode. A malicious resolver could return a call that sends all of the user's ETH to an attacker regardless of the input.
- Wasted gas from requests that always revert: Wherever possible, wallets should simulate the batch in advance to detect reverts beforehand. A batch crafted to always revert by including an incompatible call can waste the user's gas.
- Denial of service from oversized payloads: Wallets should impose size limits and also limit the gas supplied to resolver calls. An excessively large UWULink payload, or an excessively large result returned by a resolver, could freeze the wallet app.
- Requests of unknown origin: As with hardware wallets, the user must review and trust every request individually. Requests delivered via QR/NFC carry no origin information such as a domain, so the wallet cannot apply an allowlist or blocklist.