Skip to content

4meta5/CIP-056

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canton Network Token Standard (CIP-056)

What This Is

Minimal DAML/Haskell implementation of the 6 CIP-056 on-ledger interfaces. Proves a non-Splice registry can implement the Canton token standard and interoperate with standard-compliant wallets. See SCOPE.md for full scope and PLAN.md for implementation details.

Status

On-ledger: 36/36 tests passing (7 templates, 6 interfaces, 24 security invariants). Off-ledger: not in scope (uses Splice token-standard). All post-MVP hardening items resolved (see SCOPE.md §9).

Prerequisites

  • dpm (Digital Asset Package Manager): ~/.dpm/bin/dpm
  • Daml SDK 3.4.10
  • Java 21 (for dpm test)
  • Access to Splice interface DARs (linked via dars/ symlinks)

Quick Start

Build

dpm build

Test

JAVA_HOME=/opt/homebrew/Cellar/openjdk@21/21.0.10/libexec/openjdk.jdk/Contents/Home \
  PATH="$JAVA_HOME/bin:$PATH" dpm test

What the 36 Tests Prove

  • 9 transfer lifecycle tests — self-transfer, direct (preapproval), two-step (pending/accept/reject/withdraw), exact-amount, PublicFetch, tx-kind metadata
  • 5 allocation/DvP tests — allocate, execute, cancel, withdraw, multi-leg atomic settlement
  • 2 defragmentation tests — 10-holding merge, multi-instrument transfer
  • 20 security tests — admin validation, time windows, contention, authorization, cross-instrument attack, unexpired lock rejection, amount invariants (ensure > 0), owner unlock/lock expiry, expire-lock pattern (reject/withdraw after unlock), expired lock acceptance

Project Structure

simple-token/          Production DAML contracts (7 templates, 6 interface implementations)
simple-token-test/     Test suite (36 tests across 4 modules)
dars/                  Symlinks to splice-api-token-*-v1 interface DARs

Audit

See PUBLIC_AUDIT.md for the complete audit report, including findings from three verification tools and all patched/acknowledged issues.

Verification Tools

This project was tested with three open-source DAML verification tools:

  • daml-lint — Static analysis for security anti-patterns
  • daml-props — Property-based testing with shrinking
  • daml-verify — Formal verification via Z3 SMT solver

Documentation

  • SCOPE.md — What's in scope, what's not, differences from Splice, spec gap analysis
  • PLAN.md — Implementation plan, template designs, security invariants, test criteria

License

See LICENSE for details.

About

Canton Network Token Standard (CIP-056)

Resources

License

Stars

Watchers

Forks