Skip to main content

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.

The Compact flow uses The Compact resource lock for off-chain, gasless order submission. Users deposit tokens once and can issue multiple intents from that balance without paying gas per order.
If you’re adding LI.FI Intents alongside other bridges, the standard escrow flow is simpler and recommended. Use the Compact flow when you need gasless submissions or are building a resource-lock-native application.

How It Differs from Escrow

EscrowCompact
Token lockingPer-intent, on-chain each timeDeposit once, reuse balance
Order submissionOn-chain (open/openFor)Off-chain (POST /orders/submit)
Gas per intentUser pays gas to lockGasless after initial deposit
Settlementfinalise (no signature needed)finaliseWithSignature (signatures required)
Order typeN/A (detected on-chain)CatalystCompactOrder

Contract Addresses

These are the same across all supported chains:
ContractAddress
InputSettlerCompact0x0000000000cd5f7fDEc90a03a31F79E5Fbc6A9Cf
The Compact0x00000000000000171ede64904551eeDF3C6C9788
Polymer Oracle (mainnet)0x0000003E06000007A224AeE90052fA6bb46d43C9
Output Settler0x0000000000eC36B683C2E6AC89e9A75989C22a2e

Flow

1

Deposit into The Compact

Deposit tokens into The Compact resource lock. This is a one-time on-chain transaction. Subsequent intents draw from this balance without additional gas.See the lintent.org demo for a UI example of depositing and registering intents.
2

Request a quote

Same as the escrow flow. Call POST /quote/request. Include "oif-resource-lock-v0" in supportedTypes to indicate Compact support.
const response = await fetch('https://order.li.fi/quote/request', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    user: '0x0001000002210514YOUR_WALLET_ADDRESS_20_BYTES',
    intent: {
      intentType: 'oif-swap',
      inputs: [{
        user: '0x0001000002210514YOUR_WALLET_ADDRESS_20_BYTES',
        asset: '0x0001000002210514833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',  // USDC on Base
        amount: '10000000',
      }],
      outputs: [{
        receiver: '0x0001000002A4B114YOUR_WALLET_ADDRESS_20_BYTES',
        asset: '0x0001000002A4B114af88d065e77c8cC2239327C5EDb3A432268e5831',  // USDC on Arbitrum
        amount: null,
      }],
      swapType: 'exact-input',
    },
    supportedTypes: ['oif-escrow-v0', 'oif-resource-lock-v0'],
  }),
});

const { quotes } = await response.json();
const bestQuote = quotes[0];
3

Sign the claim

Compact orders are authorized via EIP-712 signatures rather than on-chain transactions. Sign a BatchClaim using The Compact’s domain separator.
TypeScript
// The claim is signed as a BatchCompact struct:
// struct BatchCompact {
//   address arbiter;        // InputSettlerCompact address
//   address sponsor;        // User address
//   uint256 nonce;          // Allocator nonce
//   uint256 expires;        // Claim expiry
//   uint256[2][] idsAndAmounts;
//   Mandate mandate;        // fillDeadline, inputOracle, outputs
// }
For a complete signing example, see the lintent.org demo.
4

Submit the order off-chain

Submit the signed order to POST /orders/submit. Include the quoteId for preferential solver matching.
curl -X POST 'https://order.li.fi/orders/submit' \
  -H 'Content-Type: application/json' \
  -d '{
    "orderType": "CatalystCompactOrder",
    "inputSettler": "0x0000000000cd5f7fDEc90a03a31F79E5Fbc6A9Cf",
    "quoteId": "QUOTE_ID_FROM_STEP_2",
    "order": {
      "expires": 1942819670,
      "user": "0xYOUR_WALLET_ADDRESS",
      "nonce": "1004",
      "originChainId": "8453",
      "fillDeadline": 1942819670,
      "inputOracle": "0x0000003E06000007A224AeE90052fA6bb46d43C9",
      "inputs": [
        ["749071750893463290574776461331093852760741783827", "10000000"]
      ],
      "outputs": [{
        "oracle": "0x0000000000000000000000000000003E06000007A224AeE90052fA6bb46d43C9",
        "settler": "0x0000000000000000000000000000000000eC36B683C2E6AC89e9A75989C22a2e",
        "chainId": "42161",
        "token": "0x000000000000000000000000af88d065e77c8cC2239327C5EDb3A432268e5831",
        "amount": "9986765",
        "recipient": "0x000000000000000000000000YOUR_WALLET_ADDRESS",
        "callbackData": "0x",
        "context": "0x"
      }]
    }
  }'
CatalystCompactOrder submissions require a sponsor signature or Compact registration tx hash. The payload above is a reference template. You must include the appropriate signature fields. Always test on order-dev.li.fi before production.
The response includes a meta object with orderIdentifier and onChainOrderId for tracking.
5

Track the order

Same as the escrow flow. Poll GET /orders/status until settlement.
const trackOrder = async (orderId: string) => {
  let status: string;
  do {
    const res = await fetch(
      `https://order.li.fi/orders/status?catalystOrderId=${orderId}`
    );
    const data = await res.json();
    status = data.meta.orderStatus;
    console.log(`Status: ${status}`);

    if (status !== 'Settled' && status !== 'Expired') {
      await new Promise(r => setTimeout(r, 3000));
    }
  } while (status !== 'Settled' && status !== 'Expired');

  return status;
};

await trackOrder(order.meta.orderIdentifier);

Integration Examples


Next Steps

Input Settlement

Compact claim structure, registration, and Permit2 details

Resource Locks

How resource locks, sponsors, allocators, and arbiters work

Create and Submit Orders

Full order construction reference and validation rules

Track Order Status

Monitor orders via the API or on-chain events