Skip to main content
On EVM networks, unsignedTransaction is a JSON string. Parse it, pass to, data and value to your signer unchanged, sign, and submit. This applies to Ethereum, Base, Arbitrum, Optimism, Polygon, and every other EVM-compatible network Yield.xyz supports.

Prerequisites

  • An action’s transactions[]; see Transaction signing for decoding by chain family and Enter and exit flows for the request and poll loop.
  • An EOA private key (server-side) or a connected browser wallet, for the target network.

The unsignedTransaction shape

Never change to, data or value. When an action returns one transaction, also keep its gas values and nonce as returned. When an action returns several transactions, every step carries the nonce from when the action was built, so let your signer assign the nonce (or read the wallet’s pending transaction count) for each step after the first. Re-estimate gas only where a guide tells you to, for example the REDEEM of a first Zama private exit. Renaming a key so a library accepts the object, for example gasLimit to gas, is not a value change and is fine; changing what any field points to or how much it’s worth is not.

Sign and submit

Alternatively, hand Yield.xyz the signed transaction and let it broadcast: POST /v1/transactions/{tx.id}/submit with { "signedTransaction": await wallet.signTransaction(parsed) }. Use one path per transaction, never both. See Transaction signing for when each fits.

Batched execution

When a yield’s mechanics.arguments.enter.fields (or .exit.fields) offers executionMode, you can pass executionMode: "batched" instead of the default "individual". A batched action collapses what would otherwise be an APPROVAL plus a SUPPLY, STAKE, or similar call into a single BATCH transaction, whose unsignedTransaction is a JSON array of calls rather than one transaction object:
Each call has only to, data, and value; there is no gasLimit, nonce, or chainId to sign against, because the batch is meant for a smart account or wallet that executes all calls atomically (for example EIP-5792 wallet_sendCalls), not a single EOA-signed transaction. Sign it with whatever batch-call method your smart account SDK exposes, then submit the resulting hash the same way as any other transaction.

Next steps

Transaction signing

The shared contract across chain families: decode, validate, sign, submit.

Enter and exit flows

Build the request, branch on executionPattern, and poll to a terminal status.