Knots
Knots are a point-in-time snapshot of money in your system. Knots show what the money looked like as of the time they were created. When a change is made to money (withdraw, split, exchange, etc.) a new knot is created the supersedes the old knot. This "string" of knots shows how money changes in your system over time, allowing you to have perfect traceability and auditability of every change to your finances.
Knots are the fundamental building block of the String Theory system. All money stored in the system is ultimately stored as knots, as well as all money that has ever been withdrawn from your system.
Data Concepts
Knots are complex objects that store a lot of information. In this section we'll break down some of the major ones that they rely on.
Owner
This is the person, organization, or system to which this money belongs. Think of it like this: if you had to close out your system today, who would you owe this money to?
Actor
This is the person who took the action that created this knot. It can be a person or a system.
Action
Actions are changes that have been made to a piece of money. They include deposit, withdraw, split, exchange, and many more. Every action has a corresponding actor and may have some action related data, like exchange rates.
Amount
This represents the type of value stored in this knot. Generally this is currency of some sort (like US dollars) but is flexible enough to represent many other kinds of value and assets. See the amounts page for a full break down.
Availability
This tells you whether the money is available for withdraw from your system, or has already been withdrawn. There are also some pending states, but they tend to be rare and transitive.
Tags
Tags (sometimes called metadata) are a way to add context to your money. Tags are always key/value pairs which are stored as part of the knot and can be searched/filtered on later. If you have custom context to add to your knots tags are the way to do it. You can find more information on how tags work and best practices in the tags documentation page.
Knot traceability
All knots are connected into a tree of ancestors and descendants. We call these chains threads and you can read more about them in the threads documentation. This sections outlines the rules knots follow for connecting to each other
- If a knot has no parent knot than it just entered the system.
- A knot can only have a single child knot, unless the action is split.
- A split knot will have exactly two children: a requested knot and a remaining knot.
Knot connection example
- K1 is the parent knot of K2 and K3.
- K1 was split so it has exactly 2 children.
- K2 is the remaining knot from the K1 split.
- K3 is the requested knot from the K1 split.
- K4 is the sole child of K3 since it was not split.