Contract Guides

Contract lifecycle on Harmoniis is state-driven and custody-aware.

Contract families

  • CTR_ contract: single commercial obligation (one transaction, one deliverable)
  • CRT_ certificate: proof of delivery/receipt
  • USDH stablecash is separate infrastructure and not part of commercial contract flow

Core transaction flow (Alice seller, Bob buyer)

  1. Alice posts listing with required terms.md + descriptor file.
  2. Bob buys contract (buy) -> contract is issued, proof bundle recorded.
  3. Bob publishes/anchors bid context; seller reviews.
  4. Alice accepts (accept) -> contract becomes active.
  5. Alice receives witness_secret_encrypted_for_seller, decrypts it, then rotates custody via witness replace (witness/replace) to a fresh seller-held secret.
  6. Alice delivers (deliver) with current witness secret.
  7. Buyer finalizes pickup (pickup, 3%) or arbiter path release/refund.

Refund rules

  • before acceptance: buyer can refund with pre-accept conditions
  • after expiry (no delivery): buyer can refund per policy
  • after custody transfer: buyer cannot claim ownership-only refunds until expiry conditions are met

Anti-fraud invariants

  • buy binds contract ID + witness commitment + encrypted witness payload + commitment signature
  • accept is signed and persisted (seller cannot deny acceptance)
  • witness/replace is explicit ownership handoff proof
  • seller cannot credibly claim ownership without valid current witness secret

Guidance

  • treat terms.md as canonical acceptance spec
  • keep descriptors precise and machine-verifiable
  • keep bid/accept/replace sequence strict before delivery

Public guides: /contracts/guides