ByAUJay
Smart Account UX: Batched Transactions That Don’t Break Composability
Summary: With EIP-7702 live on Ethereum (May 7, 2025) and ERC‑4337 widely deployed, you can deliver one‑click “approve + swap + stake” experiences without sacrificing the open, programmable composability that made Ethereum valuable. This guide shows exactly how—covering the right standards, contract patterns, infra choices, and security guardrails that keep your batches atomic, indexable, and interoperable. (blog.ethereum.org)
Who this is for
Decision‑makers at startups and enterprises evaluating blockchain UX: you want fewer clicks and support tickets, but you won’t trade away auditability, protocol compatibility, or vendor neutrality.
The crux: batch UX without killing composability
“Composability” isn’t abstract—it’s the day‑to‑day ability for other protocols, wallets, indexers, and analytics to interact with, replay, and build upon your users’ actions. Batch UX can erode this if you:
- hide critical steps off‑chain (no on‑chain events/receipts),
- rely on delegatecall‑heavy routers that obscure msg.sender or collapse event provenance,
- or ship custom meta‑protocols that no one else can compose with.
Your target state:
- Atomic, on‑chain sequences of normal external calls (CALL), each emitting the protocol’s native events.
- Standard interfaces for signatures (ERC‑1271/6492), approvals (Permit2), and account logic (ERC‑4337/7702), so other tools can understand and interoperate. (eips.ethereum.org)
Where we are now: the two production rails for batched UX
1) EIP‑7702 smart EOAs (Pectra, mainnet May 7, 2025)
EIP‑7702 adds a “set code” transaction type (type 0x04) so an EOA can temporarily delegate to smart‑wallet code for that transaction—then revert to normal. The spec is built around three UX primitives you care about: batching, sponsorship, and privilege de‑escalation. It defines an authorization_list with a measurable per‑auth gas cost (
PER_AUTH_BASE_COST = 12,500) and is designed to be forward‑compatible with AA. Tooling and clients shipped in the Pectra upgrade. (eips.ethereum.org)
What this means in practice:
- Your users keep their familiar address while getting one‑click flows (e.g., approve→swap→stake in one tx).
- You can support gas sponsorship patterns at the protocol level (e.g., operator pays gas, user pays in tokens inside the flow). (eips.ethereum.org)
2) ERC‑4337 smart accounts (live since 2023, mature in 2025)
ERC‑4337 introduces UserOperations, a dedicated mempool, and an EntryPoint contract. Bundlers collect userOps, simulate, then submit an on‑chain bundle via EntryPoint. It unlocks batch execution, modular validation, session keys, and paymasters for gas sponsorship—today, across many L2s. EntryPoint v0.7 is the widely supported baseline; v0.8 is emerging. Canonical addresses: v0.7 at 0x0000000071727De22E5E9d8BAf0edAc6f37da032; v0.6 at 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789. (docs.erc4337.io)
Good to know:
- Bundlers are real infra with SLAs and features (MEV protection, history, webhooks). Alchemy’s Rundler (Rust) and others run at production scale. If you sponsor gas via their Gas Manager, budget roughly $0.001575 per userOp API plus ~8% of sponsored gas as of their current docs. (github.com)
You can mix them
ERC‑4337 stacks can relay 7702 transactions through the userOp mempool for censorship resistance—so product teams can adopt both paths as needed, behind a single UX. (docs.erc4337.io)
Composability‑preserving batching: the patterns that work
Below are field‑tested patterns we use at 7Block Labs to keep batches atomic, analyzable, and interoperable.
Pattern A — One‑click ERC‑20 approve + swap (Permit2 + CALLs)
- Pre‑approve the universal Permit2 contract (canonical address 0x000000000022D473030F116dDEE9F6B43aC78BA3) once; afterwards, use signature‑based approvals and transfers in your batch. This cuts an approval tx and standardizes allowances across dApps. (docs.uniswap.org)
- In your batch, do explicit CALLs to DEX/router contracts (e.g., Uniswap’s Universal Router or your chosen AMM) so Transfer/Swap events are emitted by the target protocols—no custom wrappers that swallow events. (docs.base.org)
- Why this preserves composability: indexers pick up the protocol’s native events; risk scanners can reason about allowances; other integrations don’t need to learn your wrapper. Permit2 supports batch approvals/transfers and witness data for extra integrity. (docs.uniswap.org)
Practical detail: many ecosystems hardcode Permit2’s address (same across chains), which simplifies audits and allows lists. Validate you’re using the canonical deployment for your chain. (0x.org)
Pattern B — Multi‑call execution, not delegatecall
- If you’re using a “multisend/multicall” helper, prefer Safe’s MultiSendCallOnly (no delegatecall) when possible; reserve delegatecall for carefully reviewed modules. Delegatecall can obscure msg.sender and blur storage/context, complicating audits and composability. (medium.com)
- Safe’s production tooling supports batch execution and gives you guardrails (module guards) to set global security policies for modules. (safe.global)
Pattern C — Gas sponsorship without bespoke relayers
- Use ERC‑4337 Paymasters (Verifying or ERC‑20) and stick to ERC‑7562 validation scope rules so your ops propagate reliably in the canonical mempool. Ensure your paymaster is staked and the deposit covers the maximum collective gas for the bundle at current prices. (eips.ethereum.org)
- This keeps sponsorship standardized and composable; other wallets and tools already know how to read paymaster data. (alchemy.com)
Pattern D — Session keys for repeated flows (with on‑chain limits)
- Install session key plugins (ERC‑6900/7579 module ecosystems exist) with explicit allowlists, time windows, per‑token spending caps, and gas/payer constraints. This removes repetitive confirmations while retaining on‑chain enforceability. Enforce gas spend limits or a required paymaster address to avoid drain risk. (eips.ethereum.org)
Pattern E — MEV‑protected submission that still lands on‑chain cleanly
- Route the final transaction (7702 or the 4337 bundle tx) via MEV‑aware endpoints (e.g., Flashbots Protect) to avoid sandwiches and failed‑tx gas burn; events still hit L1/L2 normally, preserving composability for downstream systems. (docs.flashbots.net)
A concrete example: “Approve + Swap + Stake” in one click
Goal: from USDC to a staked LP or savings position in one atomic batch.
- Account model:
- On L1: use EIP‑7702 so the user’s EOA “acts like” a smart wallet for this tx.
- On L2: use an ERC‑4337 smart account with EntryPoint v0.7 for best infra support. (eips.ethereum.org)
- Sequence (same‑chain):
- Permit2 signature for USDC spending (no on‑chain approval if already max‑approved).
- CALL Uniswap Router (or aggregator) to swap USDC→target asset (events emitted by router/pools).
- CALL target protocol’s deposit/stake function (emits deposit/stake events).
- Optional: emit your own “BatchCompleted” event with pointers only (no custom state). (docs.uniswap.org)
- Gas notes:
- You pay the base transaction cost once (21,000) instead of multiple times; each internal call adds its own compute/log costs, but you avoid repeated base overhead across N separate txs. Safe’s public docs show typical multisend totals and reinforce the base‑cost consolidation. (help.safe.global)
- Sponsorship:
- If your app sponsors gas, attach a Verifying Paymaster policy (4337) tied to allowlisted targets and amounts; deposit enough to cover worst‑case gas at current maxFeePerGas or your ops will be throttled/banned by reputation logic. (eips.ethereum.org)
- Submission:
- Send via Flashbots Protect RPC (or a bundler that integrates private submission) for MEV protection; you still get normal on‑chain events, and failed flows don’t cost gas. (docs.flashbots.net)
What about “approve + swap + bridge + deposit”? Cross‑chain atomicity is not natively supported across rollups; you must orchestrate two or more transactions with verifiable hand‑offs. State‑of‑the‑art research like CRATE proposes secure cross‑rollup atomic execution, but it’s not a standard you can depend on yet. In production today, treat cross‑chain “batches” as sequenced, monitored steps with explicit failure handling. (arxiv.org)
Standards and modules to align on (so others can build on you)
- ERC‑1271 for contract signatures (plus ERC‑6492 for “predeploy” signatures when using counterfactual accounts). You’ll interoperate with DEXes, orderflow protocols, and wallets that verify signatures uniformly. (eips.ethereum.org)
- ERC‑6900 and ERC‑7579 for modular smart accounts and plugins. This avoids wallet lock‑in and lets you reuse validators (passkeys, multisig), executors (multicall), and hooks across stacks. Tooling exists (permissionless.js, ModuleKit) and Safe/Kernel adapters are shipping. (eips.ethereum.org)
- ERC‑7562 validation scope rules if you’re on 4337: they define canonical mempool behavior, reputation, and gas/context limits that keep bundlers healthy. Violations get you throttled or banned. (eips.ethereum.org)
- EIP‑7702 specifics to mind: per‑authorization base cost (12,500 gas), transaction propagation caveats (clients won’t accept >1 pending tx for delegated EOAs), and delegated‑code security considerations. Your infra should be updated to Pectra‑ready clients. (eips.ethereum.org)
- Nonce parallelism on the horizon: RIP‑7712 proposes multi‑dimensional nonces for native AA, mapping nicely to plugin lanes (e.g., session keys vs. admin ops). Track this for systems with heavy parallel workflows. (docs.erc4337.io)
Infra choices that won’t corner you later
- EntryPoint versions: ship on v0.7 today for maximal bundler/paymaster compatibility; plan a path to v0.8 as providers roll it out. Confirm your account’s validateUserOp signature (UserOperation vs PackedUserOperation) to avoid version mismatches. (alchemy.com)
- Bundlers: evaluate reliability (inclusion rate), gas estimates, failure diagnostics, and MEV‑protected submission. Rundler (Alchemy) is open‑sourced; Particle, Stackup lineage, and others exist. If you sponsor gas via a vendor, model the per‑userOp CU fees and percentage surcharge. (github.com)
- Permit2 address management: hardcode the canonical address and monitor vendor advisories; many ecosystems document it as canonical across supported EVMs. (docs.uniswap.org)
Security and auditability checklist (use this verbatim)
- Prefer CALL‑only multisends; if you must use delegatecall, isolate it to audited modules and enable Safe’s module guards. (safe.global)
- Encode each step as a direct call into the destination protocol (DEX, staking vault, bridge) so native events are emitted and indexers remain accurate.
- For 4337:
- Ensure paymaster is staked; cap validation gas; obey ERC‑7562 entity rules so your ops propagate. (eip.info)
- Avoid massive
blobs from paymasters; respect MAX_USEROP_SIZE and bundle size guidance. (eips.ethereum.org)context
- Use Permit2 responsibly:
- Keep approvals scoped and time‑bound; don’t rely on infinite signatures; educate users about signature prompts. (support.uniswap.org)
- Submit via private orderflow (Flashbots Protect) to avoid sandwiching and pay no gas on reverts; configure “fast” mode to share with all builders if speed matters. (docs.flashbots.net)
- Cross‑chain “zaps”: treat them as orchestrations with explicit failure compensation; do not claim L2↔L2 atomicity unless you can formally prove it (today you can’t with standard tooling). (arxiv.org)
Cost realism: what batched UX actually costs
- Base gas is paid once. If you split a 3‑step flow into three transactions, you’d pay ~3 × 21,000 base gas plus calldata each time. With a batch, you pay ~21,000 once plus the internal calls’ compute/events. Safe’s public estimates corroborate practical multi‑action totals in the ~66k–90k range for common tasks (excluding heavy swaps). Your mileage depends on called protocols. (help.safe.global)
- 4337 overhead vs EOAs: smart‑account transfers cost more gas than raw EOAs (e.g., ~88k vs 21k in a simple comparison), but on L2s the absolute delta is small and can be entirely sponsored. For enterprise, the UX lift (no ETH requirement, recovery, batched flows) typically dominates. (medium.com)
- Sponsorship pricing: if you use a managed paymaster/bundler, budget the per‑request CU fee plus a percentage of gas covered (e.g., 8% in one major provider’s current pricing tier). Self‑hosting reduces fees but adds ops complexity. (alchemy.com)
“Don’t break composability” litmus tests
- Would a third‑party indexer infer all protocol interactions and balances from standard event streams if your router vanished?
- Can another wallet replay your flow by crafting the same 7702 tx or 4337 callData, without your proprietary backend?
- Do your allowances and signatures use Permit2/EIP‑1271/6492 so other apps can safely reuse them? (docs.uniswap.org)
If the answer is “yes” to all three, you’ve kept composability intact.
What’s next (2025–2026)
- 7702 adoption beyond Ethereum: other EVMs (e.g., Avalanche ACP‑209 proposal) are exploring 7702‑style transactions to bring parity UX. Plan for a multi‑chain 7702 + 4337 world. (build.avax.network)
- Modular accounts converge: ERC‑7579 and ERC‑6900 ecosystems are maturing, with shared registries, adapters (Safe ↔ 7579), and portable modules (validators, session keys, hooks). This reduces vendor lock‑in for enterprises. (eips.ethereum.org)
- Parallel nonces (RIP‑7712) will make batched and concurrent workflows safer, eliminating nonce contention between admin ops and automated tasks. (docs.erc4337.io)
Quick build recipes
- Minimal “smart EOA” batch (mainnet):
- Use 7702 with an authorization to a lightweight batch executor that only performs external CALLs (no delegatecall), and emits a summary event. Keep it stateless. (eips.ethereum.org)
- Full AA stack (L2 or multi‑chain):
- ERC‑4337 account compatible with EntryPoint v0.7, Permit2 for approvals, session‑key plugin for repeat flows, Verifying Paymaster with strict allowlists, and Flashbots Protect for the bundler’s underlying submit. (alchemy.com)
Implementation pitfalls we keep seeing (and how to avoid them)
- Using delegatecall‑based multicall to interact with third‑party protocols—breaking msg.sender expectations and confusing analytics. Prefer CALL‑only batching. (medium.com)
- Overly permissive session keys with no gas/paymaster bound. Always bind spend limits or require a paymaster. (alchemy.com)
- Paymasters without sufficient stake/deposit at current gas prices—leading to mempool throttling per ERC‑7562 reputation rules. Monitor gas and top‑up proactively. (eip.info)
- Opaque, off‑chain “intents” where most logic never hits chain. Intents systems are valuable (CoWSwap/UniswapX) but remember: your batch UX should still land as standard on‑chain calls/events if you care about composability. (docs.cow.fi)
Bottom line
You can ship one‑click flows that users love without fragmenting the ecosystem. Use 7702 for “smart EOA” moments, 4337 for programmable accounts and sponsorship, Permit2 for approvals, CALL‑only batching for clarity, session keys with real limits, and MEV‑protected submission. These choices keep your product fast and friendly—and keep Ethereum’s composability intact.
If you want a reference architecture or a sprint‑ready backlog tailored to your stack, 7Block Labs can put one on your desk in a week.
Sources and specs referenced
- EIP‑7702 (Pectra, mainnet May 7, 2025), EF announcement and client versions. (eips.ethereum.org)
- ERC‑4337 docs, EntryPoint versions/addresses, bundler/paymaster guidance. (docs.erc4337.io)
- ERC‑7562 mempool/validation scope rules (propagation, reputation). (eips.ethereum.org)
- Permit2 docs and canonical address. (docs.uniswap.org)
- Safe multisend guidance and module guards. (medium.com)
- Session key best practices (plugins, limits). (alchemy.com)
- Flashbots Protect / private submission for MEV protection. (docs.flashbots.net)
- Cross‑rollup atomicity research (CRATE). (arxiv.org)
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

