Guld Ledger

Creating a Blockchain With Triple Entry Accounting

Author: Zimmi
For: guld
License: CC-BY-4.0

Single, Double & Triple Entry Accounting

Error Checking Auditing Messaging Example
Single None None N/A Assets -10
Double
Automatic for
local book
Manual Lossy Assets -10
Expenses +10
Triple

Automatic for all books
 
Automated in Real-time by third parties Redundant to Lossless Assets -10
Expenses +10
<sign receipt>

NOTE: Blockchains are examples of triple-entry accounting.

ledger-cli

Ledger is a powerful, double-entry, plaintext accounting system.

  • Define commodities
  • Automate Transactions
  • Budgets and Forecasts
  • Python scripts
  • Accounts
    • Assets
    • Liabilities
    • Equity
    • Income
    • Expenses
    • custom
commodity GULD
   note guld name registration tokens
   format 1,000.00000000 GULD
   nomarket
   default

P 2018/03/27 11:00:00 GULD $75.00
P 2018/03/27 11:00:00 $ 0.01333333 GULD

2018/03/01 * transfer
    zimmi:Assets   -50 GULD
    zimmi:Expenses   50 GULD
    srcreativo:Assets   50 GULD
    srcreativo:Income   -50 GULD

Guld Ledger

Storing ledger files in the guld blocktree allows for digital signature receipts, and full triple entry accounting, commonly called a "blockchain."

  • PGP signatures
  • Transactions hashed individually
  • Recorded receipts
  • Individual and Group accounts
  • Programmable Consensus
  • Optional Encryption

Guld Ledger Format

2018/03/01 * transfer
    ; timestamp: 1519965238
    zimmi:Assets   -50 GULD
    zimmi:Expenses   50 GULD
    srcreativo:Assets   50 GULD
    srcreativo:Income   -50 GULD

Additionally required timestamp metadata
(i.e. ; timestamp: 1519966340)

Account Format

  1. A guld name

  2. One of the standard accounting categories: Assets, Liabilities, Income, Expenses, Equity.

  3. Defined by the user.
account <name>
    note All accounts of <name>
account <name>:Assets
    note Assets of <name>
account <name>:Liabilities
    note Liabilities of <name>
account <name>:Income
    note Income of <name>
account <name>:Expenses
    note Expenses of <name>
account <name>:Equity
    note Equity of <name>

Guld Ledger File Format

  • Usually one transaction per file with the timestamp as name.
  • Only one file can exist with given timestamp in given name directory.
  • Transaction limit of 1/name/sec
~/ledger/GULD$ ls zimmi

1519256110.dat  1519965238.dat
1519964482.dat  1519965335.dat
1519964493.dat  1519965908.dat
1519964806.dat  1519965921.dat
1519964819.dat  1519967197.dat
1519964826.dat  1519967209.dat
1519965127.dat  1519967804.dat
1519965136.dat  1519967848.dat
1519965166.dat  1522643914.dat
1519965202.dat  1522699022.dat
1519965219.dat  1522699477.dat
~/ledger/GULD$ cat zimmi/1519965238.dat

2018/03/01 * transfer
    ; timestamp: 1519965238
    zimmi:Assets   -50 GULD
    zimmi:Expenses   50 GULD
    srcreativo:Assets   50 GULD
    srcreativo:Income   -50 GULD
  • Timestamp metadata matches file name.
  • Since metadata is signed, this ensures nonce authenticity.

Individual Accounts

Individual accounts are controlled by a single, registered PGP key.

  • Individuals apply for a name using PGP public key.¹
  • Registration costs 0.1 GULD.²
  • Account in GULD ledger, and 4 official sub-accounts.
    • Assets
    • Liabilities
    • Income
    • Expenses
2018/02/20 * register individual
    ; timestamp: 1519106013
    isysd:Assets    -0.1 GULD
    isysd:Expenses:guld:register    0.1 GULD
    guld:Liabilities    0.1 GULD
    guld:Income:register:individual:isysd    -0.1 GULD

Group Accounts

Group accounts are controlled by consensus of one or more registered individual PGP keys.

  • Registration costs ~0.1 GULD/member.²
  • Have own account in GULD ledger, and 5 official sub-accounts.
    • All Individual sub-accounts
    • Equity
  • Equity
    • = Vote weight
    • determines consensus
2018/02/21 * register group
    ; timestamp: 1519256110
    zimmi:Assets   -2 GULD
    zimmi:Expenses:guld:register   2 GULD
    guld:Liabilities   2 GULD
    guld:Income:register:group:zimmi   -2 GULD
2018/03/01 * grant for work done
    ; timestamp: 1519966340
    goldchamp:Assets   2 GULD
    goldchamp:Income   -2 GULD
    guld:Liabilities   -2 GULD
    guld:Equity:goldchamp   2 GULD

Equity Example

Group Register Example

Official Templates

A transfer transaction moves Assets from one guld name to another.

2018/02/19 * transfer
    ; timestamp: 1519101923
    isysd:Assets    -0.1 GULD
    isysd:Expenses    0.1 GULD
    cz:Assets    0.1 GULD
    cz:Income    -0.1 GULD
2018/03/01 * grant for work done
    ; timestamp: 1519966340
    goldchamp:Assets   2 GULD
    goldchamp:Income   -2 GULD
    guld:Liabilities   -2 GULD
    guld:Equity:goldchamp   2 GULD

A grant transaction rewards a member for contributions to the group. Reward is both in transferable Assets and non-transferable Equity.

A register transaction creates a new, typed namespace in the blocktree.

2018/02/20 * register individual
    ; timestamp: 1519106013
    isysd:Assets    -0.1 GULD
    isysd:Expenses:guld:register    0.1 GULD
    guld:Liabilities    0.1 GULD
    guld:Income:register:individual:isysd    -0.1 GULD

Advanced Tools

Automated Transactions execute every time a matching line is found in a full transaction.

= expr Income:sales
    Liabilities:sales-tax    0.1
~ Monthly
    guld:Expenses:grants:legal    1000 GULD
    guld:Expenses:grants:tech    1000 GULD
    guld:Expenses:grants:marketing   100 GULD
    guld:Expenses:grants:operations   100 GULD
    guld:Assets

Budgets allow for limits to be set and enforced for each sub-account and time period.

Scripts can be embedded in ledgers, or executed as hooks by the guld filesystem.³

python
    def rev_share(revenues,
                  costs,
                  days,
                  share,
                  totalshares):
        return (revenues - costs) * \
               (days * share) / \
               (totalshares * 365)

Summary

Guld branch + ledger = blockchain

End Notes

  1. Name availability subject to discretion of guld support admins until official, legally compliant policy can be written.
  2. Guld name registration prices as of Apr. 1 2018. Group names in table not ratio, capped at 1,000 GULD.
  3. Guld FileSystem Specification - Additional​​ Configuration

Guld Ledger

By isysd

Guld Ledger

Introduction to the guld ledger system, based on ledger-cli.org.

  • 274
Loading comments...

More from isysd