Deterministic Attribution
This post makes several references to the blog post on the attribution problem. You don’t need to have read it for this article to be useful, but it explains the problem in depth, and is used for contrast.
Deterministic attribution is the property of a ledger that guarantees any piece of money can be provably traced back to its origin. Only String Theory’s ledger provides this level of attribution. Double entry ledgers have extremely poor attribution, while blockchain ledgers have deterministic attribution until a merge happens, but each merge creates ambiguity that can sometimes be resolved, but not always.
String Theory has many cool properties, but the two rules that enforce deterministic attribution are:
- Every knot points directly to it’s parent
- Knots can never be merged together
Rule 1 means that every piece of money in the system knows about it previous state, all the way back to when it originally entered the system. This enforces that each knot in the system in part of a thread the connects it all the way to its origin.
Rule 2 is the one that avoids the attribution problem as you see it in double entry. Money is never summed together, the system always keeps of each of the individual parts. You can still effective merge money together and treat it as a single bucket, but behind the scenes String Theory will keep track of each individual piece that’s part of that whole.
Diagram: Example of String Theory traceability
- K1 is the initial deposit of $2,500
- It is split into into exactly two parts that equal the whole: K2 and K3
- K2 has a new tag applied, which creates a child K4
- K3 is withdrawn from the system, leaving K5 as the record of the withdraw
Solving the attribution problem
Section titled “Solving the attribution problem”The traceability is nice, but how does it solve the attribution problem? Let’s revisit the example from the previous blog post the attribution problem.
Again we have three buckets In, Held, and Out . We’ll make several deposits of liquid then move them into Held one cup of each, vodka, water, kool-aid, and lime juice . Finally, we’ll pour a glass for each of our 2 customers.
We need to change up our analogy just a bit, since String Theory doesn’t sum like double entry. So instead of pouring glasses of liquid into our bucket, we’ll put the entire glass into the bucket, label and all.
Diagram: Liquid analogy, with deterministic attribution
The diagram shows that we can see exactly what was served to each customer. Since we still have each liquid in its own glass its trivial to tell what we’re going to give each customer. In the case of customer 1 it didn’t much matter what we served them. He might have preference to not get a glass of straight vodka or lime juice, but ultimately he can safely drink any combination of liquids from the bucket. Customer 2 on the other hand, could be be harmed by getting any liquid from the vodka glass. So we actively choose not to serve him from the vodka glass. This ability to actively choose what you withdraw is not possible in other ledgers.
Working with deterministic attribution
Section titled “Working with deterministic attribution”You mean I have to actively choose every time I change any money in my system? That sounds like a lot of work!
Not at all! You get to decide how much you care about how the money is chosen. String Theory lets you operate on money like its a bucket of liquid (like to double entry), actively choose money from a bucket, or even choose individual pieces of money directly.
In this section we’ll cover some of the most common methods of withdrawing money and when to use them.
Passive choice (“I don’t care”)
Section titled “Passive choice (“I don’t care”)”Sometimes when moving money you legitimately don’t care which money is chosen. In the earlier example this is true for the customer 1 withdraw. Any of the liquids in the bucket would be acceptable, as would any combination of them.
In cases like these you ask String Theory to withdraw an amount from a group or thread and it will happily give you what you asked for if its possible. However, individual pieces of money are still chosen and deterministically recorded. The system just makes the choice for you. This maintains the ability to trace money end-to-end through the system, even if you don’t care about the details when you are moving it.
In the example above if we just asked for “1 cup of liquid” from the held bucket for customer 1 and it decided to give him Kool-aid.
Most money movement starts with not caring. You set up really simple, intuitive accounts, and then over time additional circumstances, regulations, or rules are added that make it more complex. Since String Theory supports both passive and active choice you can seamlessly switch patterns as your business processes evolve without having to re-architect your accounts or your system.
Active choice
Section titled “Active choice”Other times, you’ll want to choose specific pieces of money. With customer 2 even though we know they should be served out of the Held bucket, it’s super important that they don’t get any vodka. In these cases you’ll want to actively choose what is withdrawn.
Thanks to the uniquely-identifiable trait of String Theory, every piece of money can be individually targeted by a unique id. It also returns these ids whenever it provides a balance, so you can always know exactly parts make up the balance. From there you can choose to withdraw any combination of those pieces.
Let’s use a more realistic business example to highlight why you might want to do this, and how to accomplish it.
The setup: You run a retail marketplace business (like Amazon) and you have a seller account (group) for one of your sellers, John. Each time we sell one of John’s items we move money into John’s seller group to await payout. In order to help avoid fraud, and reduce operating costs, we don’t allow any money to be paid out to John until three days after the sale. This gives us time to hopefully get notified of fraud from the credit card company, and also allows us not to pay out for cancelled or returned orders.
John made the following sales over the last week:
- S1 : $100 five days ago
- S2 : $500 three days ago
- S3 : $2,500 today
- S4 : $7,500 today
- Balance : $10,600
The payout
Now we need to make a payout from John’s account. However, the vast majority of money in John’s account is not eligible for payout . Thus, the “I don’t care” strategy isn’t going to work well here. Our business rules are clear we need at least a 3 day wait. So instead of just saying “give me $600” we’ll take a couple steps to make sure we get the right money.
- Get the balance of John’s seller group
- Filter the balance to only include money that is at least 3 days old
- Withdraw the amount we want to pay out from the filtered balance
This approach gives us the best of both worlds. We can still treat John’s account like a bucket of money, but we can also enforce our business rules by filtering the balance before we withdraw. This is a really common pattern in String Theory, and it’s one of the reasons it’s so powerful.
Direct choice
Section titled “Direct choice”Sometimes you’ll want to choose specific pieces of money directly. This is the most powerful, but also the most complex way to withdraw money. It’s useful when you need to enforce very specific business rules, or when you need to make sure that certain pieces of money are used for specific purposes.
For example, let’s say you have a grant that can only be used for science education. You might want to make sure that the grant money is only used for that purpose. In this case, you would want to choose the specific pieces of money that came from the grant, and make sure they are only used for science education.
This is where String Theory’s uniquely-identifiable trait really shines. You can target specific pieces of money by their unique id, and make sure they are used for the right purpose. This is not possible in other ledgers, because they don’t maintain the identity of individual pieces of money.
Conclusion
Section titled “Conclusion”Deterministic attribution is a powerful property that allows you to track money through your system with perfect accuracy. It’s not just about being able to trace money back to its origin, it’s about being able to make informed decisions about how money is used in your system.
String Theory is the only modern ledger system that provides this level of attribution. It’s a key part of what makes String Theory so powerful, and it’s one of the reasons why it’s the best choice for businesses that need to track money with perfect accuracy.