For details, see the Bundler3 contract.
Why use bundlers
- Simpler UX: Users can open leveraged positions or deposit into vaults in one transaction instead of many.
- Lower gas: One transaction costs less than several separate ones.
- Atomicity: If any step fails, the whole transaction reverts so users never end up in a half-complete state (e.g. tokens approved but not supplied).
Supported operations
Bundlers support:- Tokens: ERC20 approvals (including permit/permit2), wrap/unwrap native assets, transfers
- Bend markets: Supply, supplyCollateral, borrow, repay, withdraw
- Bend vaults: Deposit and withdraw (ERC-4626 vaults)
- Public Allocator:
reallocateToto move liquidity between markets - Rewards: Claim from the Universal Rewards Distributor (URD)
- Swaps: DEX aggregator swaps