Tenzro
Tutorial — Enterprise & RWA

Run an institutional repo on Canton

Canton is the privacy-first ledger for regulated assets. Each party sees only the contracts they are authorized on. Tenzro speaks the Canton JSON Ledger API v2 through its Canton MCP.
Level
Advanced
Time
~30 min
Prerequisites
Canton domain access
Stack
DAML · MCP
01

Allocate the parties

Allocate one party per role: cash provider, collateral provider, and tri-party agent.

import { McpClient } from "tenzro-sdk";
const ct = new McpClient("https://canton-mcp.tenzro.network/mcp");
await ct.call("canton_allocate_party", { hint: "CashProvider" });
await ct.call("canton_allocate_party", { hint: "CollateralProvider" });
await ct.call("canton_allocate_party", { hint: "TriParty" });
02

Upload the DAML model

Upload the compiled DAR. The repo template captures cash leg, collateral leg, and haircut.

await ct.call("canton_upload_dar", { dar_path: "./repo.dar" });
03

Open the repo trade

Cash provider proposes; collateral provider accepts. The tri-party agent witnesses.

await ct.call("canton_submit_command", {
  command: "create", template_id: "Repo:Trade",
  payload: { cash: "100000 USD", collateral: "0xBOND...", haircut_bps: 200 }
});
04

Unwind at maturity

At term, both legs reverse atomically — cash returns with interest, collateral releases.

await ct.call("canton_submit_command", {
  command: "exercise", contract_id: tradeCid, choice: "Unwind"
});
Related
← All tutorials