ERC-7682 · Draft · ERC · 2024-04-09
ERC-7682: Auxiliary Funds Capability
An EIP-5792 wallet capability that tells apps the wallet can reach funds beyond its onchain balance, so apps stop blocking users on simple balance checks.
What problem does it solve?
Many dapps look up your balance before letting you act. If a DEX sees you hold 50 USDC at your address, it greys out the "Swap 100 USDC" button. That check is wrong for more advanced wallets that can pull funds from elsewhere just in time: an offchain onramp, another account the wallet manages, or a balance on a different chain that can be bridged.
ERC-7682 gives the wallet a standard way to say "I can get more funds than you see onchain", so the app lets the user continue and the wallet sorts out funding.
How it works
The proposal builds on EIP-5792, where apps call wallet_getCapabilities to learn what a wallet supports per chain.
- A wallet with auxiliary funds on a chain returns an
auxiliaryFundsobject withsupported: truefor that chain. - It may add an
assetsarray listing token addresses it can top up. If the array is missing, the app should assume any asset. The native coin is written as0xEeee…EEeE, following ERC-7528. - When an app sees the capability, it SHOULD NOT block actions based on balance checks. The spec deliberately does not say where the funds come from.
There is an optional extension for wallet_sendCalls: the app can attach requiredAssets inside capabilities.auxiliaryFunds, listing each token's address, amount (hex, smallest unit), standard (erc20, erc721 or erc1155) and, for NFTs, a tokenId. This helps the wallet know what to bridge or swap, because calldata alone often doesn't reveal what a transaction will need. Native-asset needs are inferred from each call's value. Supporting the base capability does not imply supporting requiredAssets.
Provisioning (bridging, swapping) happens separately from the call bundle; atomicRequired covers only the calls. Apps track progress with wallet_getCallsStatus. Error codes 5770–5773 cover failed provisioning, unsupported assets, the capability no longer being available, and malformed requiredAssets.
Sample code
Detect the capability and send calls with requiredAssets (plain EIP-1193 provider):
const chainId = "0x2105"; // Base
const caps = await provider.request({
method: "wallet_getCapabilities",
params: [account, [chainId]],
});
const aux = caps?.[chainId]?.auxiliaryFunds;
const skipBalanceCheck = aux?.supported === true;
await provider.request({
method: "wallet_sendCalls",
params: [{
version: "2.0.0",
from: account,
chainId,
atomicRequired: true,
calls: [{ to: vault, data: depositCalldata }],
capabilities: {
auxiliaryFunds: {
optional: true, // wallets without the capability can ignore it
requiredAssets: [
{ address: usdc, amount: "0x5f5e100", standard: "erc20" }, // 100 USDC (6 decimals)
],
},
},
}],
});
Things to know
- Status: Draft. Field names and error codes may still change.
- It is only a hint to the app's UI. Contracts must still check balances onchain, and apps must handle the wallet failing to provision funds.
- Apps should send
requiredAssetsonly when the wallet advertisesauxiliaryFunds, and mark itoptional: truefor compatibility. - Wallets must interpret
amountusing the token's decimals. - Related wallet-RPC work: EIP-5792 (the base
wallet_sendCallsAPI) and ERC-4337 smart accounts, which often back such wallets.