Every MultiHopper route moves through four stages: Create → Deploy → Execute → Unwrap.Documentation Index
Fetch the complete documentation index at: https://dev-docs.multihopper.com/llms.txt
Use this file to discover all available pages before exploring further.
Lifecycle Diagram
Stage 1: Create
The user (or integrator via API) defines the route:- Asset — the token to route (SOL or SPL)
- Hop sequence — an ordered list of recipients and timing
hop_amount— a single amount shared across all hopssource_owner— optional source wallet for abstraction (intermediate funding)prepaid_hops— how many hops have been fee-paid upfrontprovider_id/reference_id— optional integrator and external reference IDs
RouteConfig account is created on-chain storing the full definition. The route ID is a 32-byte identifier ([u8; 32]).
Stage 2: Deploy (Orchestrator)
Route deployment uses the Orchestrator program to coordinate the multi-transaction funding sequence. This is handled transparently by the app or API — integrators do not need to manage individual steps.How the Orchestrator Works
- An
OrchestratorConfigaccount is created with the full step sequence,keeper_share_bpsincentive, and step count. - Individual
OrchestratorStepaccounts are initialized — each with a type andexecute_attimestamp:transfer— transfer SOL/lamports between accounts to fund intermediate walletswrap_sol— wrap SOL into the route vault via the Core programwrap_token— wrap an SPL token into the route vault
- Keepers execute each step permissionlessly once its scheduled time arrives. Each successful keeper earns a share of deposited funds proportional to
keeper_share_bps. - After all steps complete, the orchestrator is closed and remaining rent is reclaimed.
Abstraction
When a route is deployed via the abstraction path, intermediate wallets are funded through the orchestrator’stransfer steps. This allows the source of funds to be separated from the final route configuration — the intermediate wallets facilitate the on-chain setup without directly linking the origin wallet to the final route state.
Stage 3: Execute
Hops trigger according to the on-chain schedule. For each hop:- A keeper submits a
trigger_hopinstruction to the Core program - The program validates:
- Current Solana clock ≥
execute_atfor this hop - Previous hop is complete
- Hop is within the
prepaid_hopslimit
- Current Solana clock ≥
- The permanent delegate transfers wrapper tokens from the current recipient to the next
- The hop is marked complete on-chain
Execution is permissionless — any keeper can submit a valid hop execution. The program enforces all constraints; the keeper cannot deviate from the route definition.
Stage 4: Unwrap
After the final hop completes, the last recipient can redeem:- Submit an
unwrap(SPL) orunwrap_sol(SOL) instruction with their wrapper tokens - The program burns the wrapper tokens
- The equivalent original tokens are released from the vault to the recipient
close_route instruction can be called to reclaim the account rent once the route is fully settled.
Failure Cases
Hop executed too early
Hop executed too early
The transaction fails with a clock constraint error. The hop stays pending. Any executor can retry after the scheduled time.
Keeper goes offline
Keeper goes offline
The hop or step stays pending. Any other executor can trigger it. Routes do not expire.
Orchestrator step fails on-chain
Orchestrator step fails on-chain
The
refund_failed_step instruction on the Orchestrator returns deposited funds to the creator. The rescue_step instruction is available as an admin escape hatch for permanently stuck steps.Recipient account missing
Recipient account missing
The executor must ensure recipient token accounts exist before submitting. Standard ATA creation applies.