Skip to content

๐Ÿงก Fusion Mode Orchestration (External Wallets)

External wallets, such as MetaMask or Rabby, do not permit direct installation of smart account logic on EOAs. To enable MEE orchestration in this case, Fusion Mode is used. It relies on a passthrough mechanism involving a Companion smart account and a signed trigger transaction.

We recomment understanding Fusion Execution before executing code, but if you'd like to skip the theory - read the code guide

๐ŸŽด Fusion Mode Flow:

Trigger Signature

The user signs a trigger transaction that includes the hash of all orchestration instructions. This signature authorizes the full orchestration with a single user action.

Funds Transferred to Companion Account

Funds are temporarily pulled into a Companion Account fully owned by the user. This account is non-custodial and statelessโ€”no funds are stored there beyond execution.

Instruction Execution

All instructions (e.g., swaps, bridges, multicalls) are executed using the Companion Account.

Return to EOA

Resulting assets are sent back to the user's EOA. The Companion Account is left clean with no dust.

Optional Cleanup

If an orchestration step failsโ€”especially in multichain setupsโ€”a cleanup can revert intermediate steps, returning funds or rebalancing tokens.

Fusion Mode allows orchestrated execution even without embedded wallet features, enabling advanced UX with any external wallet.

๐ŸŽฌ Trigger Types

There are two kinds of Fusion triggers. They depend on which type of token you are using as the input token.

If you're working with tokens which support ERC20Permit then you can use the ERC20Permit trigger type, which makes the entire orchestration gasless. Otherwise, you must use the Onchain Tx trigger, which requires a bit of gas on source chain to execute the approve ERC20 transaction.

Trigger TypeHow it WorksGas RequiredToken Support
ERC20PermitUses ERC-2612 signature to permit spending. Orchestration hash is packed into the deadline field.โŒ NoOnly ERC-2612 tokens
Onchain TxAny EVM transaction that includes orchestration instructions. Most often an approve() call.โœ… YesAll token types

The SDK will detect whether a token supports ERC-2612 and choose the appropriate trigger type.

โ™พ๏ธ Fusion Constraints

  • Can only consume one token per user signature.
  • Token used for execution must also be used to pay for gas.
  • Transaction sponsorship is possible and bypasses the gas requirement.

๐Ÿ”ข Fusion Flow

  1. Trigger: User signs a transaction (e.g. approve) that signals orchestration.
  2. Orchestrate: MEE nodes execute function calls, bridges, or other logic.
  3. Return: Final steps return assets to the userโ€™s EOA.