Skip to Content
Tobin Docs

Domain model

The terms the code and documentation use, and where each one lives.

Use the project's terms. The code says Organization for an institution.

ConceptMeaning and where it lives
InstitutionAn Organization (organizations); has a type and jurisdiction. Application data.
UserAn internal Tobin account (users); signs in by email or by wallet; has no authority by itself.
WalletA verified Stellar key of a user (user_wallets, Testnet only). A separate, organization-scoped ownership proof (wallet_challenges, wallet_verifications) maps participants to accounts for execution.
MembershipA user in an organization with role admin or member and status active or suspended (memberships).
ReviewerAn explicit grant (org_reviewers); not implied by admin.
Clearing sessionA SessionRecord (sessions) with a provenance label and a workflow state configuring, ready or closed.
ParticipantA member added to a session (session_participants).
ObligationA debtor, a creditor and a positive integer amount in one canonical asset (obligations).
CalculationAn immutable snapshot of deterministic net positions (calculations, with an input hash); current only while participants and obligations are unchanged.
ApprovalA reviewer decision (authorization_decisions) bound to one exact calculation; active, superseded or invalidated.
Settlement batchAn immutable batch derived from an approved calculation (settlement_batches), with instructions (settlement_instructions) and a batch review; awaiting-review, approved, rejected, invalidated, superseded.
Execution preconditionssettlement_executions and attempts: which accounts are verified and the planned steps. They do not contact the network.
Stellar transactionOne of the contract calls built by lib/stellar/execution-plan.ts and sent by the owner-run tool.
ConfirmationA transaction read back from the network by hash with a successful result.
ReconciliationComparing the confirmed on-chain state with the approved batch (lib/stellar/compare.ts); any difference means stop.
Signer setThe keys and weights that may sign for a multisig account, read from Horizon and the RPC (signer_set_snapshots).

Sign convention

For every participant, net = outgoing obligations - incoming obligations. A positive net means the participant is a net debtor and pays; negative means net creditor; net positions across a session always sum to zero.

Amounts

Amounts are integers in base units (bigint in TypeScript, checked i128 in Rust). Floating point is never used for money.

See also the glossary and State and trust boundaries.

On this page