Source-available transaction integrity engine

Declare your economy.
Meridian runs it.

A Kubernetes-style manifest declares your instruments, accounts, pricing and settlement. Meridian operates it — durable sagas that complete or compensate, on a double-entry ledger that can explain every penny, kilowatt-hour, and carbon credit.

economy.yaml
your running economy
GBPINSTRUMENT · CURRENCYBET_UNITINSTRUMENT · VOUCHERbet_unit_to_gbpSYNDICATE_POOLACCOUNT · CREDITBET_POSITIONACCOUNT · DEBITPLATFORM_COMMISSIONACCOUNT · CREDITsettle_syndicate()SAGA · event-drivenDR 100.00 = CR 100.00ledger balanced ✓
№ 01The drift

Every company becomes a financial company. Few mean to.

It never happens all at once. It happens one reasonable sprint at a time.

Day one

A checkout and a cron job

Stripe takes the card. A nightly script tots it up. Done, you think.

Month three

Usage metering

Pricing goes per-seat, then per-event. Someone builds a counter table.

Month nine

Revenue splits

Partners want their cut, automatically. The cron job grows branches.

Year one

The audit

"Show us the transaction trail." There isn't one. There are logs.

Today

You run a financial system

Unreconciled, undocumented, load-bearing. And it was never the product.

Meridian is the financial system you were always going to end up building — already built, audit‑grade, and declared rather than accreted.

№ 02Declare, then run

Infrastructure went declarative. Money didn't. Until now.

Kubernetes taught a generation that you don't script servers into existence — you declare the state you want and a control plane keeps it true. Meridian applies the same idea to value: the manifest is the running system.

  • Declared, not coded

    Instruments, account types, valuation rules and settlement sagas in one YAML document. Applying it is the deployment — no PRs to Meridian core, no migrations.

  • Operated, not provisioned

    Meridian doesn't just create the configuration; it runs it. Scheduled billing fires monthly. Settlement triggers when market data lands. Failed steps reverse themselves.

  • Writable by AI, safely

    Because the format is constrained and schema-checked at compile time, an AI assistant can draft a working economy in conversation — and the manifest can only call real handlers with real types.

cookbook/patterns/tote-betting
# A parimutuel betting platform: pooled stakes, market-data
# settlement, 15% commission, Stripe Connect payouts.
instruments:
  - code: BET_UNIT
    type: INSTRUMENT_TYPE_VOUCHER

accountTypes:
  - code: SYNDICATE_POOL
    normalBalance: NORMAL_BALANCE_CREDIT
    policies:
      validation: "amount > 0"
      bucketing: "attributes.syndicate_id"
  - code: BET_POSITION
    normalBalance: NORMAL_BALANCE_DEBIT
    allowedInstruments: [BET_UNIT]
  - code: PLATFORM_COMMISSION
    normalBalance: NORMAL_BALANCE_CREDIT

valuationRules:
  - name: bet_unit_to_gbp
    method: VALUATION_METHOD_FIXED

sagas:
  - name: create_syndicate
  - name: join_syndicate
  - name: settle_syndicate
    trigger: event:market-information.observation-recorded.v1
  - name: refund_syndicate

Abridged from a real cookbook pattern — the full platform is under 400 lines. Read the whole thing →

< 400lines of manifest for a complete betting platform
0code deployments to launch a new economy
22ready-made patterns in the cookbook
№ 03Durable execution

Durable execution — with the books built in.

Workflow engines can promise your workflow finished. Meridian promises something stronger: the ledger agrees it finished. Every multi-step movement of value either completes, or its compensations run backwards until the books balance again. No orphaned charges. No partial state. No 2am reconciliation spreadsheet.

saga: settle_syndicate · running
reserve_fundspendingpost_to_ledgerpendingexecute_payoutpendingconfirm_settlementpendingcompensations run backwardsLEDGER BALANCED · no partial stateevery step completed — or every step undone

Plain code, not a workflow DSL

Sagas are written in Starlark, the Python subset Google built for Bazel. Your team reviews them like any other code. No imports, no network, no filesystem — the runtime enforces step limits, so every workflow provably terminates.

Compensation is the contract

Each step declares how to undo itself. When the payment network times out at the final step, Meridian reverses every completed step automatically — and the audit trail records the whole episode, including the failure.

№ 04The ledger underneath

One ledger for everything your business calls value.

Underneath the manifest and the sagas sits a double-entry ledger that treats money, megawatts and carbon with the same rigour your bank applies to pounds.

a

Every asset, typed

Currency, kWh, CO₂e, compute hours, vouchers — native instruments in a single ledger, with type safety that refuses to add pounds to kilowatt-hours.

multi-asset · dimensioned units
b

Audit-grade by construction

Double-entry posting with an immutable trail. When your auditor asks where the money went, the answer is a query — not an archaeology project.

immutable · bi-temporal
c

Data that knows its quality

Every measurement carries what was known and when. The quality ladder — Estimate → Coefficient → Actual → Revised — absorbs late and out-of-order data without locking the database.

estimate → actual · wash & reload
d

Collection included

Stripe Connect for multi-tenant payment collection, dunning escalation, refund compensation, and reconciliation that flags variances before your customers do.

stripe connect · reconciliation
№ 05The economy cookbook

Start from a working economy, not a blank page.

The cookbook is a registry of vetted patterns — manifest fragments plus sagas — for whole business models. Copy one into your tenant, apply, and it runs. Browse them live inside the demo.

Browse all patterns →
tote-betting

Tote (Parimutuel) Betting Platform

Syndicate-based parimutuel betting with pooled stakes, equal-entry bets tracked as voucher instruments, market-data-driven settlement, 15% platform commission, and Stripe Connect payouts via the Financial Gateway.

4 sagas 4 account types BET_UNIT
energy-settlement

Energy Usage-to-Value Settlement

Converts metered kWh into monetary value using market rates. Creates retail and wholesale GBP positions from energy consumption.

1 saga 3 account types KWH
saas-billing

SaaS Compute Billing

Usage-based billing for cloud compute resources. Meters GPU hours, API calls, and storage consumption, then converts to USD charges via valuation rules. Includes platform credits as a voucher instrument.

3 sagas 4 account types GPU_HOUR · API_CALL · STORAGE_GB · CREDIT
carbon-offset

Carbon Credit Registry

Carbon credit trading and retirement with verified emission reductions (VERs) and certified emission reductions (CERs). Tracks credit provenance by vintage year and project, with a permanent retirement account for irrevocable credit retirement.

2 sagas 2 account types TONNE_CO2E · VER · CER
dynamic-capacity-pricing

Dynamic Capacity Pricing

Self-referential feedback loop pricing for compute tokens. Bills token consumption at rates derived from the platform's own utilisation forecasts per data centre region. Usage patterns drive pricing, and pricing shapes usage patterns.

1 saga TOKEN
kyc-compliance

KYC Compliance Workflow

Initiates KYC verification when an individual party is created. Uses the compliance marker pattern: books a zero-amount position log to track outstanding KYC obligations per jurisdiction. Compliance accounts are resolved via entity graph traversal.

1 saga 1 account type
№ 06Run it yourself

The whole engine, on your laptop, in one command.

Every service compiles into a single binary. Docker Compose brings up the full platform — ledger, sagas, web UI — with nothing to configure.

  • Register customers, open accounts, watch postings hit the ledger
  • Every operation runs as a saga with automatic compensation
  • REST on :8090, gRPC on :50051, UI on :5173
$ git clone https://github.com/meridianhub/meridian.git
$ cd meridian
$ make dev-up
✓ ledger · sagas · gateway · ui  —  ready
№ 07The terms, plainly

Source-available. Honestly priced. Eventually open.

You're trusting this engine with your books, so the terms are on the front page.

Licence
Business Source License 1.1 — read, modify, and deploy. The code is all there.
Free in production
Up to 5,000 active accounts across all tenants. Development, testing and evaluation are always free.
Beyond that
A commercial licence — ben@meridianhub.org
And then
Converts to Apache 2.0 on 12 February 2030. Worst case, you wait us out.

GogRPC + Protocol BuffersPostgreSQL / CockroachDBApache KafkaKubernetesStarlark + CELStripe ConnectOpenTelemetry

Design partners wanted

Have an economy that doesn't fit the billing tools?

Usage that arrives late. Value that isn't money. Splits that auditors will read. That's exactly what we built this for — and we're looking for a handful of teams to build alongside.