Skip to main content

Overview

M10's ledger is a distributed database for storing financial transactions. In many ways, it is similar to traditional databases you might be familiar with such as PostgresSQL or MongoDB, but there are some key distinctions. For one the ledger is specialized in storing financial data, and small amounts of metadata. The ledger is also permissioned; every operation needs to be signed by a key. Keys are granted access through our RBAC (role-based-access control) system. The ledger is also very high-performance achieving 1M TPS in certain configurations.

BFT

Unlike many traditional distributed databases, the ledger is byzantine fault tolerant (BFT). If you have heard of BFT, it is likely in the context of a blockchain such as Bitcoin. If you haven't heard of BFT, the TLDR is that ledger can withstand failure or malicious intrusion of half of its nodes before going down. M10's ledger is based on our proprietary blockchain technology, but with different trade-offs to popular crypto-currencies. For one, the M10 ledger is private, which means that a single entity — or small group of trusted entities — runs the ledger. This allows us to achieve higher performance and much lower computational and environmental costs than other blockchain-based systems.

Hierachical Ledger


One of the buzzwords we use to describe the ledger is "hierarchical". All that means is accounts form a tree as shown above. An account is similar to an account you might have at a bank. It has a balance, a name, and in our system a parent account. This gives the ledger the ability to easily model fractional reserve banking and provides a clean permissions model. When a transfer takes place between two accounts, it "walks" the tree. You can head to the accounts and transfers docs for more info on this concept.

RBAC

RBAC or role-based access control is a common model for permissions in enterprise software. The idea is that there are "roles" that contain a list of permissions for a particular resource. Each of those roles is "bound" to a user with a role-binding. M10 uses our RBAC system for all permissions in the ledger. More info on the particulars can be found in the role and role-binding docs.

Documents

The ledger also provides the ability to store documents as well as financial transactions. Documents are stored in "collections", which are a group of documents with the same protobuf type. Documents are typically used to store metadata about the ledger, such as Bank. Bank is a list of metadata about a bank that exists in the ledger. Documents, like almost everything in the M10 system, are protobufs. They are querably using a number of API calls, usually called something like listBanks.

Actions

What if you want to send more than just money to an account? For instance what if you wanted to get a quote for an FX swap from a market maker? The ledger provides a clean interface for solving these, actions. An action is a message sent from one account to another. M10's ledger allows you to subscribe to a stream of actions taking place on your account. If you are familiar with a message queue system like Kafka, this might seem familiar.