askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
value_accounts.json · 6.1 KB · 53 lines
| 1 | { |
| 2 | "name": "value_accounts", |
| 3 | "title": "Value Accounts", |
| 4 | "version": 1, |
| 5 | "description": "A place where value sits. A business does not hold only 'cash in the bank' -- it holds a checking account, maybe bitcoin or a stablecoin, a box of physical cash in the till, a credit line, gift cards, possibly a weight of metal -- and those differ along axes the chart of accounts alone never records: what unit they are denominated in, WHO HOLDS THEM, who may move them, and how you would ever prove the balance is real. This collection is the generalization of bank_accounts (which it supersedes -- a box of cash is not a bank account, and calling it one is the kind of naming debt that confuses a system for years). Each row still points at exactly one book account through fin_account_id: reconciliation compares two independent truths and never merges them. The verification field is the important one -- it says what class of evidence exists for this account, and by extension how much a reconciliation of it is worth (see plan/value-accounts-and-denominations-spec.md). A blockchain balance is stronger evidence than a bank statement, because anyone can verify it and no institution has to be trusted. A physical count is the weakest, because it is self-certification: the person counting the till is usually the person who could take from it, which is why requires_second_attestor exists and why cash businesses have always used two-person counts. Recording that difference honestly, rather than presenting every reconciliation as equally trustworthy, is the point.", |
| 6 | "fields": [ |
| 7 | {"name": "id"}, |
| 8 | {"name": "name", "type": "text", "required": true, "label": "Name", |
| 9 | "help": "How you refer to it: 'Business Checking', 'Front Register', 'Cold Wallet'."}, |
| 10 | {"name": "kind", "type": "enum", "required": true, "default": "bank", "label": "Kind", |
| 11 | "enum": ["bank", "crypto", "stablecoin", "cash_box", "card", "credit_line", |
| 12 | "gift_card", "metal", "exchange", "other"], |
| 13 | "help": "What sort of place this is. Drives which verification is even possible and how much assurance it carries."}, |
| 14 | {"name": "denomination_id", "label": "Denomination", |
| 15 | "relation": {"collection": "denominations", "display_field": "code"}, |
| 16 | "help": "The unit this account holds (USD, BTC, XAU, a gift-card program). Amounts are integers of this denomination's smallest unit -- see object_money.py."}, |
| 17 | {"name": "fin_account_id", "label": "Book Account", |
| 18 | "relation": {"collection": "fin_accounts", "display_field": "name"}, |
| 19 | "help": "The account in the chart of accounts whose balance this place must agree with. Without it, nothing can be reconciled or posted."}, |
| 20 | {"name": "custody", "type": "enum", "default": "institution", "label": "Custody", |
| 21 | "enum": ["institution", "self", "third_party"], |
| 22 | "help": "Who physically or cryptographically holds the value. institution: a bank or exchange holds it and can restore your access. self: you hold it -- a till, a hardware wallet, a safe; nobody can restore it for you. third_party: someone else holds it on your behalf."}, |
| 23 | {"name": "custodian", "type": "text", "label": "Custodian", |
| 24 | "help": "Named holder: 'Chase', 'Coinbase', 'Ledger in the office safe', 'front register'."}, |
| 25 | {"name": "reference", "type": "text", "label": "Reference", |
| 26 | "help": "Last four digits, a blockchain address, a card reference. Never a full account number."}, |
| 27 | {"name": "verification", "type": "enum", "default": "statement_import", "label": "Verification", |
| 28 | "enum": ["statement_import", "chain_query", "physical_count", "issuer_balance", "none"], |
| 29 | "help": "How the balance is proven. statement_import: the institution sends a statement. chain_query: read the address on a public ledger -- the strongest evidence there is, verifiable by anyone. physical_count: someone counts it, which is self-certification unless witnessed. issuer_balance: the issuer states a number with no line-item history. none: unverified, and the reconciliation view says so."}, |
| 30 | {"name": "managed_by", "type": "text", "label": "Managed By", |
| 31 | "help": "Who is responsible for this account day to day -- deliberately separate from owner_id, because the person who reconciles the register should not have to be the person who can move the wire. Separation of duties as a field rather than a policy document."}, |
| 32 | {"name": "requires_second_attestor", "type": "boolean", "default": "false", |
| 33 | "label": "Requires Witness", |
| 34 | "help": "For self-certified verification (a cash count): whether a second person must attest before the count is accepted. The classic control against the person who counts being the person who could take."}, |
| 35 | {"name": "last_proven_control_at", "type": "date", "label": "Control Last Proven", |
| 36 | "help": "Self-custody only, and the field no other asset class needs: a chain balance proves the funds exist at an address, NOT that you still hold the key. A bank can restore access; a lost seed phrase is permanent. This records the last time control was actually demonstrated (an outbound transaction, a signed message, a restore test)."}, |
| 37 | {"name": "is_active", "type": "boolean", "default": "true", "label": "Active"}, |
| 38 | {"name": "notes", "type": "textarea", "label": "Notes"}, |
| 39 | {"name": "owner_id", "type": "text", "label": "Owner"}, |
| 40 | {"name": "entity_id", "type": "text", "label": "Entity", |
| 41 | "relation": {"collection": "entities", "display_field": "name"}, |
| 42 | "help": "The set of books this account belongs to (65 multi-entity)."}, |
| 43 | {"name": "created_at", "type": "datetime", "read_only": true, "label": "Created"} |
| 44 | ], |
| 45 | "search": {"fields": ["name", "custodian", "reference"]}, |
| 46 | "forms": {"default": {"fields": ["name", "kind", "denomination_id", "fin_account_id", |
| 47 | "custody", "custodian", "reference", "verification", |
| 48 | "managed_by", "requires_second_attestor", |
| 49 | "last_proven_control_at", "is_active", "notes"]}}, |
| 50 | "views": {"list_mode": "table", |
| 51 | "list_fields": ["name", "kind", "denomination_id", "custody", "verification", "is_active"], |
| 52 | "filter_fields": ["kind", "custody", "verification"]} |
| 53 | } |