Skip to main content

Overview

An intent progresses through several states from creation to completion. Understanding this lifecycle is crucial for all participants in the protocol.

Intent Status

The protocol tracks intent rewards through the following states:

Complete Lifecycle

Alternative Path: Refund

If an intent expires without fulfillment, the creator can recover their rewards.

Refund Conditions

contracts/IntentSource.sol
Validation logic:
Refund process:
  1. Checks deadline has passed: block.timestamp >= reward.deadline
  2. Verifies intent was not proven as fulfilled
  3. Updates status to Refunded
  4. Transfers all tokens from vault back to creator
  5. Emits IntentRefunded event
Refund to custom address:
Only the intent creator can specify a different refund recipient.

State Transitions

Timeline Constraints

  • Route deadline: Intent must be fulfilled before route.deadline
  • Reward deadline: Intent must be fulfilled before reward.deadline
  • Refund eligibility: Can only refund after reward.deadline has passed
  • Proof validity: Proof must match the destination chain ID
Best practice: Set route.deadline slightly before reward.deadline to give solvers time to prove fulfillment before the intent becomes refundable.