Developer reviewing smart contract architecture diagrams on a glass wall in a modern WeWork space, standing desk in background, natural industrial aesthetic, candid engineering moment.
Protocols

Multi-Send and Batch Transaction Construction

A technical implementation playbook for Safe's MultiSend and MultiSendCallOnly contracts, covering atomic and non-atomic batch construction, delegatecall vs call security implications, and integration into custom UIs and backend workflows.
introduction
ATOMIC AND NON-ATOMIC BATCH EXECUTION

Introduction

How Safe's MultiSend contracts enable bundling multiple operations into single transactions, and the security implications of delegatecall-based batching.

Safe's MultiSend and MultiSendCallOnly contracts are the canonical mechanism for constructing batch transactions that execute multiple operations atomically from a single Safe. Rather than requiring signers to approve and execute each interaction individually—an impractical constraint for DAO treasury operations, protocol parameter adjustments, or complex DeFi position management—the MultiSend pattern encodes an ordered sequence of calls into a single bytes payload. This payload is passed to the Safe's execTransaction function, where it is processed by the MultiSend contract through a delegatecall (for MultiSend) or a series of call operations (for MultiSendCallOnly). The distinction between these two execution modes is the single most important security consideration for any team building batch transaction tooling.

The MultiSend contract uses delegatecall to execute each operation in the batch within the Safe's own execution context. This means each call inherits the Safe's storage, msg.sender, and msg.value, enabling powerful patterns like stateful multi-step deployments or operations that require intermediate storage writes. However, it also introduces a critical security boundary: any delegatecall into an untrusted or compromised contract can corrupt the Safe's storage, potentially overwriting the owner set, guard configuration, or module registry. The MultiSendCallOnly variant eliminates this risk by using standard call operations, executing each transaction in the target contract's context. This is the safer default for most integrations, particularly when constructing batches that interact with external protocols, token contracts, or any address not under the Safe's direct control.

For dApp developers, DAO tooling teams, and wallet integrators, the operational challenge extends beyond choosing the correct MultiSend variant. Batch construction requires precise encoding of operation types (CALL vs DELEGATECALL), correct ABI packing of target addresses, values, and calldata, and careful ordering when operations depend on intermediate state changes. Frontends that allow users to compose batches must validate that delegatecall operations are never directed at user-supplied addresses. Backend services that programmatically construct batches for automated treasury actions or protocol operations must implement rigorous simulation and pre-flight checks. Chainscore Labs can audit batch transaction construction logic, review delegatecall safety boundaries, and help teams build robust simulation frameworks that catch dangerous batch configurations before they reach the signing queue.

MULTI-SEND AND BATCH TRANSACTION CONSTRUCTION

Quick Facts

Key operational and security characteristics of Safe's MultiSend contracts that affect batch transaction construction, atomicity guarantees, and delegatecall risk exposure.

AreaWhat changesWho is affectedAction

Atomicity

MultiSend processes all calls in a single transaction; a single failure reverts the entire batch

DAO operators, treasury managers, DeFi protocol integrators

Verify batch logic handles partial-failure scenarios correctly in your integration

Delegatecall risk

MultiSend uses delegatecall, executing batch code in the Safe's own storage context

Module developers, security engineers, custody platforms

Audit every batched interaction for storage collisions and unexpected state changes

Call-only variant

MultiSendCallOnly restricts execution to standard call, preventing delegatecall to arbitrary addresses

Wallet integrators, dApp frontend teams

Use MultiSendCallOnly for user-facing batch transactions to reduce attack surface

Transaction decoding

Off-chain indexers must decode MultiSend transaction data to display individual actions

Wallet teams, backend integrators, infrastructure providers

Ensure your Transaction Service API integration correctly decodes and displays batched calls

Gas accounting

Batch transactions consume more gas than individual transactions; delegatecall gas costs are unpredictable

Relayer services, paymaster providers, gas estimation tools

Build gas buffers into relayer logic and test with worst-case batch sizes

Nonce consumption

A MultiSend batch consumes a single Safe nonce regardless of the number of internal calls

Multi-chain protocols, treasury operators

Account for nonce ordering when batching cross-chain message preparation transactions

Signature threshold

The Safe's threshold applies to the entire batch; signers approve all batched actions together

Governance delegates, multisig operators

Design batch proposals so signers can reasonably evaluate all bundled actions as a unit

Module interaction

Modules calling execTransactionFromModule can also use MultiSend, inheriting the same delegatecall risks

Module developers, DAO tooling teams

Review module-initiated batches for privilege escalation via delegatecall to untrusted contracts

technical-context
ATOMIC AND NON-ATOMIC BATCH EXECUTION

Technical Mechanism

How MultiSend and MultiSendCallOnly contracts enable bundling multiple operations into a single Safe transaction, and the critical security distinction between delegatecall and call-based execution.

Safe's MultiSend contracts are the canonical mechanism for batching multiple operations into a single on-chain transaction. Two variants exist: MultiSend, which executes a sequence of calls via delegatecall, and MultiSendCallOnly, which uses standard call. The core data structure is a tightly packed byte sequence encoding an operation uint8 (0 for call, 1 for delegatecall), a to address, a value uint256, and a dataLength uint256 followed by the data payload. This sequence can be repeated to construct a batch that is executed in order within a single execTransaction from the Safe.

The delegatecall-capable MultiSend is the more powerful and dangerous variant. When an operation type of 1 is used, the target contract's code executes within the MultiSend contract's own storage context. This allows a batch to modify the MultiSend contract's state, which is almost never the intended behavior for standard asset transfers or contract interactions. The primary legitimate use case for delegatecall within a batch is a library-style call that intentionally reads from or writes to the MultiSend's transient storage, a pattern that is exceptionally rare. For virtually all integrations—token transfers, staking, governance voting, and DeFi interactions—the MultiSendCallOnly contract is the correct and safe choice. Using MultiSend without a rigorous understanding of the storage collision risk can lead to silent corruption of the batch executor's state or unexpected reverts.

The atomicity guarantee is a critical operational property: if any single sub-transaction in a batch fails, the entire execTransaction reverts. This is not a feature of the MultiSend contract itself but a consequence of how the Safe core contract invokes it. The Safe's execTransaction makes a single delegatecall to the MultiSend contract, and the MultiSend iterates through the batch. A revert in any sub-operation causes the entire top-level call to revert, unwinding all state changes. This atomicity is essential for operations like DEX swaps that require a multi-hop route or for DAO treasury actions that must be executed as a single logical unit. Builders must design their batch construction logic to handle this all-or-nothing behavior, particularly when constructing batches that interact with protocols that have time-sensitive or non-idempotent operations.

For teams integrating batch transaction construction into custom UIs or backend workflows, the primary engineering challenge is correctly encoding the transaction data and presenting the decoded batch to users for review. The Safe Transaction Service API and client SDKs handle this for standard Safe interfaces, but custom integrators must implement their own encoding and decoding logic. A common failure mode is a mismatch between the operation type presented to the user and the one encoded in the transaction, which could trick a signer into approving a delegatecall they believed was a simple call. Chainscore Labs can audit custom batch construction pipelines, review the safety of delegatecall usage within batches, and verify that user-facing decoding logic accurately represents the transaction's true effects.

MULTI-SEND INTEGRATION IMPACT

Affected Actors

dApp and DAO Tooling Teams

Teams building governance UIs, treasury management dashboards, or DeFi frontends are the primary consumers of MultiSend. The critical design decision is whether to use MultiSend (delegatecall) or MultiSendCallOnly (call).

Delegatecall risk: If a batch includes a malicious contract, it executes in the Safe's storage context, potentially overwriting the master copy address or module state. dApp teams must either restrict batch construction to CallOnly or implement rigorous transaction simulation before presenting batches for signing.

Action items:

  • Verify your UI decodes and displays all internal transactions before user confirmation.
  • Simulate batches against a local fork to detect delegatecall state changes.
  • If using MultiSend, ensure your contract allowlist prevents users from including arbitrary delegatecall targets.

Chainscore can audit your batch construction pipeline and review delegatecall safety boundaries.

implementation-impact
BATCH TRANSACTION SAFETY

Integration Impact

MultiSend contracts are a powerful but high-risk primitive. A single flawed batch can drain a treasury or brick a module. Integrators must understand the security boundaries between atomic execution, delegatecall context, and the limitations of the CallOnly variant.

01

Audit Delegatecall Batches for Context Hijacking

The standard MultiSend uses delegatecall, meaning every transaction in the batch executes in the Safe's own storage context. A malicious or buggy contract called within a batch can overwrite the Safe's master copy address, fallback handler, or module list. Any batch that includes a delegatecall to an untrusted or upgradeable contract must be treated as a critical security boundary. Chainscore can perform a targeted review of batch payloads to identify storage collision and context hijacking risks.

02

Enforce CallOnly for Treasury Operations

The MultiSendCallOnly contract restricts execution to standard call operations, preventing any modification of the Safe's own configuration. For DAO treasury management, institutional custody, and any workflow where the batch should only transfer assets or interact with external protocols, CallOnly is the safer default. Teams should enforce this at the UI and backend level to prevent operators from accidentally submitting a delegatecall batch that could compromise the Safe's architecture.

03

Atomic Failure is a Feature, Not a Bug

A standard MultiSend batch is fully atomic: if any single transaction reverts, the entire batch reverts. This is critical for DeFi operations like zapping into an LP position, where a partial execution would leave assets stranded. However, integrators must ensure their error-handling logic does not assume partial success. For workflows that require non-atomic execution, such as airdrop claims, multiple separate MultiSend transactions must be constructed and submitted sequentially.

04

Decode and Simulate Before Signing

The raw bytes of a MultiSend payload are opaque to human signers. Wallet UIs and custody platforms integrating Safe must decode the nested transactions and present a clear, human-readable summary of every action in the batch before requesting a signature. Backend services constructing batches should include Tenderly or local fork simulation as a mandatory pre-execution step to catch reverts, gas estimation errors, and unintended state changes before the batch reaches signers.

05

Guard Hooks Apply Once Per Batch

Transaction guards using checkTransaction and checkAfterExecution are invoked once for the entire MultiSend execution, not for each sub-transaction. A guard designed to enforce a per-transaction spending limit will not function correctly against a batch. Security engineers must design guards that can introspect the decoded batch payload and enforce cumulative limits or per-action rules. Chainscore can audit guard logic for batch-awareness and composability with MultiSend.

06

Verify Canonical MultiSend Addresses Per Chain

The canonical MultiSend and MultiSendCallOnly contract addresses are not uniform across all EVM chains. Integrators must not hardcode a single address. Before constructing or proposing a batch, query the Safe Transaction Service API or the Safe singleton's on-chain registry for the correct, vetted deployment on that specific chain to avoid interacting with an unverified or malicious contract posing as MultiSend.

MULTI-SEND AND BATCH TRANSACTION CONSTRUCTION

Risk Matrix

Operational and security risks introduced by atomic and non-atomic batch execution via MultiSend and MultiSendCallOnly contracts, affecting transaction construction, delegatecall safety, and integration complexity.

RiskFailure modeSeverityAffected actorsMitigation

Delegatecall injection

A malicious contract called via delegatecall in a batch can hijack the Safe's execution context, potentially modifying storage or self-destructing the proxy.

Critical

DAO tooling teams, wallet integrators, module developers

Use MultiSendCallOnly for user-facing batch construction. Audit any batch that includes a delegatecall to an untrusted address. Chainscore can review delegatecall safety in batch transactions.

Atomicity assumption violation

Operators assume all calls in a batch succeed or fail together, but partial success can occur if the MultiSend contract is not used or if calls are constructed off-chain without atomic guarantees.

High

Treasury managers, protocol operations teams, institutional custody platforms

Verify that the canonical MultiSend contract is the execution target. Do not simulate atomicity by submitting separate transactions in rapid succession. Chainscore can audit batch execution logic for atomicity guarantees.

Gas griefing via unbounded batches

A batch containing many operations or calls to contracts with unbounded loops can exhaust the gas limit, causing the entire batch to revert and locking legitimate operations.

Medium

Relayer services, paymaster providers, backend transaction constructors

Enforce a maximum number of operations per batch. Simulate batch gas usage before submission. Chainscore can review relayer gas accounting and batch size limits.

Calldata decoding errors in indexers

The Safe Transaction Service and custom indexers may fail to decode complex MultiSend calldata, causing transaction history gaps or incorrect UI state for queued transactions.

Medium

Wallet teams, backend integrators, infrastructure operators

Test MultiSend calldata decoding against the specific Safe Transaction Service version in use. Implement graceful fallback for undecodable transactions. Chainscore can review indexing dependency architecture and failover strategies.

Cross-chain replay of batch transactions

A batch transaction signed for one chain can be replayed on another chain where the same Safe address is deployed, if nonce and chain ID are not properly enforced in the signature.

High

Multi-chain protocols, treasury managers, wallet teams

Enforce EIP-155 chain ID in all signatures. Use chain-specific nonce queues. Verify that the Safe's domain separator includes chain ID. Chainscore can assess cross-chain deployment security and replay risk.

Module interaction with batched calls

A module executing a batch via execTransactionFromModule may have different security assumptions than a direct owner-executed batch, especially if the module's own access controls are bypassed by the batch contents.

High

Module developers, DAO operators, custody platforms

Audit module logic to ensure that batch execution does not circumvent module-specific constraints. Restrict which MultiSend contract a module can call. Chainscore can provide module security audits and lifecycle implementation review.

Frontend misrepresentation of batch contents

A wallet UI may display only the top-level MultiSend call, hiding the individual actions within the batch from the signer, leading to blind signing of malicious operations.

Critical

Wallet integrators, dApp frontend teams, multisig operators

Implement full batch decoding in the confirmation UI. Display every sub-transaction with its target address, value, and calldata summary. Chainscore can review WalletConnect integration and multi-send display logic.

BATCH TRANSACTION READINESS

Integration Checklist

Engineering teams integrating MultiSend or building custom batch transaction flows should verify each item below before production deployment. This checklist covers atomic execution guarantees, delegatecall risk surface, UI/UX handling, and backend transaction construction correctness.

Safe deploys two canonical MultiSend contracts: MultiSend (supports delegatecall) and MultiSendCallOnly (only call). Confirm you are using the correct version for your use case.

What to check:

  • Retrieve the canonical MultiSend address from the Safe deployments registry for each chain you support.
  • Validate that your dApp or backend references the correct address per chain, not a hardcoded mainnet address.
  • If you use MultiSend with delegatecall, ensure every target contract in the batch is trusted and audited.

Why it matters: Using an incorrect or outdated MultiSend address can cause transaction failure or, in the delegatecall case, introduce a critical security vulnerability where a malicious contract executes in the Safe's own storage context.

Readiness signal: Your deployment configuration maps chain IDs to canonical MultiSend addresses and your test suite validates batch execution against the correct on-chain contract.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

MULTI-SEND AND BATCH TRANSACTION CONSTRUCTION

Frequently Asked Questions

Common questions from engineering teams building, integrating, or auditing batch transaction workflows with Safe's MultiSend contracts.

MultiSend uses delegatecall to execute a sequence of transactions. This means the batch executes in the context of the MultiSend contract itself, which can modify its own storage. This is a powerful but dangerous primitive if misused.

MultiSendCallOnly uses standard call for each transaction in the batch. This prevents the batch from altering the MultiSend contract's state, making it the safer default for most integrations.

Operational guidance:

  • Use MultiSendCallOnly unless you have a specific, audited reason to require delegatecall semantics.
  • If you must use MultiSend, ensure the batch does not contain calls that could corrupt the MultiSend contract's storage, as this could break future batch executions.
  • Always verify which version your dApp or backend is constructing transactions for. The Safe Transaction Service API distinguishes between the two.
Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
“I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.”
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.