SwappingIntermediate

One-Click Swaps: Approve and Swap in a Single Step

How EIP-5792 batched calls let compatible wallets approve and swap in one confirmation, which wallets support it and what happens when one does not.

ChainBridge ResearchUpdated 4 min read

On this page5 sections

Key takeaways

  • Selling an ERC-20 token normally takes two transactions: an approval, then the swap.
  • EIP-5792 lets a dApp send both calls to the wallet in one request, so you confirm once and they execute together.
  • ChainBridge asks your wallet whether it supports atomic batches and only then offers the one-click flow.
  • If the wallet cannot batch, the swap falls back to two transactions automatically; nothing is lost.
  • Approvals are always for the exact amount, whether batched or not.

Why swaps used to take two steps

An ERC-20 token cannot be pulled from your wallet without permission. Before a router can swap your USDC, you must send an approval transaction that lets it spend a given amount. Only once that approval is mined can the swap transaction go through.

That means two wallet pop-ups, two network fees and a wait in between. It also creates two failure points:

  • The approval lands but you abandon the swap, leaving an allowance open.
  • The price moves while you wait for the approval, and the swap needs a fresh quote.

Selling the network's native coin (ETH on Ethereum or Base, for example) never needs an approval, and neither does a token you have already approved for enough. In those cases the swap is a single transaction anyway.

How EIP-5792 batching works

EIP-5792 is a wallet standard that lets a dApp hand the wallet a list of calls instead of one transaction. It adds three requests:

EIP-5792 wallet requests
RequestWhat it does
wallet_getCapabilitiesThe dApp asks what the wallet supports on a given network, including atomic execution.
wallet_sendCallsThe dApp sends several calls (here: approve, then swap) for one confirmation.
wallet_getCallsStatusThe dApp follows the bundle until it is mined and reads the receipts.

The key property is atomicity. When the wallet executes the calls atomically, they succeed or fail together. A swap that reverts takes its approval with it: no leftover allowance, no half-finished trade.

Without batching: 2 confirmations1. Approve USDCconfirm + gasWaitapproval mined2. Swapconfirm + gasWith EIP-5792 batching: 1 confirmationwallet_sendCallsapprove + swapOne atomic bundleboth calls succeed, or both are rolled back
Two confirmations without batching, one with an EIP-5792 atomic batch.

What you see in ChainBridge

When you open the review screen, ChainBridge builds the exact swap transaction, checks which approvals are still missing and asks your wallet for its capabilities on the current network. The step list then tells you what to expect:

  • Batch supported: one step reads “Approve USDC and swap in one confirmation”, the count above it says 1 confirmation, and the button reads Approve and swap.
  • No batch support: you see “Approve USDC” and “Confirm swap in wallet” as separate steps, and 2 confirmations.
  • Permit2 routes: some routes also need a Permit2 signature, which costs no gas. The count then reads, for example, 1 confirmation + 1 signature. See Permit2 explained.

Before you confirm, the whole sequence is simulated with the approvals included, so a swap that would revert is caught before you sign. After you confirm, ChainBridge waits for your wallet to report the bundle as mined and shows the swap transaction in your history like any other.

When the wallet cannot batch

The one-click flow is an upgrade, not a requirement. ChainBridge falls back to two transactions when:

  1. The wallet does not report atomic support

    If wallet_getCapabilities is missing, fails, or does not list atomic execution for the network, the review screen shows the two-step flow from the start.

  2. The wallet refuses the batch

    Some wallets advertise support but reject a particular bundle, for example on an unsupported network or when you decline an account upgrade. ChainBridge recognises these standard errors and switches to sequential transactions without failing the swap.

  3. The swap is rebuilt after the approval

    In the two-step flow, the swap transaction is rebuilt once the approval is mined, on the same route. If the spender the approval was granted to would change, the swap stops and asks you to retry instead of sending funds to a different contract.

Cancelling in your wallet is not a fallback case: if you reject the request, nothing is sent and you can start again.

Which wallets support it

Support depends on the wallet, its version and sometimes the network, and it changes quickly. Rather than rely on a list, look at the review screen: if it shows one confirmation, your wallet batches on that network.

Wallets that tend to support atomic batches include, for example:

  • Smart-account wallets, where batching is part of how the account works.
  • Regular wallets that have added EIP-5792, sometimes by upgrading your account with EIP-7702 when you first use it. Your wallet will ask before doing that.

Multisig wallets such as Safe have their own way of grouping transactions; see smart contract wallets for what works there. Hardware wallets connected through a software wallet follow that wallet's support.

Put it into practice

Compare 0x, KyberSwap and ParaSwap in one quote, with every route checked before you sign.

Start swapping