Version 1.4 | CrownThrive, LLC (Full IP Ownership) Tagline: “On-chain streams. Off-chain clarity.”
Audience & Scope
This whitepaper specifies the Royalty Streaming Pallet (RSP) — the runtime module that enables continuous, compliance-aware royalty flows within the CHLOM blockchain. RSP is the low-level execution layer behind the Royalty Streaming Engine (RSE) and coordinates directly with ADE, DLA, ACE, DAL, Treasury, Oracles, and CSN.
It covers its architecture, storage, data structures, runtime calls, extrinsics, governance hooks, testing, and cross-layer integration.
0. Introduction
Traditional royalties are slow and manual. RSP replaces batch cycles with per-second or per-event micro-settlements, recorded immutably through DAL, verified by ACE, and backed by Treasury liquidity.
It encodes programmable splits, adaptive attribution weights, escrow mechanisms, and environmental sustainability hooks—all within a composable, upgradeable Substrate pallet.
1. Design Principles
- Deterministic & auditable: Integer-based math recorded on DAL with full proof trace.
- Compliance-first: Every transfer is checked through ACE & DLA state.
- Composable: Exposes interfaces for ADE, DLA, and Treasury.
- Fail-safe: Streams can pause, throttle, or escrow upon compliance risk.
- Gas & weight efficient: Micro-accumulation and batch settlements minimize fees.
2. Architecture Overview
+-------------------+ +---------------------+
| DLA (SL-NFTs) |<------>| RSP (this pallet) |<-----> Treasury
+-------------------+ +---------------------+
^ ^ ^
| | |
| | +----> ADE (Splits)
| +--------- ACE (Risk)
| |
v v
DAL <--------------------------- Oracles + CSN
3. Data Structures
pub type StreamId = Hash;
pub type LicenseId = Hash;
pub type BasisPoints = u16; // 10000 = 100%
pub struct Party<AccountId> {
pub did: DID,
pub account: AccountId,
pub share_bps: BasisPoints,
pub verified: bool,
}
pub enum Frequency { PerSecond, PerBlock, Interval(u32) }
pub enum StreamMode { Pull, Push, Escrowed }
pub struct Stream<AccountId, Balance, Moment> {
pub id: StreamId,
pub license: LicenseId,
pub creator: AccountId,
pub recipients: BoundedVec<Party<AccountId>>,
pub frequency: Frequency,
pub mode: StreamMode,
pub next_settlement_at: Moment,
pub accrued: Balance,
pub eco_bps: BasisPoints,
pub paused: bool,
pub last_risk: u32,
}
pub struct UsageEvent<Balance, Moment> {
pub stream: StreamId,
pub weight_bps: BasisPoints,
pub amount: Balance,
pub ts: Moment,
}
4. Storage Layout
Streams<T>: Map<StreamId → Stream>
Accrual<T>: Map<StreamId → Balance>
LicenseIndex<T>: DoubleMap<LicenseId, StreamId → ()>
RiskCache<T>: Map<StreamId → u32>
LastSettle<T>: Map<StreamId → Moment>
5. Extrinsics (Public Calls)
fn create_stream(license: LicenseId, recipients: Vec<Party>, frequency: Frequency, mode: StreamMode, eco_bps: BasisPoints)
fn credit_usage(stream: StreamId, amount: Balance, weight_bps: BasisPoints)
fn settle(stream: StreamId)
fn settle_batch(streams: Vec<StreamId>)
fn pause(stream: StreamId)
fn resume(stream: StreamId)
fn update_recipients(stream: StreamId, recipients: Vec<Party>)
fn set_frequency(stream: StreamId, frequency: Frequency)
6. Events & Errors
Event:
StreamCreated(StreamId, LicenseId)
UsageCredited(StreamId, Balance)
Settled(StreamId, Balance, u32)
Paused(StreamId)
Resumed(StreamId)
RecipientsUpdated(StreamId)
Error:
NotLicensed
InvalidRecipients
OverAllocation
TooFrequent
StreamPaused
RiskBlocked
InsufficientFunds
7. Settlement Algorithm
fn do_settle(stream_id: StreamId) -> Result<Balance, Error> {
let s = Streams::get(stream_id).ok_or(NotLicensed)?;
ensure!(!s.paused, StreamPaused);
let risk = ACE::risk_score(&s.license, &s.recipients);
ensure!(risk < 80, RiskBlocked);
let mut pool = Accrual::get(stream_id);
if pool.is_zero() { return Ok(pool); }
if s.eco_bps > 0 {
let eco = pool * s.eco_bps.into() / 10_000u32.into();
pool -= eco;
Treasury::eco_distribute(eco)?;
}
for p in s.recipients.iter() {
let owed = pool * p.share_bps.into() / 10_000u32.into();
Treasury::payout(&p.account, owed)?;
}
Accrual::insert(stream_id, 0);
DAL::attest_royalty(stream_id, pool);
Ok(pool)
}
8. Governance Hooks
pub trait GovernanceHooks {
fn set_global_cap_per_block(cap: Balance);
fn set_default_eco_bps(bps: BasisPoints);
fn set_risk_threshold(level: u32);
}
Controlled by R-DAO and T-DAO; all updates logged in DAL.
9. Integration Contracts
| Module | Role |
| ADE | Provides split tables, verifies sum = 100% |
| DLA | Verifies license validity; pauses streams on revocation |
| ACE | Risk gating and fraud detection |
| Treasury | Executes transfers, manages eco allocations |
| DAL | Records attestations for credit, settlement, and risk |
| Oracles | Adjust attribution weights dynamically |
| CSN | Handles human oversight for edge cases |
10. Security Model
- ACE Gate: All payouts validated by compliance engine.
- Escrow Mode: Risky streams accumulate until cleared.
- Overflow-safe math: Saturating arithmetic ensures stability.
- DID Verification: All recipients confirmed via DLA.
- Replay Prevention: DAL nonce protection on usage events.
- Post-Quantum Ready: Optional Kyber512 key support.
11. Example Flows
Music Stream:
- DLA issues license NFT with 60/30/10 split.
- RSP stream created with 1% eco allocation.
- Usage events credited every 10 seconds.
- Keeper calls
Film License (Escrow Mode):
- ACE flags risk.
- Stream auto-pauses, funds accrue in escrow.
- DAL case resolves; stream resumes & releases payments.
12. Observability & Operations
- Prometheus metrics for accrual, settlement, pause states, risk stats.
- DAL weekly Merkle rollups for public proof.
- CSN threads link to DAL case IDs for transparency.
13. Roadmap
| Version | Milestone |
| v1.5 | Multi-ACE risk averaging |
| v1.6 | Streaming NFTs for future flow trading |
| v1.7 | Cross-chain settlement bridge |
| v2.0 | zk-Stream proofs for private royalties |
14. Closing Statement
The Royalty Streaming Pallet (RSP) is the mechanical engine that turns usage into perpetual, verifiable income. It fuses fairness with automation—distributing royalties in real time, enforcing compliance, and embedding accountability through DAL proofs.
By tightly coupling to ACE, DLA, ADE, Treasury, and Oracles, RSP ensures the CHLOM economy remains transparent, sustainable, and just.
Prepared for: CrownThrive LLC | CHLOM™ Framework R&D Version: 1.4 — Royalty Streaming Pallet Whitepaper Classification: Public Technical Disclosure (Pending Patent Filing) All Rights Reserved © CrownThrive LLC
End of Document — CHLOM™ Royalty Streaming Pallet (RSP) Whitepaper (Full Edition)