Skip to main content
See /concepts/lifecycle for the end-to-end flow (policy → trigger → bond → wait/sell decision).
This page is non-prescriptive — these are observed patterns, not blessed recipes. Use them as starting points.
V5.4 ships 6 active products — flash-crash cover on BTC and ETH at 1h / 24h / 48h durations. There is no stablecoin-depeg or borrow-rate product in the current catalogue. See Products and assets for the full table.

1. Hedge a long position

You hold $50k in BTC and want to floor downside in case of a flash crash.
const cover = (50_000 * 1_000_000).toString()  // $50k in 6-dec USDC
await lumina.policies.purchase({
  productName: 'FLASHBTC24-001',                // SDK auto-resolves productId hash + asset='BTC'
  buyer: yourWallet,
  coverageAmount: cover,
})
The premium is paid in USDC and the bond pays out in $LUMINA, but the covered asset for this shield is BTC. See Covered asset vs payment asset. Premium is a small fraction of cover (priced by the shield’s parametric model and the marginBps safety margin). If the flash crash happens within 24h, you receive a bond worth ~80% of the cover (payoutRatioBps).

2. Compounding

Every time a bond matures, redeem and immediately rotate into a new policy:
const bonds = await lumina.bonds.list()
for (const bond of bonds) {
  if (bond.maturityEpoch && bond.maturityEpoch < Math.floor(Date.now() / 1000)) {
    // redeem on-chain via bondVault.redeem(epochId)  — see /sdk/bonds
    await rotateIntoPolicy(bond.faceValueUsdc)
  }
}

3. Marketplace sniping

See Bond Marketplace for the full primer on listings, fees (150 bps maker + 150 bps taker), the anti-spam floor, and the SDK surface.
Watch the listings feed; buy bonds priced below face value with short maturity:
const cheap = (await lumina.marketplace.listings({ sortBy: 'price-asc' }))
  .filter((l) => BigInt(l.totalPriceUsdc) < (BigInt(l.amount) * 95n) / 100n)
  .filter((l) => /* short maturity */ true)

for (const listing of cheap) {
  // … purchase via /api/v1/marketplace/buy (see API reference)
}

4. Insurance-as-a-service for downstream bots

If you’re running a fleet of trading bots, mint one Lumina API key per bot and have the bot insure each position it opens. The audit trail is per-bot because each bot’s wallet is a distinct buyer.

What NOT to do

  • Don’t poll /health more than once per process boot. Cache the addresses; they don’t change between deploys.
  • Don’t omit Idempotency-Key on retries. If you retry without it and the previous attempt succeeded silently, you’ll buy two policies and pay two premiums.
  • Don’t trust webhook payloads without verifying X-Lumina-Signature. Anyone who knows your URL could otherwise spoof events.