VERDOCK

Maker and checker approvals

Two different people approve a large action, each signing with their own Ed25519 key. The receipt carries the evidence and anyone with the bank's key verifies it offline.

On this page

A bank needs proof that two different people approved a large action, not a log line that says so. Verdock gives that proof as signatures. Each approver signs with their own Ed25519 key. The receipt carries the signed evidence, and anyone with the bank's receipt key verifies it offline.

What it enforces#

  • The bank owns the policy and a registry of pseudonymous approver ids and public keys. Agent keys are never accepted as approvers.
  • The quorum comes from the policy. approvers_required sets the default. approval_bands raise it above an amount. The band threshold is exclusive: above_minor: 200000 requires two approvers at 200001.
  • The requester cannot approve. A requester key registered under a second name cannot approve either.
  • One person, and one key, counts once.
  • A rejection is final.
  • Every approval binds to the exact operation, subject, amount, currency, policy hash and approver registry. A changed byte fails the signature.
  • Approvals expire. An approval is consumed once.
  • The subject of the request is stored as a salted commitment, so the evidence carries no account identifier.

Set the quorum in the policy#

YAML
operations:
  credit_limit:
    level: Execute with Approval
    approvers_required: 1
    approval_bands:
      large:
        above_minor: 200000
        approvers_required: 2

Use it#

Python
from verdock.maker_checker import MakerCheckerStore, check_evidence

store = MakerCheckerStore("approvals.sqlite3", trusted_keys, bank_salt=bank_salt)
approval_id = store.request(policy, "credit_limit", customer_id, 600000, "INR", "agent-1")
store.decide(approval_id, "maker", maker_seed)
store.decide(approval_id, "checker", checker_seed)
evidence = store.require(approval_id, "credit_limit", customer_id, 600000, "INR", consume=True)
log.append(approval_id, "credit_limit", {"amount_minor": 600000, "currency": "INR"}, True, approvals=evidence)

check_evidence(evidence) returns None or a failure reason. verify_log and the browser verifyLog run it on every receipt that carries params.approval_evidence. Python and the browser verifier return the same reason for the same input. tests/vectors_v3.json pins this.

See it run#

verdock demo --scene credit changes a credit limit from 50,000 to 2,00,000. The requester is refused, one signature is not enough, the same person cannot sign twice, and the record check confirms the new limit.

Terminal
verdock demo --scene credit

The reasons a verifier returns for bad approval evidence are in failure reasons.