Design and simulation
How it works
This page describes the design in the March 2026 MVP paper and the rules the browser simulation enforces. Nothing here handles real money.
Words used on this page
- zakat
- the obligatory annual alms
- sadaqah
- voluntary charity
- waqf
- an endowment: an asset set aside so its benefit goes to a cause
- amanah
- a trust: something held on behalf of others
MVP paper, §3
Five objects
- Organization
- Represents a charity, mosque, or community group.
- Treasury
- Stores funds transparently.
- Donation
- Records donor contributions.
- Beneficiary Case
- Represents an aid request.
- Verification
- Validator confirmation of legitimacy.
Quoted from the MVP paper. In the simulation a treasury holds numbers, not funds.
MVP paper, §4
Six steps
- An organization registers a transparent treasury.
- A donor contributes funds.
- A beneficiary case is submitted.
- A validator verifies the case.
- The treasury releases funds.
- The transaction is recorded publicly.
Quoted from the MVP paper. In the simulation, “recorded publicly” means a list in your browser. Run the steps in the demo.
Simulation
Rules of the simulation. These are design choices, not religious rulings.
- A pool cannot be overdrawn.
- Nothing moves between pools. There is no transfer command; a release takes from its named pool only.
- A release from the zakat pool needs a case that a validator marked zakat-eligible.
- A release needs identity and need verified. The verifier must be a registered validator, and not the participant who entered the case.
- Delivery can be confirmed only after a release, and it closes the case. A closed case takes no more releases or checks.
- A release cannot be more than the case asked for. Each stage is verified once.
- Every accepted command adds exactly one ledger entry. A refused command changes nothing.
What makes a case zakat-eligible is a question for qualified scholars. The simulation only records that a fictional validator marked it.
Rules like these are not new: charity accounting tools already keep funds apart. The code is one file you can read, demo/ledger.mjs, and the demo lets you try to break each rule.
Hash chain
A record that shows edits
- A hash is a short fingerprint of a piece of data: the same data always gives the same fingerprint, and any change gives a different one.
- Every ledger entry stores the hash of the entry before it, and then its own hash.
- So each entry is tied to everything recorded before it.
- If someone edits an old entry, its hash no longer fits its content, and the link from the next entry breaks.
- Anyone can recompute the hashes and find the first entry that fails. The record is tamper-evident: an edit shows. It does not mean an edit is impossible.
One limit. Someone who controls the whole record can edit an entry and then redo every hash after it. A real system must also keep the latest hash where others hold a copy. The demo lets you try this.
Privacy
The commitment: what is public and what is not
Public
- A category, such as medical.
- An amount.
- Stage flags: identity, need, delivery.
- A hash, called a commitment.
Not public
- Names.
- Documents.
- The description of the need.
- The salt: a random value mixed in before hashing.
A commitment is the hash of the private details plus the salt. If the organisation later shows an auditor the details and the salt, the auditor can recompute the hash and see that it matches the public record. Nobody else learns the details.
In the simulation the public record of a case also names the payee, for example a hospital, and the desk that entered the case.
A rare case in a small community can identify a person even without a name. Whether such records may be published at all is one of the open questions.
First real use
Design intent for a first real use
Money stays in the organisation's own account. Amanah records and displays. It never holds or moves money.
No real use exists today. See Status.
Limits
What a record proves, and what it does not
A record published this way would prove that the organisation published these records and has not changed them since.
It does not prove the records are true or that help arrived.
Until the latest hash is kept where others hold a copy, someone who controls the whole file can rewrite it.