Skip to main content

Settlement Methods

Overview​

JACK supports three settlement methods for cross-chain intent execution. Users select a method via the SettlementSelector component when creating an intent; the choice determines which provider and contracts handle the swap.

Available Methods​

MethodIDStatusNetworkDescription
LI.FI Cross-Chainlifi🟒 LiveMulti-chainRoute via LI.FI bridge aggregator with best-rate discovery
Yellow NetworkyellowπŸ”΅ DemoSepoliaOff-chain state channel settlement via ClearNode sandbox
Uniswap v4 Hookv4πŸ”΅ DemoSepoliaOn-chain policy-enforced settlement via JACKPolicyHook

Configuration (lib/settlement.ts)​

Settlement methods are defined by the SettlementMethod type and SETTLEMENT_OPTIONS array:

type SettlementMethod = "lifi" | "yellow" | "v4";

interface SettlementOption {
id: SettlementMethod;
label: string;
desc: string;
network: string;
status: "live" | "demo";
}

Sepolia Contract Addresses​

All testnet contract addresses are exported from SEPOLIA_CONTRACTS:

Yellow Network​

ContractAddress
Custody0x019B65A265EB3363822f2752141b3dF16131b262
Adjudicator0x7c7ccbc98469190849BCC6c926307794fDfB11F2

Uniswap v4​

ContractAddress
JACKPolicyHook0xE8142B1Ff0DA631866fec5771f4291CbCe718080
JACKSettlementAdapter0xd8f0415b488F2BA18EF14F5C41989EEf90E51D1A
PoolManager0xE03A1074c86CFeDd5C142C4F04F1a1536e203543

Settlement API​

The dashboard exposes a /api/settlement endpoint that returns method configuration and supports settlement-specific actions.

GET /api/settlement​

Returns all settlement methods with their status, contracts, and endpoints.

{
"methods": {
"lifi": {
"status": "live",
"description": "LI.FI cross-chain bridge aggregator"
},
"yellow": {
"status": "demo",
"network": "sepolia",
"chainId": 11155111,
"contracts": {
"custody": "0x019B65A265EB3363822f2752141b3dF16131b262",
"adjudicator": "0x7c7ccbc98469190849BCC6c926307794fDfB11F2"
},
"clearNodeUrl": "wss://clearnet-sandbox.yellow.com/ws",
"faucetUrl": "https://clearnet-sandbox.yellow.com/faucet/requestTokens"
},
"v4": {
"status": "demo",
"network": "sepolia",
"chainId": 11155111,
"contracts": {
"policyHook": "0xE8142B1Ff0DA631866fec5771f4291CbCe718080",
"settlementAdapter": "0xd8f0415b488F2BA18EF14F5C41989EEf90E51D1A",
"poolManager": "0xE03A1074c86CFeDd5C142C4F04F1a1536e203543"
},
"etherscanBase": "https://sepolia.etherscan.io"
}
},
"testnetProofs": {
"yellow": "/api/settlement/proofs/yellow",
"v4": "/api/settlement/proofs/v4"
}
}

POST /api/settlement​

Trigger settlement-specific actions.

yellow:faucet β€” Request test tokens​

curl -X POST /api/settlement \
-H "Content-Type: application/json" \
-d '{"action": "yellow:faucet", "userAddress": "0x..."}'

Returns { "status": "ok", "faucet": { ... } } on success, or { "status": "fallback", "message": "..." } if the ClearNode faucet is unreachable.

v4:contracts β€” Get v4 contract details​

curl -X POST /api/settlement \
-H "Content-Type: application/json" \
-d '{"action": "v4:contracts"}'

Returns contract addresses plus the deployer address and ownership notes.

Dashboard Components​

SettlementSelector​

A 3-column card grid where users pick their settlement method. Selecting Yellow or v4 shows the relevant contract addresses inline.

Props:

interface SettlementSelectorProps {
selected: SettlementMethod;
onChange: (method: SettlementMethod) => void;
}

ChannelStatusPanel​

Displays real-time settlement status for Yellow or v4 intents:

  • Yellow Network: channel ID, status (active/final/dispute), state version, state hash, adjudicator address, challenge period, settlement transaction
  • Uniswap v4: PolicyHook and Adapter contract addresses, settlement transaction
  • ERC-7824 Metadata: proof count and nonce (when available)

All addresses and transaction hashes link to Sepolia Etherscan.

Props:

interface ChannelStatusPanelProps {
channelId?: string;
channelStatus?: string;
stateIntent?: string;
stateVersion?: number;
stateHash?: string;
adjudicator?: string;
challengePeriod?: number;
settlementTx?: string;
provider?: string; // "yellow" or "v4"
providerMetadata?: Record<string, unknown>;
}

Provider Singletons​

Each settlement method has a singleton provider managed by the dashboard:

ProviderModuleInit functionSDK Class
Yellowlib/yellow.tsinitYellowProvider(config, walletClient)YellowProvider
v4lib/v4.tsinitV4Provider(walletClient, chainId?)V4Provider
LI.FIlib/lifi.tsβ€” (direct API calls)LifiProvider

See Yellow Network Integration and Uniswap v4 Deployment for details on each provider.

Architecture​

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User selects β”‚
β”‚ settlement β”‚
β”‚ method β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ LI.FI β”‚ β”‚ Yellow β”‚ β”‚ Uniswap v4 β”‚
β”‚ (live) β”‚ β”‚ (demo) β”‚ β”‚ (demo) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Multi-chainβ”‚ β”‚ Sepolia β”‚ β”‚ Sepolia β”‚
β”‚ Bridge β”‚ β”‚ State β”‚ β”‚ PolicyHook β”‚
β”‚ Aggregator β”‚ β”‚ Channel β”‚ β”‚ + Adapter β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Intent resolved β†’ ChannelStatusPanel β”‚
β”‚ shows settlement proof + Etherscan link β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Source files: apps/dashboard/src/lib/settlement.ts, apps/dashboard/src/app/api/settlement/route.ts