MBA covenant artifacts
Cashscript artifact JSON for the four Mathematically Backed Asset covenants. Download the one that matches the MBA you're integrating, pass it to new Contract(artifact, [...args]), derive the token address locally, and verify it matches the on-chain reservoir before trusting any sidecar parameters.
-
CoinMBA.json
templateId
0x00· Static familyThe default MBA covenant. Fixed sats/unit rate baked at genesis, flat
founderFeeBps(0..500). Reservoir carries the minting NFT and the circulating supply; every claim consumes the current reservoir and emits a fresh one with updated supply. The sound-money archetype of the family — "coin" is literal: a measured amount of BCH wrapped in a covenant stamp.Constructor args:
Download JSON[tokenCategory (bytes32), rateSats (int), feeBps (int), founderLockingBytecode (bytes25)] -
ShareMBA.json
templateId
0x01· Share familyFlat
feeBps, split bycompanySplitBpsbetween a company treasury output and a shareholder distribution vault output. Each claim produces exactly four non-change outputs: new reservoir, user's MBA, company share, distribution share.Constructor args:
Download JSON[tokenCategory, rateSats, feeBps, companySplitBps, companyLockingBytecode (bytes25), distributionLockingBytecode (bytes25)] -
OracleMBA.json
templateId
0x02· Oracle familyRate set by a signed AnyHedge-format price feed at claim time (
OP_CHECKDATASIG). FlatfeeBpson top. Oracle pubkey is baked at genesis; changing it requires a new covenant deployment.Constructor args:
Download JSON[tokenCategory, feeBps, founderLockingBytecode, oraclePubKey (bytes33)] -
DynamicMBA.json (scaffold)
templateId
0x03· Dynamic Rate family · not yet deployableReserved for the Dynamic Rate Asset (DRA) covenant — a pure state-driven rate (reservoir depth, time, mint-count catalysts), no oracle. Distinct from FIATμ, which combines a dynamic-rate layer with an oracle signal to track a fiat purchasing-power target; DRA is the pure state-driven variant and is reflective against a shared pool. The current artifact is a scaffold stub (rejects every call); it reserves the templateId slot and the artifact filename so nothing else lands under this name by accident.
Constructor args:
Download JSON (scaffold)[tokenCategory (bytes32)](placeholder — real signature arrives with the DRA spec)
Example — construct and verify
import { Contract, ElectrumNetworkProvider } from 'cashscript';
import artifact from './CoinMBA.json';
// Params read from the DVMB OP_RETURN of the asset's genesis (or Katalogos entry).
const categoryId = '09af8a5b2fc2c9a2449045a8d5a6aa60db493989682eca257a57fa8d75d67231';
const rateSats = 100n;
const feeBps = 100n;
const founderLB = Uint8Array.from(Buffer.from('76a9149aa6baabb2bbb1d1940e4ec82b9640a7ab62b8dc88ac', 'hex'));
// NOTE: cashscript expects tokenCategory in reversed byte order (VM byte order)
// vs the display hex you'd paste into a block explorer.
const tokenCategory = Uint8Array.from(Buffer.from(categoryId, 'hex')).reverse();
const provider = new ElectrumNetworkProvider('chipnet');
const contract = new Contract(artifact, [tokenCategory, rateSats, feeBps, founderLB], { provider });
// Verify by matching against the on-chain reservoir address — fail loudly if drift.
const expectedTokenAddr = 'bchtest:rw8ypezzy6gv87tq96ey7p60vx9rgl4v5cq4lseg5luk9ktmn20ysl82y8uq0';
if (contract.tokenAddress !== expectedTokenAddr) {
throw new Error('covenant drift — refusing to transact');
}
License and provenance
These artifacts are compiled from the cashscript source in the Deviant repo (currently private) and match the bytecode of the live chipnet deployments listed in the MBA page's live catalog. Verify by comparing the bytecode field of the JSON to the bytecode at any live MBA's reservoir address — they must be identical.