Core Concepts

States / Availability

Availability is the main state machine that powers String Theory. States are focused on modeling whether or not money is available to be used. If you need additional states use custom tags to be able to identify other states that are meaningful to you.

State Machine

String Theory state diagram

States Descriptions

Money is used to mean any type of value in this section for ease of reading, but knots can represent non-monetary value as well.

Available

The money represented by this knot is allowed to be withdrawn. This is similar to available balance in your bank account, it's money that is in your account and free to be used.

Properties

  1. Contributes to available balance
  2. Can be withdrawn or transferred

Withdrawn

The money represented by this knot has been used. This is similar to your outbound transactions in your bank account, it's money that has been spent. Withdrawn knots serve as a record of the money that moved through your account/system but is no longer there.

Properties

  1. Does not contribute to available balance
  2. Cannot be withdrawn or transferred
  3. Can be returned to become available again

Pending Deposit

This knot represents money that you are expecting to enter your system, but has not cleared yet. This is similar to pending credits in your bank account, it's money that is expected to be available soon. Pending deposit knots serve as a record of the money that is expected to move into your account/system.

Properties

  1. Does not contribute to available balance
  2. Cannot be withdrawn or transferred
  3. Can be confirmed to become available

Pending Withdrawal

This knot represents money that you are expecting to leave your system, but has not cleared yet. This is similar to pending debits in your bank account, it's money that is expected to be gone soon. Pending withdrawal knots serve as a record of the money that is expected to move out of your account/system.

Properties

  1. Does not contribute to available balance
  2. Cannot be transferred
  3. Can be confirmed to become withdrawn
  4. Can be canceled to become available again

Pending Return

This knot represents money that you are expecting to re-enter your system, but is not available yet. This is similar to a pending deposit: it's money that is expected to be available soon. Except, unlike a pending deposit which is new money, a pending return is money that system already knows about but that was previously withdrawn.

Properties

  1. Does not contribute to available balance
  2. Cannot be transferred
  3. Can be confirmed to become available
  4. Can be canceled to become withdrawn again

Cancelled

This knot represents money that you were expecting to enter the system, but later found out that it would not arrive. This is a terminal state. If you later find out that money will arrive, you'll want to use deposit or pending deposit.

Properties

  1. Does not contribute to available balance
  2. Cannot be withdrawn or transferred
  3. Cannot move to any other state