Skip to main content

The problem

Entering a yield position by hand is a sequence, and every step is a place to get stuck:
  1. Approve USDC to a DEX
  2. Swap USDC → EURC
  3. Wait for confirmation
  4. Approve EURC to the protocol
  5. Deposit
Between steps the price moves, a leg fails and leaves the account holding the wrong token, and the user is asked to sign four more times. Each protocol needs its own version of this sequence.

The bundle

1tx returns the same work as one ordered batch of {to, value, data} calls, built for one chain and one account:
Sent through a smart account as a single user operation, the batch lands or reverts as a whole. The swap and the deposit share one block and one price; there is no window between them, and no state where the account holds an intermediate token it never asked for. Every call targets the protocol directly. There is no intermediary contract to trust, so there is also nothing to audit between you and Aave — the atomicity comes from your account’s batching, not from a router of ours holding your funds for the length of a transaction.

Simulated before it is returned

A bundle is not a suggestion. Before you see it, all of its calls are executed against live state at a pinned block, in order, as your account:

Reverts never reach you

A bundle whose simulation fails — insufficient liquidity, a protocol cap, a paused market — is refused with a 400 rather than handed over to sign.

The output is measured

expectedOut is the account’s balance delta in the simulation, not a projection from a formula.

Slippage is written in

Where a swap is involved, minOut is compiled into the calldata. A price that moves too far before the batch lands makes it revert rather than fill badly.

Dust is bounded

leftovers states the most an exact-output leg can leave behind, so nothing is silently lost.

Where atomicity stops

An EOA sends calls one at a time. Each is atomic by itself; the sequence is not. Stop after the approve and you have an allowance; stop after the swap and you are holding EURC. The simulation modelled the batch, so only a batched sender gets what it proved. This is the main reason the execution model is built around smart accounts.
The bundle is proven at quoteBlock. Between that block and inclusion, rates move, vaults fill and caps bind. That is a reverted transaction, not a lost one — but it is a reverted transaction you paid gas for. Rebuild a bundle that has been sitting around, and never replay one past expiresAt.
A cross-chain deposit is two batches with Circle’s attestation between them. Each is atomic on its own chain; the pair is not. What protects the middle is that the burn names your own account as the only party who can redeem it — not a guarantee that both halves run in one moment.
Every call in a bundle is on the same chain, and a bundle is capped at 32 calls and 128 KiB of calldata. A plan that spans chains is a sequence of bundles, and your agent or app sequences them.

Loops: the same idea, further

A levered loop is the extreme case of the pattern: borrow, swap, re-supply, repeated until the requested leverage is reached — a dozen or more calls that are only safe together. Every amount is computed at the quote block and hard-coded, every swap is exact-output, and the resulting health factor is read back from the simulated block rather than modelled.

Loops API

Leverage, e-mode, turns and the measured position

Next steps

Execution Model

Smart accounts, gas in USDC, cross-chain

Calldata API

The endpoint that returns the bundle

Instruments

What the id encodes

Integration Guides

Wiring it into your app or agent