Order Flow
This order flow covers the main stages of the lifecycle of an order on the t3rn platform, providing insights into when funds are accessible to users or Executors and what happens if something goes wrong.
Order Flow Stages and Statuses
- Order Created
- Status:
OrderStatus.Open
- Description: The order is created and recorded in the order book. The order is now available for Executors to bid on.
- Status:
- Placed
- Status:
OrderStatus.Placed
- Description: The order is placed on the source chain but hasn't been processed on our blockchain, yet.
- Status:
- Bidding Stage
- Status:
OrderStatus.BidAccepted
- Description: The fastest Executor that bids on an order, wins this phase and gets to execute the order. In future release, Executors bid on the order.
- Status:
- Order Execution
- Status:
OrderStatus.Executed
- Description: The winning Executor carries out the transaction on the destination network. The transaction's execution is recorded, and confirmation is awaited.
- Status:
- Attestation on t3rn Settlement Layer
- Status:
OrderStatus.AttestedL3
- Description: After execution, the transaction must be attested on the t3rn Settlement Layer. This involves verification steps to ensure the transaction was performed correctly.
- Status:
- Attestation on the Source Network
- Status:
OrderStatus.AttestedL2
- Description: The transaction is further attested on the source network network. This step ensures that the transaction's details are correct and meet the protocol's requirements.
- Status:
- GMP Mismatch/Failure
- Status:
OrderStatus.GMPMismatch
- Description: A GMP (General Message Passing) mismatch or failure indicates that there was an issue with the transaction data, causing the order to be unclaimable. This status is critical and may lead to a refund process.
- Status:
- PendingRefund
- Status:
OrderStatus.PendingRefund
- If the order encounters an issue such as a failure in execution or a GMP mismatch, the order enters the
PendingRefund
state, where the system begins the process of refunding the user.
- Status:
- Order Refunded
- Status:
OrderStatus.Refunded
- Description: If the order is not executed correctly, or if the Executor fails to complete the transaction within the given time frame, the order may be refunded. This status indicates that the order was not completed as expected, and funds are returned to the user.
- Status:
- Order Claimed
- Status:
OrderStatus.Claimed
- Description: Once the transaction is successfully attested, the Executor can claim their reward. The order status is updated to claimed.
- Status:
Refund and Claim Details
- Refund Eligibility: Refunds are possible if the order is not executed within the required time frame or if there is a GMP mismatch or faulty execution.
- Claim Eligibility: The Executor can claim their reward after the transaction is successfully attested on both the t3rn Settlement Layer and the Source Network.