Skip to main content

What is a Route?

A route is the fundamental unit of MultiHopper. It defines a complete token transfer pipeline: a sequence of recipients and execution times that play out automatically on-chain after the route is funded. Think of a route as a smart payment program you deploy once and let run.

RouteConfig Fields

The RouteConfig on-chain account stores the full route definition:

Hops

Each hop within a route specifies:

Route Variants

Two route creation instructions exist depending on the asset type:

Route Constraints

  • Routes are immutable after finalization. The hop sequence, recipients, and timing cannot be changed.
  • Hops execute in strict order. Hop N cannot run until hop N-1 is complete.
  • Timing is enforced by the Solana clock on-chain. No hop can run before its execute_at time.
  • Execution is gated by prepaid_hops — only hops within the prepaid count can execute.

Route Limits

Closing a Route

Once a route is fully settled (all hops complete, vault emptied), the close_route instruction reclaims the RouteConfig account rent and returns lamports to the creator.

Identifying Routes

Each route is identified by its route_id — a 32-byte UUID stored as a 64-character hex string (e.g. a1b2c3d4e5f6...). The on-chain account address is derived as:
where route_id_le_bytes is the little-endian byte representation of the route ID. Use this ID to query route status via the API or track on-chain state.

Route Lifecycle

See how routes move from creation through settlement.