Batched Execution Explained in Detail
Batched execution combines multiple calls into one transaction or account operation. The batch may be fully atomic, or it may allow partial success depending on the implementation.
Batching changes the order and context in which checks run.
Smart contract example
call A -> call B -> call C in one transaction
The output of call A may change whether call B is safe.
Batched Execution in Auditing
Batches can combine approvals, module installs, external calls, swaps, withdrawals, and self-calls in one flow. A function that is safe alone may be unsafe when chained with another call first.
Auditors review the whole batch as one state transition.
Red flags in code
-
Arbitrary target and calldata are allowed without per-call checks.
-
Self-calls bypass access control.
-
Partial failure behavior is unclear.
-
Batch size is unbounded.
-
Reentrancy appears between subcalls.
How to test or review it
-
Test call ordering and mixed success or failure behavior.
-
Include self-targeted calls and calls with ETH value.
-
Try installing permission and using it later in the same batch.
-
Test reentrancy from intermediate external calls.
-
Put gas-heavy or oversized batches through the execution path.
Keep learning this topic
Multicall
Multicall is a pattern that batches multiple calls into one transaction, often by calling functions on the same contract or multiple targets.
Account Abstraction
Account abstraction lets smart contract accounts define their own validation rules instead of relying only on externally owned account transaction rules.
Low-Level Call
A low-level call is a Solidity call such as call, delegatecall, staticcall, or send that returns success and data instead of using typed function checks.
Practice this in real audit scenarios
Definitions help, but auditors need reps. SCH turns concepts like Batched Execution into exploit labs, code review habits, and report-writing practice.
Start the free trial or see the full smart contract auditing course.