Order Processing
Technical walkthrough of order lifecycle from signing to execution. Details components, sequence, and implementation structures for developers building with the order system.
Orders in Signet enable cross-chain transfers and atomic swaps. They require precise sequencing and coordination between different transactions to ensure secure execution.
Order Components
Orders consist of two essential parts that must execute within the same block:
Initiate - Transfers inputs from the User to the Filler
Fill - Transfers outputs from the Filler to the User
Important Ordering Constraints
Initiate transactions can only mine if the Fill transactions have already mined. This critical sequencing requirement ensures atomic execution.
Initiate
Signed First
Mines Second
Always on Rollup
Fill
Signed Second
Mines First
Host chain, Rollup, or both
Order Execution Flow
User signs the Initiate permit (creating a SignedOrder)
User sends the SignedOrder to a Filler
Filler signs the Fill permit (creating a SignedFill)
Filler creates a transaction Bundle with Fill transaction(s) first, followed by Initiate transaction(s)
Filler sends the Bundle to a Block Builder
Builder mines the Bundle atomically on both Host & Rollup
Note: Despite its name, "Initiate" transactions are always mined after the "Fill" transaction.
Security Considerations for Fillers
Fillers must take special precautions when handling SignedFills:
Keep SignedFills private until mined on-chain
Anyone with a SignedFill can withdraw tokens from the Filler's account
Only share SignedFills with trusted Builders who are contractually bound to maintain Bundle integrity
Leaked SignedFills risk financial loss
Ensure proper transaction ordering
Fill transactions MUST mine before Initiate transactions
Host chain transactions automatically mine before Rollup transactions
For Rollup-based Fills, explicit ordering is required to ensure they mine before Initiate transactions
Chain Execution Requirements
Conditional Transactions: Only the Rollup can enforce conditional transactions, which is why Initiate transactions always happen on the Rollup
Atomic Execution: Both parts of an Order must execute in the same block or neither will execute
Cross-Chain Coordination: Orders can involve transactions on both the Host chain and the Rollup, requiring careful synchronization
Last updated