Satoshi Cost Rollup

What this is

The platform-wide instrument that measures, accumulates, and settles cost-to-serve in satoshis instead of seat-based fiat. Every event, agent decision, byte-day, and external passthrough is metered and rolled up to the merchant level; period-end statements are committed to a Bitcoin L2 via canary-blockchain-anchor and settled via Lightning. The natural extension of three patent-protected primitives already in the stack — ILDWAC, L402-OTB, and blockchain-anchor — composed into a single commercial mechanism.

Purpose

Replaces seat-based pricing with usage-anchored pricing. Aligns Canary's incentive with merchant efficiency (fewer wasteful events → lower bill). Exposes channel rev-share as architecture (data-flow attribution) rather than contract clause. Makes the moat — verifiable billing against Bitcoin L2 — a sales conversation in the first thirty seconds of the diagnostic.

Structure

Cost components

sat_cost(merchant, period) =
  Σ events × tier_weight × service_unit_cost      ← ingestion + processing
+ Σ storage_GB × tier × days                      ← retention
+ Σ agent_decisions × decision_cost               ← MCP / API
+ Σ external_passthroughs                         ← upstream API costs
+ Σ blockchain_anchor_share                       ← amortized L2 commit
+ base_platform_floor                             ← merchant-tier minimum

Settlement modes

Mode When Primitive
Pre-funded OTB Steady-state L402-OTB Lightning wallet
Per-call gate High-value or external-passthrough calls L402 invoice on insufficient budget
Period-end with L2 anchor Trusted merchants, monthly close Merkle root → blockchain-anchor → Lightning

Key tables (per satoshi-cost-rollup.md SDD)

Consumers

Sources

Routing

service emits cost_event
  → metrics.cost_events (Postgres, partitioned by month)
  → Valkey accumulator updates (per-merchant, per-period)
  → l402-otb gate consults accumulator
  → period-end reconciliation cron
  → rollup query produces line items
  → Merkle root computed
  → canary-blockchain-anchor batch commit
  → Lightning invoice generated
  → merchant pays
  → channel rev-share settles to partner Lightning addresses
  → cost_events.settlement_id set

Why this is the moat

Three claims competitors can't make:

  1. Verifiable billing against Bitcoin L2. Patent-protected primitive (canary-blockchain-anchor). No POS competitor has this; none can build it without rebuilding the evidentiary rail.
  2. Microservice-level cost transparency. Canary's bill is itemized by service consumed. Square / Lightspeed / Toast charge flat fees that hide cost-to-serve. Canary's structure is transparent by construction.
  3. Channel rev-share as data-flow architecture. Channel partners earn a share of every satoshi flowing through their adapter — settled per period, anchored per L2 commit. No quota negotiation; no annual contract.

Anti-pattern

See also