# US 2026/0301081 A1 · Systems and methods for modeling distributed service systems by a ledger system

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0301081 A1
- Document ID: US20260301081A1
- Status: Published application
- Kind: A1
- Application number: 19/697,820
- Filed: 2026-06-04
- Published: 2026-10-01
- Earliest claimed: 2023-12-08
- Assignees: Stripe, Inc.
- Applicants: Stripe, LLC
- Inventors: Ilya GANELIN; Joseph PEREIRA; Sharjeel SOHAIL; Peter BAKKUM
- Web page: https://patentgrep.com/patent/US20260301081A1

## CPC

- G06Q 40/12: Accounting
- G06F 8/35: model driven
- G06Q: INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and apparatus are described for modeling a software system of a distributed services system. The method includes receiving a stream of ledger transaction messages generated by a software system, which are then stored in a data store. A ledger system accesses a data model representing a state machine of the proper functioning of the software system. A ledger clearance operation is performed using the state machine and the data stored within the stream of ledger transaction messages in the data store to generate balances within states of the state machine. The ledger system detects an operational characteristic, such as proper function or improper function, of the software system based on a balance of a state in the state machine. Such detection is performed without knowledge of the underlying implementation of the software system.

## Claims

### Claim at position 1

1-20. (canceled)

### Claim 21

A method performed by a server system comprising a network interface, one or more processors, and a memory coupled to the one or more processors, the method comprising:
receiving, by the network interface of the server system, a stream of ledger transaction messages generated during execution of a plurality of software systems by a distributed services system, each ledger transaction message stored in a data store coupled with the server system;
accessing, by the one or more processors, a plurality of ledger data models stored in the memory, each ledger data model comprising a state machine that models one or more processes of a respective software system of the plurality of software systems;
processing, by the one or more processors, a ledger clearance operation using data associated with the received stream of ledger transaction messages to generate one or more balances for one or more states in the plurality of ledger data models;
detecting, by the one or more processors, a non-zero balance at an expected zero-balance state of a first state machine of a first ledger data model of the plurality of ledger data models;
based on detecting the non-zero balance, identifying, by the one or more processors, one or more second state machines of one or more second ledger data models that are interconnected with the first state machine via one or more shared transitions between states of different state machines;
evaluating, by the one or more processors, whether the one or more second state machines contributed to the non-zero balance; and
generating, by the one or more processors, an indication identifying a cause of the non-zero balance based on the evaluating, wherein the cause identifies (i) a specific state of the one or more second state machines and (ii) an associated process of the distributed services system correlated with the specific state.

### Claim 22 (depends on 21)

The method of claim 21, wherein the plurality of ledger data models comprises a money movement flow, a network submission flow, a reconciliation flow, and a liability reporting flow, each interconnected via shared transition events.

### Claim 23 (depends on 21)

The method of claim 21, wherein the evaluating comprises determining whether a non-zero balance in a state of a second state machine of the one or more second state machines corresponds temporally with the non-zero balance detected in the first state machine based on timing data within the received stream of ledger transaction messages.

### Claim 24 (depends on 21)

The method of claim 21, further comprising:
transmitting, by the network interface, to a user system associated with at least one of the plurality of software systems, a notification that identifies (i) the first state machine and the expected zero-balance state having the non-zero balance, and (ii) the one or more second state machines and respective states determined to have contributed to the non-zero balance.

### Claim 25 (depends on 21)

The method of claim 21, wherein the one or more shared transitions represent events reported by different software systems of the distributed services system, each software system having an independent implementation.

### Claim 26 (depends on 21)

The method of claim 21, wherein the ledger clearance operation comprises a double-entry bookkeeping clearing process that groups entries by namespace and currency and sums amounts that are expected to equal zero upon proper execution of a modeled process.

### Claim 27 (depends on 21)

The method of claim 21, wherein at least one of the plurality of software systems generates the stream of ledger transaction messages using symbolic monetary amounts representative of non-monetary operations of the software system, such that the ledger clearance operation detects proper functioning of the non-monetary operations via the symbolic monetary amounts.

### Claim 28 (depends on 21)

The method of claim 21, wherein the processing of the ledger clearance operation is performed periodically at a configurable interval, and the detecting, identifying, evaluating, and generating are performed automatically without user intervention.

### Claim 29 (depends on 21)

The method of claim 21, further comprising:
establishing, by the one or more processors, a historical pattern of clearing results for the first state machine over a plurality of prior time periods; and
determining, by the one or more processors, that the non-zero balance represents a deviation from the historical pattern exceeding a configurable threshold prior to the identifying of the one or more second state machines.

### Claim 30 (depends on 21)

The method of claim 21, wherein the evaluating further comprises:
for each of the one or more second state machines determined to have a non-zero balance in an expected zero-balance state, identifying one or more additional state machines interconnected with a respective second state machine of the one or more second state machines; and
iteratively evaluating balances of states in the one or more additional state machines to trace the cause across multiple levels of interconnected state machines.

### Claim 31 (depends on 21)

The method of claim 21, further comprising:
causing display, by the one or more processors, of a graphical user interface that renders a visualization of a plurality of interconnected state machines, the visualization indicating (i) states having non-zero balances where zero balances are expected, and (ii) transitions between state machines identifying an error propagation path from the cause to the detected non-zero balance in the first state machine.

### Claim 32 (depends on 21)

The method of claim 21, wherein the evaluating comprises:
accessing, by the one or more processors, account identifiers, transaction identifiers, and timing data from the data store for transactions associated with one or more states in the one or more second state machines; and
reconciling, by the one or more processors, the accessed data with expected values, expected timing, and expected transitions defined by the one or more second ledger data models to determine whether the one or more second state machines contributed to the non-zero balance.

### Claim 33

A system comprising:
a network interface configured to receive a stream of ledger transaction messages from a plurality of independently-implemented software systems of a distributed services system;
a memory storing a plurality of ledger data models, each comprising a state machine that models processes of a respective software system as a funds flow having a plurality of states with expected balances, wherein at least two of the state machines are interconnected via one or more shared transitions representing events that span across different software systems; and
one or more processors coupled to the memory and the network interface, configured to:
store, in a data store, the stream of ledger transaction messages received via the network interface;
perform a ledger clearance operation on the stream of ledger transaction messages to generate balances for states of the plurality of ledger data models;
detect a non-zero balance at an expected zero-balance state of a first state machine;
based on detecting the non-zero balance, traverse one or more interconnections from the first state machine to one or more second state machines connected to the first state machine via the one or more shared transitions;
evaluate balances of states in the one or more second state machines to identify a state having a non-zero balance that contributed to the non-zero balance in the first state machine; and
generate an output identifying a cause comprising (i) the identified state of the one or more second state machines and (ii) a process of the distributed services system correlated with the identified state.

### Claim 34 (depends on 33)

The system of claim 33, wherein the one or more processors are further configured to:
transmit, via the network interface, an alert to a user system responsible for a software system associated with the cause, the alert generated automatically without user initiation based on the detecting.

### Claim 35 (depends on 33)

The system of claim 33, wherein the stream of ledger transaction messages represent money movements between accounts maintained by a commerce platform system, and the ledger clearance operation determines proper functioning of the plurality of software systems based on whether transactions processed by the plurality of software systems produce zero balances at predetermined states.

### Claim 36 (depends on 33)

The system of claim 33, wherein the one or more processors are further configured to:
render a graphical user interface displaying a representation of the at least two interconnected state machines, the representation highlighting (i) non-zero balances at expected zero-balance states, and (ii) a traced path across the one or more shared transitions from the cause to the detected non-zero balance.

### Claim 37 (depends on 33)

The system of claim 33, wherein the one or more processors are configured to traverse and evaluate iteratively across multiple levels of interconnected state machines to trace the cause through a chain of three or more state machines connected via the one or more shared transitions.

### Claim 38

A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
receiving a stream of ledger transaction messages generated during execution of a plurality of software systems by a distributed services system, the stream of ledger transaction messages stored in a data store;
accessing a plurality of ledger data models each comprising a state machine modeling processes of a respective software system, wherein at least two state machines are interconnected via shared transitions;
performing a ledger clearance operation on the stream of ledger transaction messages to generate balances for states of the plurality of ledger data models;
detecting a non-zero balance at an expected zero-balance state of a first state machine;
based on detecting the non-zero balance, identifying one or more second state machines interconnected with the first state machine via the shared transitions;
evaluating balances of states in the one or more second state machines to determine a contribution to the non-zero balance in the first state machine; and
generating an indication of a cause identifying (i) a specific state in the one or more second state machines and (ii) a correlated process of the distributed services system responsible for the non-zero balance.

### Claim 39 (depends on 38)

The non-transitory computer-readable medium of claim 38, wherein the operations further comprise:
performing the ledger clearance operation periodically at a configurable interval; and
for each periodic clearance operation in which a non-zero balance is detected, performing the identifying, evaluating, and generating automatically to produce a time-series of cause determinations for the first state machine.

### Claim 40 (depends on 38)

The non-transitory computer-readable medium of claim 38, wherein the operations further comprise:
filtering the stream of ledger transaction messages based on one or more configurable parameters comprising at least one of: a merchant identifier, a payment instrument type, a third-party system identifier, a currency, or a time period, prior to performing the ledger clearance operation, such that the detecting and evaluating are performed over a filtered subset of transactions.
