Skip to main content
Liquidation addresses are persistent Bitcoin L1 deposit addresses. Each incoming deposit automatically creates an order that swaps and bridges into USDC and delivers it to a fixed destination. This is the right integration when you want a static bc1... address and you do not want to call /quote and /submit per deposit.

How It Works

  1. You create a liquidation address with a fixed USDC destination.
  2. Flashnet returns an L1 deposit address (l1DepositAddress).
  3. Any BTC deposit to that address creates an order.
  4. You track the order by receiving partner webhooks.
Orders created from liquidation deposits have:
  • sourceChain = bitcoin
  • sourceAsset = BTC
  • destinationAsset = USDC
  • quoteId = null

Create a Liquidation Address

const BASE_URL = 'https://orchestration.flashnet.xyz';

const res = await fetch(`${BASE_URL}/v1/liquidation-addresses`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${process.env.FLASHNET_API_KEY}`,
    'X-Idempotency-Key': `liq:create:${Date.now()}`,
  },
  body: JSON.stringify({
    label: 'Merchant settlement (Base)',
    destinationChain: 'base',
    destinationAddress: '0xYourBaseUsdcAddress',

    // If true, deposits may be credited via ZeroConf before confirmations.
    // If false, deposits wait for confirmations before processing.
    zeroconfEnabled: false,

    feeBps: 5,
    slippageBps: 50,
  }),
}).then((r) => r.json());

// res.l1DepositAddress is the reusable Bitcoin address.
console.log(res.l1DepositAddress);
Response fields:
  • liquidationAddressId: stable id
  • l1DepositAddress: Bitcoin deposit address (bc1...)
  • sparkAddress: Spark address used internally for deposit claiming and sweeps
  • destination.chain and destination.address: fixed USDC destination

Deposit Lifecycle

Each Bitcoin deposit is identified by (txid, vout), where vout is the output index that paid the liquidation address. A single Bitcoin transaction can contain multiple outputs to different liquidation addresses (or multiple outputs to the same address). For reliable attribution, use webhooks and store order.id from the payload.

Webhooks

Liquidation deposits create normal order.* webhook events. To receive them:
  1. Register an endpoint with POST /v1/webhooks.
  2. Verify X-Flashnet-Signature on inbound requests.
  3. Treat webhook delivery as at least once.
See Webhooks.

Manage Addresses

List enabled liquidation addresses:
  • GET /v1/liquidation-addresses
Get an address by id (enabled or disabled):
  • GET /v1/liquidation-addresses/:id
Disable an address:
  • DELETE /v1/liquidation-addresses/:id (requires X-Idempotency-Key)

ZeroConf Notes

Liquidation addresses require ZeroConf to be configured on the Flashnet side in order to provision deposit addresses. If it is not configured, creation returns 500 misconfigured. If you enable zeroconfEnabled on a liquidation address, deposits may be accepted before confirmations. If disabled, the engine waits for confirmations before processing.

Next Steps