Threads
Deposit Threads
Section titled “Deposit Threads”Threads are a core way of tracking money with String Theory. Each piece of money that enters the system has a new thread attached to it that we call a deposit thread . You can use the thread to see where the money has gone and its current state.
Split Threads
Section titled “Split Threads”Each time a piece of money is split for any reason, a new thread is created called a split thread . The split amount will be associated with both the original thread, and the new thread. So you can see the entire history of the money by looking at the deposit thread, or, just the information about what happened after the split by looking at the split thread.
Money that has been split a bunch of times will have a complex web of threads that resembles a tree structure. However, each split remains associated with all other threads that came before it. This means that no matter how many changes or splits money has gone through it will always be associated with its deposit thread.
Threads & Knots
Section titled “Threads & Knots”Threads are a pointer to the history and current state of assets, but don’t actually store any asset values themselves. Each thread has a series of knots (starting with an initial knot) that show how the assets have changed over time, and what the current state is.
How to Think About Threads
Section titled “How to Think About Threads”You can think of a thread as a special account that can be withdrawn from, or have money returned to, but that cannot receive deposits. In addition to knowing what funds are available for the account, the thread also knows about all the money that has ever been withdrawn from it.
Threads are a great tool when you know what general blocks of money you want to change or withdraw from, but you don’t care about which specific pieces of money are chosen, much like an account in double entry systems. Operating on threads still creates deterministic attribution and auditability, but hides the complexity when you don’t need that much precision (yet).
Simple Thread Example
Section titled “Simple Thread Example”Here is an example of a relatively simple thread with one partial withdraw. You can see the current state of the money by looking at the final knot of each thread ( K2 and K4 ).
- A deposit was received for $59.00 which created the knot K1 and the deposit thread T1 .
- A withdraw of $20.00 was requested.
- The original amount was split into two parts, the requested $20.00 as knot K3 , which also created a new split thread T2 .
- The remaining $39.00 was represented as knot K2 and still belongs only to the deposit thread T1 .
- The requested $20.00 is withdrawn creating knot K4 .
Current State
Section titled “Current State”T1: $39.00 available, $20.00 withdrawn
T2: $0.00 available, $20.00 withdrawn