An order (intent) describes what the user wants: input assets, desired outputs, settlement parameters, and deadlines. Once constructed, submit it to the order server for distribution to the solver network.Documentation Index
Fetch the complete documentation index at: https://docs.li.fi/llms.txt
Use this file to discover all available pages before exploring further.
Order Structure
LI.FI intents use the OIFStandardOrder, which supports single-chain inputs and multi-chain outputs.
Field Reference
| Field | Description |
|---|---|
user | Owner of the input assets. Refund recipient if the order is not filled. |
nonce | Unique identifier per order. For The Compact, this is an allocator nonce. |
originChainId | Chain where the intent originates |
expires | Deadline (unix timestamp) for submitting proof that the order was filled. After this, the order can be refunded. |
fillDeadline | Deadline for the solver to fill the order. Must be before expires. |
inputOracle | Oracle address on the origin chain. Must correspond to outputs[].oracle. |
inputs | Array of [tokenIdentifier, amount] pairs as uint256. For escrow, the token identifier is the address cast to uint256. For The Compact, it is the ERC-6909 identifier. |
outputs | Array of MandateOutput describing desired deliveries |
Output Fields
| Field | Description |
|---|---|
oracle | Oracle address on the output chain. Must be in the same oracle network as inputOracle. |
settler | Output settler contract. Determines auction type and settlement logic. |
chainId | Destination chain identifier |
token | Token identifier on the destination chain |
amount | Output token amount |
recipient | Recipient address for the output tokens and any calldata |
call | Calldata delivered to recipient after token delivery. Set to 0x if not needed. |
context | Auction parameters and settlement context. Set to 0x for simple limit orders. |
Choosing a Resource Lock
Resource locks determine how user funds are held while the solver fills the order.| Lock | Best for | How it works |
|---|---|---|
Simple Escrow (InputSettlerEscrow) | Standard integrations alongside non-resource-lock bridges | User approves the escrow contract (via direct approval or Permit2). Tokens are escrowed per-intent. |
The Compact (InputSettlerCompact) | Resource-lock-native applications | Long-lived deposit. Users deposit once and can issue multiple intents from the same balance. |
Submitting an Order
For non-gasless escrow integrations, submit orders on-chain (for example throughopen / openFor flow) and use the order server for quote discovery + status tracking.
Use POST /orders/submit only when your integration needs off-chain order submission (for example gasless escrow or signed Compact claims). If you used a quote from the order server, include the quoteId for preferential processing.
meta object with orderIdentifier and onChainOrderId for tracking.
On-Chain vs Off-Chain Orders
| Type | Examples | Order server required? |
|---|---|---|
| On-chain | Escrow opened intents, registered Compact claims | No. Solvers and the order server detect these automatically. |
| Off-chain (gasless) | Gasless escrow intents, signed Compact claims | Yes. Submit via POST /orders/submit. |
The order server is a convenience layer, not a requirement for on-chain orders. All on-chain intents can be submitted without it. Some solvers detect on-chain intents independently.
Calls on Delivery
EachMandateOutput supports a call field for calldata executed on the destination chain after token delivery. The recipient receives tokens first, then the output settler calls outputFilled(bytes32 token, uint256 amount, bytes executionData) on the recipient contract.
When using calls on delivery:
- Tokens are delivered before the call executes for each individual output
- If the call fails, the entire intent cannot be filled
- The recipient must be a contract that implements
outputFilled, not an EOA - For multi-chain outputs, only the first output should include calldata
outputFilled. Contact LI.FI if you need an SCA implementation.
Intent Validation
Before submitting, validate your order against these rules.Security
- Ensure the oracle network is secure relative to the intent value
- All oracles (input and output) should belong to the same network
- Multi-output orders can be vulnerable to DoS by filling only the first output. Make the first output the most valuable.
- Calls from the output settler cannot be trusted for authentication since anyone can fill outputs
- Set
useras the intended refund recipient, not the intent issuer or relay address.
Correctness
- Use known, reliable tokens, settlement contracts, and oracles
- Use the fewest tokens possible. Low-value or obscure tokens reduce fill likelihood.
- Provide sufficient time between
fillDeadlineandexpiresto accommodate messaging delays - Ensure the nonce is unique. Escrow requires user uniqueness, while The Compact requires allocator uniqueness.
- For The Compact, ensure all inputs share the same allocator and the resource lock expiry is after the intent expiry
Next Steps
Track Order Status
Monitor order progress and handle terminal states
Request a Quote
Fetch solver pricing before constructing an order
Input Settlement
Escrow and Compact registration details
Oracle Systems
Oracle networks and verification

