Skip to content

Instantly share code, notes, and snippets.

@patcito
Created February 19, 2026 17:00
Show Gist options
  • Select an option

  • Save patcito/24700fa7948ce10d960ca8898ae756ff to your computer and use it in GitHub Desktop.

Select an option

Save patcito/24700fa7948ce10d960ca8898ae756ff to your computer and use it in GitHub Desktop.

Circuit Breaker Queue — USD Values

Updated: GET /status/ftusd/circuit-breaker/queue

Two new fields added per outflow: fromAmountUsd and toAmountUsd.

New Fields

Field Type Description
fromAmountUsd string USD value of fromAmount (e.g. "1.00"). Omitted if price unavailable.
toAmountUsd string USD value of toAmount (e.g. "0.99"). Omitted if price unavailable.

Example Response

{
  "success": true,
  "outflows": [
    {
      "queueId": 42,
      "action": "redeem",
      "fromToken": { "address": "0x04e6...", "symbol": "ftUSD", "decimals": 6 },
      "fromAmount": "1000000",
      "fromAmountFormatted": "1.0000",
      "fromAmountUsd": "1.00",
      "toToken": { "address": "0x2921...", "symbol": "USDC", "decimals": 6 },
      "toAmount": "999500",
      "toAmountFormatted": "0.9995",
      "toAmountUsd": "1.00",
      "recipient": "0xabc...",
      "queuedAt": 1739900000,
      "settlesAt": 1739921600,
      "status": "pending",
      "timeUntilSettled": 3600,
      "claimable": false,
      "transactionHash": "0xdef..."
    }
  ]
}

Pricing Logic

  • ftUSD / sftUSD: 1:1 with USD (stablecoin peg)
  • Collateral tokens (USDC, wS, etc.): price from on-chain MintAndRedeem oracle
  • Fields are omitted (not present in JSON) when price is unavailable

TypeScript Update

interface EnrichedQueuedOutflow {
  queueId: number;
  action: 'buy' | 'buyAndStake' | 'unstake' | 'redeem' | 'unknown';
  fromToken: TokenInfo;
  fromAmount: string;
  fromAmountFormatted: string;
  fromAmountUsd?: string;       // ← NEW
  toToken: TokenInfo;
  toAmount: string;
  toAmountFormatted: string;
  toAmountUsd?: string;         // ← NEW
  recipient: string;
  queuedAt: number;
  settlesAt: number;
  status: 'pending' | 'executed' | 'paused';
  timeUntilSettled: number;
  claimable: boolean;
  notClaimableReason?: string;
  transactionHash?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment