Fusion orders on Solana have a defined lifecycle that includes filling by resolvers and cancellation options. Understanding this lifecycle helps you build robust applications that handle all possible order outcomes.
Order Lifecycle
After an escrow is created on-chain, the order enters the active state where:
- Resolvers Monitor - Professional market makers watch for profitable orders to fill
- Dutch Auction - The offered price decreases over time, incentivizing quick fills
- Fill or Expire - Either a resolver fills the order, or it expires after the deadline
Cancellation Options
Orders can be cancelled in two scenarios:
- Maker Cancellation - As the order creator (maker), you can cancel your own order at any time before it's filled. This returns your tokens from the escrow back to your wallet.
- Resolver Cancellation - After an order expires, resolvers can trigger cancellation to clean up the escrow. For this service, resolvers earn a small cancellation premium (paid in lamports) as defined in the order parameters.
Interactive Code Example
Explore the complete implementation — this example demonstrates how to cancel an existing order: