Subscribe to get high-signal insights on how modern fintech is built.

analysis

The Ledger Is Becoming the Control Plane

Three companies approached fintech infrastructure from different directions and arrived at the same architecture: the ledger as the single enforcement point for financial constraints.

By Alex Kugell ·

When your fintech product processes its first payment, the ledger records what happened. Debit this account, credit that one, store the timestamp.

At ten payments per minute, that recording function is the entire job. An engineer can query the ledger to check a balance, and the answer comes back before anyone notices the wait.

At ten thousand payments per minute, the ledger is doing something different. It's no longer just the system of record. It's the system that decides whether the next transaction is allowed to happen at all. Can this account afford this debit? Has this user exceeded their daily limit? Does this multi-party split round correctly before any money moves?

Three companies approached this problem from different directions over the past two years and arrived at the same architectural answer. Fragment built entry conditions into its ledger schema. Formance created Numscript, a domain-specific language for declaring atomic money movement. Modern Treasury added approval rules that gate payments based on amount, account, or metadata. Each one turned the ledger from a passive recorder into an active enforcer.

What changes when the ledger enforces constraints

A traditional payments architecture separates the decision from the record. Your application logic checks whether an account has sufficient funds, then calls a payments API, then writes the result to the ledger. At each step, the state of the world can change between the check and the write.

That gap between "check the balance" and "post the entry" is where most financial bugs live. Two concurrent requests read the same balance, both see sufficient funds, and both post. Or the payment API succeeds but the ledger write fails. Or the split calculation in your application code doesn't match the precision your ledger expects.

A control-plane ledger collapses those steps. The balance check, the constraint evaluation, and the ledger write happen in the same atomic operation. When the constraint fails, nothing posts. When it succeeds, the entry and the proof that the constraint was met are recorded together.

Application-layer vs ledger-native enforcement
Application-Layer
Request
Payment or transfer initiated
App reads balance
SELECT balance FROM accounts
App checks limit
if (balance >= amount) …
State can change here
Race conditions · Stale balances · Partial failures
API call
POST /payments
Ledger writes entry
INSERT INTO entries
Ledger-Native
Request
Payment or transfer initiated
Ledger evaluates condition + writes atomically
Balance check, limit enforcement, and entry posted in one operation
FragmentFormanceModern Treasury
MechanismEntry conditionsNumscript DSLApproval rules
EnforcesBalance thresholds, preconditions on stateMulti-party splits, caps, cascading sourcesAmount thresholds, metadata conditions
WhenAt ledger write, atomicallyAt script execution, all-or-nothingBefore bank submission
LatencyMachine-speed, no human in loopMachine-speed, no human in loopHuman review required

This matters for compliance as much as correctness. When a regulator asks how daily transaction limits are enforced, a ledger-native control plane can point to the rejection rule itself since the limit lives in the ledger, not in application code that runs before an API call. The enforcement and the audit trail are the same system.

Fragment: Conditions in the schema

Fragment approaches control-plane behavior through its schema definition. You declare the rules at the account level, and the ledger evaluates them on every entry.

A precondition checks that a balance matches an expected value before an entry posts. If another transaction modified the balance between your read and your write, the precondition fails and the entry is rejected. This eliminates the race condition at the infrastructure layer rather than forcing every application developer to handle it.

A postcondition guarantees a balance stays within bounds after the entry. The most common case: totalBalance >= 0, meaning the ledger will never allow an overdraw. Any entry that would push the account negative is rejected atomically.

Both require the account's consistencyConfig.totalBalanceUpdates set to strong, which trades some write throughput for the guarantee that the balance is always current. Fragment's architecture, built on DynamoDB with pre-computed balance deltas, is designed to make that tradeoff viable at high transaction volumes. Their Building Balances blog series documents the engineering: delta-based balance computation for low-latency reads and conflict-free replicated writes for throughput, with a forthcoming third installment on fault tolerance.

Ramp uses Fragment as what they call "the control plane for our coding agents." The agent proposes a transaction, and Fragment evaluates whether the ledger state allows it.

Fragment entry conditions
Entry submitted
Precondition check
Does current balance match expected value?
Rejected
Postcondition check
Will balance stay ≥ 0 after posting?
Rejected
Entry posts atomically
Balance update + constraint proof recorded together

Formance: A language for money movement

Formance took a different path. Instead of embedding constraints in a schema, they built a programming language for expressing financial transactions.

Numscript is a declarative DSL where you describe the intent of a transaction rather than the mechanics. A marketplace payout that splits revenue 85% to a driver, 10% to charity, and the remainder to platform fees is a single Numscript declaration. The Formance ledger executes the entire script atomically: every posting succeeds or fails as one unit.

The language handles details that trip up application code in production. Cascading sources let you draw from multiple funding accounts with caps: "take up to $20 from the coupon pool, then pull the rest from the customer's wallet." Numscript uses integer math with built-in rounding rules and Unambiguous Monetary Notation to make fee splits deterministic. No floating-point arithmetic touches the money path.

Because Numscript is open-source with a standalone interpreter, you can embed it outside the Formance stack. The language is the interface. An engineer evaluating Formance can read the Numscript for a complex multi-party payout and understand exactly what will happen, because the language was designed to be readable by accountants and auditable by compliance teams.

The architectural bet is that financial transactions are better expressed as programs than as API calls. An API call says "move $50 from A to B." A Numscript program says "split this payment across four accounts with these percentages, cap the fee at this amount, and fail the entire operation if any account would go negative."

One Numscript declaration → atomic multi-party settlement
Numscript program
send $100 from @customer
  to @driver   85%
  to @charity  10%
  to @platform remaining
Formance Ledger
Executes atomically
All-or-nothing
$85
85%
Driver account
$10
10%
Charity account
$5
5%
Platform fee
Cascading sources
from @coupon_pool max $20
from @customer_wallet remaining

Modern Treasury: Human-in-the-loop at the ledger layer

Modern Treasury's approach reflects its position as payment operations infrastructure for enterprise finance teams. Its approval rules gate transactions based on configurable conditions: amount thresholds, bank account type, metadata filters, or combinations connected by AND/OR logic.

When a payment order matches a rule, the system requires human reviewers from specified groups to approve or deny it. Multiple rules can trigger sequentially, creating approval chains. A $50,000 wire might require a Finance Analyst to review first, then a Finance Manager. The payment doesn't move until every required reviewer approves.

This is the most conservative form of ledger-as-control-plane. The constraint is a human judgment enforced by the infrastructure rather than a balance check or an atomic script. The system routes the decision to the right person, records their response, and maintains an audit trail of every rule change and every review.

Modern Treasury logs rule modifications and notifies administrators when rules change. Only users with explicit administrator permissions can modify rules. The controls apply to external accounts too: a manually created bank account can require approval before any payments flow through it.

Modern Treasury approval chain
Payment order
$50,000 wire to external account
Rule evaluation
Amount > $10,000 AND account type = external
Finance Analyst review
First reviewer in approval chain
Blocked
Finance Manager review
Sequential approval — requires all reviewers
Blocked
Payment executes
Audit trail: rule match → analyst approval → manager approval
Rule modifications logged · admin-only permissions · every review recorded

With Modern Treasury's application for an OCC national trust bank charter, the company that built the payment approval abstraction layer is becoming the bank underneath. The trust bank charter piece covers what that collapses architecturally.

Why now

Agent-initiated transactions are the primary accelerant. A human operator can review a payment in a dashboard before clicking "approve." An agent generating transactions programmatically cannot pause for human review on every operation. The constraints have to be evaluated at the ledger layer, in real time, at the moment the entry tries to post. Fragment's entry conditions and Formance's Numscript are built for this. Modern Treasury's approval rules still require a human, but the company's roadmap, from the trust bank filing to its API-first architecture, suggests programmatic approvals are coming.

But the shift predates agents. Multi-party payment flows have been demanding atomicity that simple payments APIs can't express for years. A marketplace disbursement that splits revenue across a seller, a platform fee, and a tax withholding involves four or more ledger entries that must succeed or fail together. Orchestrating that across separate API calls creates partial-failure states that are expensive to reconcile. A ledger that executes multi-entry transactions atomically eliminates that class of bug entirely.

Compliance pulls in the same direction. You can't prove you enforced a daily limit if the enforcement logic lives in application code that changes every sprint while the audit trail lives in a separate database. When the ledger enforces the limit and records the enforcement in the same write, the proof is architectural.

The open-source spectrum

The managed infrastructure from Fragment and Modern Treasury sits at one end of a spectrum. At the other end, open-source libraries give engineering teams direct control over ledger logic.

Formance occupies a middle position. Numscript is open-source with a standalone interpreter, and the Formance ledger platform is available as both a self-hosted deployment and a managed cloud service. Teams that want the declarative transaction language without vendor lock-in can embed the interpreter and build their own operational layer around it.

Medici is a Node.js double-entry accounting library that stores entries in MongoDB. It handles the bookkeeping primitives, debits, credits, balance queries, journal entries, but leaves consistency guarantees and constraint enforcement to the application. For teams building a ledger into an existing Node.js stack with moderate transaction volumes, Medici provides the accounting primitives without the overhead of a separate infrastructure service.

Hledger is a plain-text accounting tool in the tradition of Ledger CLI. It uses human-readable text files as the ledger format, which makes it version-controllable and diffable. Hledger is designed for personal and small-business accounting rather than production payment systems, but its balance assertions, a declaration that an account's balance must equal a specific amount at a specific point in time, are a simple form of constraint enforcement at the data level.

The tradeoff across this spectrum is consistent. Managed infrastructure handles consistency and throughput scaling, while open-source tools give you control over the ledger logic but leave you responsible for making that logic survive production traffic and concurrent writes.

What convergence tells us

Fragment, Formance, and Modern Treasury started from different premises. Fragment began as a high-throughput ledger API for fintech engineers. Formance set out to open-source the payment ledger, and Modern Treasury built payment operations tooling for enterprise finance teams.

All three converged on the same insight: the ledger is the only component in a payments architecture that sees every transaction and knows every balance. Putting constraint enforcement anywhere else means the enforcement and the evidence are in different systems, maintained by different teams, drifting apart over time.

The a16z thesis that institutions are selectively adopting "programmable financial infrastructure," cherry-picking atomic settlement and programmable money while discarding permissionless access, maps cleanly onto what these three companies built. The control-plane ledger is programmable financial infrastructure with institutional guardrails baked in at the transaction layer.

Whether the market consolidates around managed platforms, open-source tools, or some combination depends on how fast agent-initiated transactions scale. At low volume, the distinction between checking a constraint in your application code and checking it in the ledger is academic. At the volumes where agents operate, with hundreds of transactions per minute per agent across thousands of agents, the ledger-as-control-plane architecture becomes the only approach where the enforcement is guaranteed to keep up with the throughput.

Sources

Frequently Asked Questions

What does it mean for a ledger to become a control plane?
A traditional ledger records what happened after a transaction completes. A control-plane ledger enforces constraints before a transaction can post. Fragment's entry conditions reject transactions that would overdraw an account. Formance's Numscript declares multi-party splits as atomic operations. Modern Treasury's approval rules require human sign-off based on amount thresholds or metadata. In each case, the ledger decides whether a transaction is allowed, not just whether it was recorded.
How does Fragment's entry conditions feature work?
Fragment lets you define preconditions and postconditions on ledger entries in your schema. A precondition checks that a balance matches an expected value before posting, preventing race conditions. A postcondition ensures the balance stays above a threshold after posting, rejecting any entry that would overdraw. Both require strongly consistent balance updates on the accounts they reference. The ledger evaluates these conditions atomically when the entry is posted.
What is Numscript and how does Formance use it for programmable transactions?
Numscript is Formance's domain-specific language for describing money movement. Instead of writing backend code to orchestrate debits, credits, and balance checks across multiple API calls, you declare the intent of a transaction: move a specific amount from one account to another, split percentages across payees, and cap withdrawals from funding sources. The Formance ledger executes the entire script atomically, so every posting succeeds or fails as one unit. Numscript uses integer math with built-in rounding rules to avoid floating-point errors in fee splits.
Why are agent-initiated transactions accelerating the shift toward control-plane ledgers?
Human operators can review a payment before approving it. An agent generating hundreds of transactions per minute cannot wait for a human in the loop. The constraints have to be machine-readable and enforced at the point where the transaction posts. A ledger that evaluates entry conditions, enforces balance thresholds, and rejects invalid transactions in real time gives agents the guardrails they need without requiring human approval on every operation.
How do open-source ledgers compare to managed ledger infrastructure?
Formance is open-source with Numscript as a standalone interpreter you can embed. Medici is a Node.js double-entry library. Hledger is a plain-text accounting tool. These give you control over the ledger logic but require you to build consistency guarantees, scale handling, and operational tooling. Fragment and Modern Treasury are managed services that handle consistency, throughput, and compliance infrastructure. The tradeoff is ownership versus operational burden.

Built by Trio, a fintech-native engineering partner helping teams build the next generation of financial technology and infrastructure.

Subscribe to Ledger Drift for high-signal insights into how modern fintech is built, from systems to code to teams.

Keep reading

analysisTokenized Collateral Is Live and the Plumbing Is Already SplittingBNY completed the first tokenized Treasury triparty repo with Citadel, and five other US institutions launched competing settlement platforms in the same quarter.
analysisThe Stablecoin Stack for EngineersA dollar-backed stablecoin touches six layers of infrastructure between mint and redemption, and most of them have nothing to do with a blockchain.
engineeringFour Protocols Are Solving Agent Identity for US BanksFour protocols are converging to solve how an AI agent proves who it represents, what it can touch, and what the customer actually approved.
View more ›