Skip to content

Knots

Knots are the fundamental unit of money in String Theory. They are immutable, meaning once created they cannot be changed. This is a powerful property that makes them perfect for tracking money in a system. Knots are created when money is deposited into the system, and they are destroyed when money is withdrawn.

A knot is made up of three fields:

  • unit type : The type of money (e.g. USD, EUR, points)
  • unit token : The specific token of that type (e.g. USD, EUR, points)
  • unit count : The amount of money in the smallest unit (e.g. cents for USD)

For example, a knot representing $10.00 USD would have:

  • unit type: “USD”
  • unit token: “USD”
  • unit count: 1000 (cents)

Knots can be combined and split, but they cannot be changed. This means that if you have a knot representing $10.00 USD, you cannot change it to $20.00 USD. Instead, you would need to create a new knot for $20.00 USD.

Knots can be combined if they have the same unit type and unit token. For example, if you have two knots representing $10.00 USD and $20.00 USD, you can combine them into a single knot representing $30.00 USD.

Knots can be split into smaller knots. For example, if you have a knot representing $30.00 USD, you can split it into three knots representing $10.00 USD each.

Knots can be grouped together to form a collection of knots. This is useful for tracking money that belongs to a specific entity (e.g. a user, a business, a project). Knot groups can be used to:

  • Track the total amount of money in a group
  • Transfer money between groups
  • Withdraw money from a group

Knot threads are similar to knot groups, but they are used to track money that is being moved through a system. For example, if you are processing a payment, you might create a knot thread to track the money as it moves from the customer to your business.

Knots can be used in a variety of operations:

  • Deposits: Create new knots when money is deposited
  • Withdrawals: Destroy knots when money is withdrawn
  • Transfers: Move knots between groups
  • Exchanges: Convert knots from one unit type to another

The immutability of knots is a key feature of String Theory. It ensures that:

  • Money cannot be created or destroyed without a clear audit trail
  • All operations on money are traceable
  • The system is secure and reliable

If you have any questions about knots or how to use them in your system, the String Theory team is always available to help.