Multicall
A function or contract that takes a list of calls and executes them in one transaction, so a caller can batch several actions together.
A multicall bundles several calls into one transaction. The caller passes a list of targets and call data, and the multicall contract runs them in order, usually reverting the whole batch if one fails. Wallets, routers and keeper bots use it to save gas and to make several steps happen atomically.
The security problem
When a multicall contract makes the calls, the targets see the multicall contract as msg.sender, not the person who sent the batch. If a target trusts the multicall contract, for example a wallet module that only obeys its helper, then whoever can drive the multicall inherits that trust.
So a multicall that holds any permission must check who is calling it, not just which targets are in the list. A target allowlist on its own stops calls to the wrong contracts. It does nothing about the wrong caller.
What to check
- Does the multicall contract hold any role, approval or module permission anywhere? If so, it needs a caller check.
- Is the caller check on every entry point, not only the main one?
- Test it from a random address with a call to an approved target. It should revert.
Related Terms
Keeper
An off-chain bot, run by a protocol or a third party, that calls a contract's maintenance functions on a schedule or when conditions are met, such as harvests, rebalances or liquidations.
Wallet Module
An extra contract that a smart wallet's owners enable so it can act for the wallet, such as moving its tokens or managing a position, without the owners signing each transaction.
Access Control
Security mechanisms that restrict which addresses can call specific functions in a smart contract, preventing unauthorized actions.
msg.sender
A Solidity global variable that returns the address of the account or contract that directly called the current function.
Need expert guidance on Multicall?
Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.
Get a Quote