The Canton Royalty Engine is a decentralized application for transparent, automated, and real-time royalty calculation and distribution for digital content. Built on the Canton Network using Daml smart contracts, it provides an immutable, auditable, and privacy-preserving system for creators, rights holders, and content licensees.
This platform replaces opaque, slow, and error-prone manual royalty accounting with a shared, trusted ledger that programmatically enforces royalty agreements.
- On-Chain Royalty Splits: Creators define and register royalty distribution shares for each piece of content directly on the ledger.
- Automated Distribution: When licensees report revenue, the engine automatically calculates and distributes payments to all rights holders in proportion to their registered shares.
- Atomic Settlement: Royalty payments are settled atomically using Canton-native tokens (e.g., stablecoins), ensuring that fund transfers and obligation fulfillment happen in a single, indivisible step.
- Full Audit Trail: Every action, from agreement creation to usage reporting and payment, is immutably recorded, providing a complete and verifiable history for all stakeholders.
- Privacy by Design: Canton's privacy model ensures that contract details are only visible to the involved parties, protecting sensitive financial and contractual information.
The process is divided into three main phases: Setup, Usage Reporting, and Distribution.
- Onboarding: A Royalty Service Provider (the operator of the platform) onboards creators and other rights holders (e.g., publishers, producers) onto the network, assigning them a unique party identifier.
- Content Registration: The primary creator registers a new piece of content (e.g., a song, an e-book, a digital art piece).
- Define Splits: The creator defines the royalty split agreement, specifying the percentage share for each rights holder. This is captured in a
RoyaltyAgreementsmart contract. All specified rights holders must agree to the terms, creating a multi-party, signed agreement on the ledger.
- License Grant: The Royalty Service Provider grants a usage license to a content platform (e.g., a streaming service, an online marketplace).
- Report Usage: The licensee periodically reports usage metrics and the gross revenue generated from the content. This is submitted as a
UsageReportcontract proposal to the Royalty Service Provider. - Verification & Acceptance: The provider verifies the report. Upon acceptance, the report becomes a mutually agreed-upon fact on the ledger, creating an obligation for the licensee to pay the calculated royalties.
- Royalty Calculation: The acceptance of the
UsageReporttriggers an automated process. The system references theRoyaltyAgreementto calculate the total royalty amount due and the specific payment owed to each rights holder. - Payment Instruction: The system creates
RoyaltyEntitlementcontracts, one for each rights holder, detailing the exact amount they are owed. - Atomic Settlement: The licensee settles their obligation by funding the distribution. This is typically done via an atomic Delivery-vs-Payment (DVP) transaction, where the licensee's payment is automatically and proportionally distributed to each rights holder's digital wallet in a single, trustless transaction.
As a creator or rights holder, the platform enables you to manage your intellectual property and receive payments transparently.
Your Workflow:
- Contact the Service Provider: Get onboarded to receive your secure digital identity on the Canton Network.
- Register Your Content: Use the platform's dashboard to register your work. You will be the initial owner.
- Define Your Collaborators: Invite your co-creators, publisher, or other rights holders to the royalty agreement. Enter their party identifier and the percentage share they are entitled to.
- Finalize Agreement: Once all parties have digitally signed the
RoyaltyAgreement, it becomes active on the ledger. - Monitor Earnings: The dashboard provides a real-time view of usage reports and your accrued earnings. You will receive payments directly to your connected wallet as soon as licensees settle their reports.
As a licensee, the platform simplifies your royalty accounting and payment obligations.
Your Workflow:
- Get a License: Contact the Service Provider to get onboarded and receive a license for the content you wish to use.
- Submit Usage Reports: On a periodic basis (e.g., monthly), use the dashboard to submit a
UsageReport. You will need to provide:- The content identifier.
- The reporting period.
- The gross revenue generated.
- Await Verification: The Service Provider will review and approve your report.
- Settle Payments: Once the report is approved, the system will show you the total royalty amount due. You can initiate a payment from your connected wallet to settle the obligation. The platform ensures your single payment is correctly distributed to all underlying rights holders automatically.
- Smart Contracts: Daml
- Ledger: Canton Network
- Daml SDK Version: 3.4.0 (using DPM)
- Frontend: TypeScript, React, Vite
- UI Components: Material UI
- Ledger Integration:
@c7/ledger,@c7/react
- DPM (Daml Package Manager): Installation Guide
- Node.js: v18 or later
- Java: JDK 11
-
Clone the repository:
git clone https://github.com/digital-asset/canton-royalty-engine.git cd canton-royalty-engine -
Build the Daml models: This compiles your Daml code into a DAR (Daml Archive).
dpm build
-
Start the Canton Sandbox Ledger: This command starts a local, single-node Canton ledger and exposes the JSON API on port 7575.
dpm sandbox
-
Install frontend dependencies: Navigate to the
frontenddirectory and install the required npm packages.cd frontend npm install -
Run the frontend application: This will start the React development server, typically on
http://localhost:3000.npm start
The application should now be running and connected to your local Canton sandbox. You can interact with the UI to onboard parties and test the royalty management workflows.