Skip to main content
This page is operational guidance for running Arkade Intents at volume: what the relay layer can absorb, where the real limits are, and how relays, solvers, and applications should deploy. It describes deployment choices, not new wire behavior: the wire contract remains the RFQ protocol.

The Relay Is Not the Bottleneck

An addressed swap costs four to six relay events of about a kilobyte each: request, quote, and best-effort status. Funding, filling, and claiming never touch the relay. Under an aggressive profile (every user swaps twice a day, every swap goes through a relay, and peak traffic is ten times the average): Concurrent sockets assume connect-on-demand clients: they track active negotiations — swaps per second times the ~30-second session — not user count. Even the 1 M row asks a relay for about 1,400 kilobyte-sized events per second. On the solver side, one core of a 2-vCPU cloud server runs about 90 verify-decrypt-price-sign cycles per second with the solver’s Nostr library, one cycle per quote. That covers the 100 k row’s 23 swaps per second; the 1 M row needs several cores.

What Binds First

Deployment Guidance

Relays

Run dedicated RFQ relays, not general-purpose public ones — the conclusion every production machine-to-machine Nostr protocol reached:
  • Gate reads and writes with NIP-42 AUTH, and serve a p-tagged addressed event only to its tagged recipient — this also stops the who-quotes-whom graph from being public.
  • Require authors, #p, or #t on every subscription; reject open-ended queries.
  • Rate-limit per pubkey and source address in the relay’s write policy.
  • Run relays under at least two independent organizations, in different regions, mirroring each other. Publish addressed traffic to two or more relays and deduplicate by event id — the working defense against a relay selectively delaying one solver’s quotes to steer flow.
A solver card can already list up to eight relays, so all of this is deployment policy, not a wire change.

Solvers

  • Hold persistent, backoff-managed connections to the transaction stream, and reconcile from the indexer after every gap — the stream replays nothing. Alert on gap-minutes: that is capital at risk, not UX.
  • Treat price-cache freshness as a pricing decision. Quote risk scales with feed staleness plus the validity window; shortening either is worth orders of magnitude more than any network optimization (see the arithmetic below).
  • Shed load with rfq_refusal — it is penalty-free and already in the wire. Signed refusals are also attribution: applications can keep per-solver fill and refusal statistics as a selection input.
  • Refresh price feeds on a timer, never synchronously on an unauthenticated event.

Applications

  • Share one connection per relay. @arkade-os/swap multiplexes every quote and card fetch in the app over one Nostr socket per relay, and closes that socket 30 seconds after its last use. The protocol needs nothing held open between swaps: replies correlate by RFQ identifier across reconnects, status is best effort, and contract and destination-network evidence is authoritative.
  • Follow the transport requirements, and deduplicate by event id: multi-relay publication delivers duplicates by design.
  • Warm the relay connection when the swap UI opens. A cold cross-continent handshake costs 200–330 ms — the largest avoidable latency in the flow, fixed by connection timing, not server placement.

Co-Location

The answer splits by how the fill is won.

Quoted routes: proximity is noise

Every quantity a datacenter removes is 100–1000× smaller than the protocol’s own time constants — validity windows of tens of seconds, price caches of seconds, claim headroom and refund horizons of hours: The economics agree. A quote is a free option for the user across feed staleness plus the validity window — roughly 45 seconds at reference defaults, costing a solver several basis points of break-even spread at typical BTC volatility. Full co-location trims about 0.2 s of that window, worth about 0.01 bps. Cutting the price cache from 15 s to 1 s is worth about 0.8 bps — eighty times more — and tightening the validity window from 30 s to 10 s another ~1.6 bps. Where proximity matters for pricing, it is solver to price feed and hedging venue, not solver to relay or user.

Raced fills: proximity is real

An asset swap is filled by whichever solver spends the funded contract first, discovered from the transaction stream — a pure latency race, and cancellation races the fill the same way. Solver-to-operator latency decides who wins, so solver fill infrastructure will rationally sit near the operator. Published-request bidding is a milder race for the application’s selection — one more argument for bounded panels and deadline-based selection over speed.
Never make relay, solver, and operator one failure domain. The one place an hours-scale outage converts to principal loss is near refund locktimes: a single-datacenter deployment puts quoting, fill detection, and claim submission in the same blast radius exactly where the deadlines live. Keep relays with more than one organization and in more than one region, even if every solver’s fill loop sits in one metro.