Titandocs

Daml contracts

The on-chain surface — five templates and the choices that move collateral.

server/contracts — Daml. The ledger holds custody and commitments, nothing else. Matching is off-chain by design.

Templates

Building

cd server/contracts
daml build            # multi-package.yaml drives the build

Then upload the DAR, create the Vault, and seed counters — the first step of the engine quickstart.

Verification surface

Because commitments are on-chain and the engine's leaves are readable through the BFF, the two can be compared without trusting either:

curl 'http://localhost:4000/v1/verifications/user-batches?status=mismatch'
curl 'http://localhost:4000/v1/verifications/manifests?status=mismatch'

A non-empty mismatch list is an incident, not a warning: the off-chain engine and the on-chain commitment disagree about what was traded.

Auditor retrofit

An auditor party can be added as a read-only observer on manifests, giving a third party the ability to run the same cross-checks continuously without any trading capability.

Out of scope for v1

Cross-margin across operators, on-chain matching, and permissionless market creation. All three change the trust model rather than extending it, so they are deliberately deferred rather than partially implemented.

On this page