Bundler3
Structure
- Bundler3 repository: morpho-org/bundler3
Bundler3 is a call dispatcher that enables atomic execution of arbitrary calls with enhanced features for authorization management and callback handling.
-
The core
Bundler3
contract implementsmulticall(Call[] calldata bundle)
, where each call is defined by:to
: Target addressdata
: Calldatavalue
: Native currency amountskipRevert
: Flag to skip reverting if this particular call failscallbackHash
: Specifies the hash used for controlling reentrancy callbacks
-
Adapters all inherit from
CoreAdapter
, which provides access to the initiator (the original caller) via transient storage. This mechanism allows adapters to enforce strict permission checks (e.g. only acting on behalf of the initiator). -
Chain-specific adapters, such as
EthereumGeneralAdapter1
, extend the baseGeneralAdapter1
to support network-specific features (e.g. stETH on Ethereum). -
Specialized adapters target specific integrations:
ParaswapAdapter
for DEX aggregation (buy/sell/swaps)- Migration adapters for moving user positions between protocols (Aave, Compound, Morpho, etc.)