-
Notifications
You must be signed in to change notification settings - Fork 4
Plutus Example Smart Contracts
Real-World Cardano Smart Contract Examples
Brief: Single pool for A⇄B swaps using x·y=k with fee.
On-chain spec
-
State UTxO (PoolDatum):
resA, resB, feeBps, lpPolicyId, poolNFT. -
Redeemer:
Swap{inA|inB},AddLiq,RemoveLiq. -
LP Minting Policy: mints/burns LP proportional to pool share; requires spending the pool UTxO + holding
poolNFT. -
Invariants: unique pool UTxO (guarded by
poolNFT), conservation (+fee), monotonic k (post-fee). Tx flows - Swap: spend pool UTxO → output updated pool + user receive leg.
- Add/Remove: spend pool → output pool with new reserves + LP mint/burn. App features
- Slippage controls, price & k charting, pooled fee analytics, zap (single-asset add with router), impermanent loss sim.
Brief: LPs provide liquidity over chosen price ranges; swaps traverse ticks. On-chain spec
-
Tick UTxO (TickDatum):
lower, upper, liq, feeGrowth. -
Position NFT + PositionDatum:
owner, lower, upper, liquidity, feeOwed. -
PoolDatum:
currentTick, sqrtPriceX96, feeBps, poolNFT. -
Redeemer:
Swap,MintPos,BurnPos,CollectFees. -
Invariants: tick math updates deterministic; position can’t collect > owed; unique pool via
poolNFT. Tx flows - Mint position: create Position UTxO (with NFT), update affected ticks.
- Swap: step across ticks updating
sqrtP, fee growth, liquidity net. App features - Range UI with APR estimate, auto-rebalancing “strategies,” fee visualization per tick, compounding.
Brief: Low-slippage swaps for correlated assets using StableSwap invariant A·n^n·Σx + Πx.
On-chain spec
-
PoolDatum:
balances[2..N], ampParam, feeBps, adminRef. -
Redeemer:
Swap(i→j),AddLiq,RemoveOne,RemoveProportional. -
Reference input: admin/param UTxO for
ampParam. - Invariants: amplification and fee bounded; output Δ within formula tolerance; pool UTxO uniqueness. Tx flows
- Swap & liquidity ops update balances vector and (optionally) LP supply. App features
- Peg monitor & imbalance meter, “remove one coin,” metapools, admin UI for slow amp changes.
Brief: Users post limit orders (UTxOs). A matcher settles batches at a clearing price. On-chain spec
-
OrderDatum:
base, quote, side, priceNum/Den, qty, owner. -
Redeemer:
Cancel | Match{clearingPrice, fillQty}. -
Rules: In a
Matchtx, consumed orders must be settled at ≤ (buy) or ≥ (sell) limit; fees exact; leftovers returned. - Invariants: deterministic pro-rata fills for ties; matcher cannot extract spread. Tx flows
- Post order (new UTxO), cancel (owner sig), batch match (many inputs → many settlements). App features
- Depth chart & tape, iceberg/partial-fill flags, auction windows, MEV-resistant deterministic matching.
Brief: Long orders executed continuously against a pool to reduce price impact. On-chain spec
-
LongOrder NFT + Datum:
owner, direction, total, start, end, executed. -
PoolDatum: standard AMM state +
virtualReservesaccounting. -
Redeemer:
ExecuteSlice,Cancel. -
Invariants: execution rate =
total/(end-start); cumulative executed ≤ total; pool math consistent. Tx flows - Anyone can “execute slice” to realize a time slice swap and collect executor fee; owner can cancel remaining. App features
- DCA interface, schedule editor, projected execution curve, executor incentives display.
Brief: Maker posts signed quote; taker settles atomically via escrow validator. On-chain spec
-
Quote (off-chain signed struct):
sellAsset, buyAsset, price, expiry, makerPKH, nonce. -
EscrowDatum:
maker, taker, quoteHash, deposit. -
Redeemer:
Fill{makerSig,quote},Cancel. - Invariants: quote not expired; correct assets/amounts; maker sig over quote; one-time nonce via spent marker. Tx flows
- Maker funds escrow UTxO; taker fills with payment and quote; outputs route assets and fee. App features
- Chat/RFQ panel, quote QR/sign, partial fills toggle, multi-leg settlement (e.g., with router).
Brief: Atomic pathing across multiple pools with min-out/slippage protections. On-chain spec
- Router script: validates path sequence and minOut; checks each hop’s pool output deltas.
-
Redeemer:
Route{hops:[(poolId, inAsset, outAsset)], minOut}. -
Invariants: executed outputs ≥
minOut; no hop can extract unintended value. Tx flows - Single tx spending involved pools’ UTxOs and producing updated ones + final recipient output. App features
- Path finder (price + gas aware), custom route editor, “zap” single-asset → LP, sandwich-risk estimator.
Brief: Fungible LP tokens represent pro-rata claim on pool. On-chain spec
-
Minting policy: requires spending the pool UTxO with
poolNFT; mints/burns = function of reserve delta. -
Formulae:
- Mint on add:
ΔLP = totalLP * min(ΔA/A, ΔB/B); - Burn on remove: user receives
reserves * (ΔLP/totalLP).
- Mint on add:
-
Invariants: totalLP > 0 after init; no mint without reserves; rounding documented. Tx flows
-
Called by pool validator within Add/Remove flows. App features
-
LP dashboard: share %, fee APR, PnL/IL, one-click compound.
Brief: Distributes incentive tokens to LPs by stake and time. On-chain spec
-
GaugeDatum:
epoch, totalWeight, rewardRate, adminRef. -
Stake NFT + PositionDatum:
owner, poolId, stakedLP, lastUpdate, rewardsAccrued. -
Redeemer:
Stake,Unstake,Claim,AdminUpdate. - Invariants: reward growth per second/epoch; no over-distribution; admin updates via reference UTxO with delay. Tx flows
- Stake/unstake adjusts weight; claim mints/balances incentive token via gauge policy. App features
- APY projection, lock durations/boosts, auto-compounding, emissions schedule transparency.
Brief: Collects fees across products and splits to destinations (treasury, buyback, grants). On-chain spec
-
RouterDatum:
splits[{dest, bps}], controller, version, routerNFT. -
Redeemer:
Route,UpdateSplits(controller-gated, timelocked). -
Invariants: Σbps = 10,000; exact conservation (inputs = Σ outputs); single authoritative router via
routerNFT. Tx flows - Products pay fees into router; route tx pays out to destinations; updates require governance reference input. App features
- Fee analytics per source, role-based destinations, multisig governance with timelock, CSV export.
- Brand critical state with a unique NFT to prevent duplicate states.
- Use reference inputs for governance params/oracles—avoid frequent spending.
- Deterministic math & rounding (document who benefits). Cap CPU/mem; push heavy calc off-chain.
- Safety: signature checks for ownership, time bounds, and invariant asserts with clear trace messages.
- Observability: events via inline datums/tags; off-chain indexer to power charts/APR/TVL.
Brief: Safety validator that atomically enforces route steps and minOut.
On-chain spec
-
RouteDatum:
hops:[PoolId], inAsset, outAsset, minOut, deadline. -
Redeemer:
Execute{pathProof}. -
Rules: all hops present; outputs ≥
minOut;deadline≥now; no extra value siphoned. Tx flows: Spend route UTxO + pools; produce final recipient output ≥minOut. App features: One-click “safe swap,” saved routes, default slippage profiles, dry-run preview.
Brief: Maker posts a self-custodied order; any taker can fill within price bounds. On-chain spec
-
OrderDatum:
owner, base, quote, side, limitNum/Den, qty, remaining. -
Redeemer:
Fill{amount, execPriceNum/Den} | Cancel. -
Rules: fills only if price meets limit;
remainingdecreases; owner sig for cancel. Tx flows: Post order; taker fills part/whole; owner cancels leftovers. App features: Order management, partial fills toggle, time-in-force, fee rebates.
Brief: Automates exit when oracle price crosses a threshold. On-chain spec
-
VaultDatum:
owner, asset, trigger:{Stop|Take}, priceNum/Den, dest, armed. -
Redeemer:
Trigger{oracleRef}|Disarm. -
Rules: oracle ref fresh & signed; direction satisfied; send assets to
dest; owner can disarm. Tx flows: Arm vault; anyone triggers when condition true; pay tiny bounty to executor. App features: Price alerts, trailing stops, multi-asset triggers, simulation.
Brief: Perp swaps use virtual reserves; positions settle via funding to anchor index. On-chain spec
-
PerpPoolDatum:
vResA, vResB, indexPrice, fundingRate, feeBps, poolNFT. -
Position NFT + Datum:
owner, size, entryPx, margin, lastFunding. -
Redeemer:
Open | Close | AdjustMargin | SettleFunding. -
Rules: price from vAMM formula; health ≥ 0 after action; funding settlement updates PnL.
Tx flows: Open/close/adjust in one tx; periodic
SettleFundingupdates. App features: Leverage slider, funding/APR graph, liquidation bands, cross vs isolated toggle.
Brief: Collateral + borrow positions per-account with health checks. On-chain spec
-
Account NFT + Datum:
owner, collaterals[], borrows[], healthFactors. -
Redeemer:
Deposit | Withdraw | Borrow | Repay | Liquidate. -
Rules: post-tx
HF ≥ 1(oracle); liquidation allowed under threshold with bonus. Tx flows: User ops mutate balances; third parties liquidate unhealthy accounts. App features: Real-time HF meter, what-if borrow, liquidation alert subscriptions.
Brief: Pools price options by invariant; LPs provide collateralized exposure. On-chain spec
-
Series NFT + Datum:
underlier, strike, expiry, type, collateralReq. -
PoolDatum:
resOption, resCollateral, feeBps, pricingParams. -
Redeemer:
Swap | AddLiq | RemoveLiq | Exercise. - Rules: exercise only ≥ expiry (European) or conditionally (American variant); collateral suffices. Tx flows: Mint/swap option tokens; exercise burns option → pays intrinsic. App features: Chainable strategies (spreads), Greeks display (off-chain), expiry calendar.
Brief: Vault writes calls against deposited underlier and distributes premiums. On-chain spec
-
VaultDatum:
underlier, strike, expiry, sharesSupply, queuedPremium, round. - ShareToken policy: mints/burns shares when users deposit/withdraw.
-
Redeemer:
Deposit | Withdraw | Write | Settle. -
Rules: write only within round; after expiry settle exercised portion; premiums distributed pro-rata.
Tx flows: Periodic
Writeto sell options; post-expirySettleupdates NAV; users deposit/withdraw. App features: APY history, round timer, auto-roll, strike selection strategies.
Brief: Discrete exercise window; settlement via escrow UTxO. On-chain spec
-
SeriesDatum:
strike, expiry, underlier, optionToken. -
EscrowDatum:
holder, qty. -
Redeemer:
Exercise | Refund. -
Rules:
Exerciseallowednow ∈ [expiry, expiry+grace]; paysmax(0, intrinsic);Refundafter grace if unexercised. Tx flows: Holder presents options + underlier/quote; receives settlement; leftover returned after grace. App features: Countdown to expiry, auto-exercise toggle, PnL preview.
Brief: Continuous sale with deterministic price function. On-chain spec
-
CurveParams ref:
k, exponent(e.g., linear, power, sigmoid via lookup). - Policy: mints/burns token if paid price ≥ ∫f(s) ds between supply bounds.
-
Redeemer:
Buy{Δ} | Sell{Δ}. - Rules: enforce payment vs curve; update supply; fee skim. Tx flows: Buy mints tokens; sell burns and pays refund from reserve. App features: Price ladder, slippage preview, treasury/reserve graph, cap & whitelist options.
Brief: Price falls from start to floor over duration.
On-chain spec
-
AuctionDatum:
seller, asset, start, duration, startPrice, floorPrice, taken. -
Redeemer:
Buy | Cancel. - Rules: current price = linear/curve function of time; pay ≥ price; single-fill unless multi-unit. Tx flows: Buyer purchases when price acceptable; seller cancels if no bids after end. App features: Live price curve, sniper alerts, batch-buy.
Brief: Open bidding until deadline; winner pays highest valid bid. On-chain spec
-
AuctionDatum:
seller, asset, minBid, deadline, topBid, topBidder, bidBondBps. -
Redeemer:
Bid | Settle | Cancel. - Rules: new bid > top + min increment; bonds refunded except winner; settle after deadline to winner. Tx flows: Bids update state; settle routes asset and funds; cancel if no bids. App features: Auto-bid increments, anti-last-second extension, reserve price, KYC-gated if needed.
Brief: Privacy via commitment hash, later revealed. On-chain spec
-
CommitDatum:
bidder, commitHash, deadlineReveal. -
Redeemer:
Reveal{amount, salt} | Refund. - Rules: commitment hash verifies; only reveals before deadline; highest revealed wins. Tx flows: Commit phase deposits; reveal phase settles; un-revealed get refunds after reveal deadline. App features: Guided commit/reveal steps, salt helper, fairness proofs.
Brief: Raise funds; distribute tokens with vesting schedules. On-chain spec
-
SaleParams ref:
price, cap, start, end, whitelist?. -
VestingDatum:
beneficiary, total, start, cliff, end, claimed. -
Redeemer:
Buy | Claim | Refund. -
Rules: buys within window; enforce cap; claims unlock linearly post-cliff; refunds if soft-cap unmet.
Tx flows: Contributions mint vesting entitlements; later
Claimdrips tokens. App features: Cap progress bar, vesting calendar, KYC/allowlist, claim reminders.
Brief: Funds stream over time; recipient pulls accrued amount. On-chain spec
-
StreamDatum:
sender, recipient, ratePerSec, start, end, claimed. -
Redeemer:
Claim | Cancel. -
Rules: claimable =
rate * elapsed - claimed; sender can cancel future (not accrued) if allowed. Tx flows: Create stream deposit; recipient claims anytime; optional cancel by sender. App features: Real-time “now accruing,” pay slips export, batching multiple streams.
Brief: Merchant can pull up to a limit/period from subscriber’s escrow. On-chain spec
-
SubDatum:
subscriber, merchant, period, limit, spentInPeriod, resetAt. -
Redeemer:
Charge | Cancel | TopUp | Update. -
Rules:
Charge≤ remaining in period; updates require subscriber sig; reset window logic. Tx flows: Subscriber funds escrow; merchant charges per cycle; subscriber cancels anytime. App features: Plan tiers, per-period receipts, spend alerts, “virtual card” numbers.
Brief: P2P escrow supporting mutual release or arbiter decision. On-chain spec
-
EscrowDatum:
buyer, seller, arbiter, state, deadline. -
Redeemer:
Release | Refund | Arbitrate{toSeller|toBuyer}. - Rules: mutual release requires buyer+seller sigs; after deadline arbiter can resolve. Tx flows: Fund escrow; resolve via any path; leftover returned appropriately. App features: Dispute chat, evidence attachments (hashes), status timeline.
Brief: Funds unlock per milestone; refunds if target unmet. On-chain spec
-
CampaignDatum:
creator, target, deadline, raised, milestoneIdx. -
PledgeDatum:
backer, amount. -
Redeemer:
Pledge | UnlockMilestone | Refund. - Rules: unlock only if target met; milestone proofs by oracle/attestor; refunds otherwise. Tx flows: Backers pledge; when milestones pass, creator withdraws tranches; refunds after fail. App features: Milestone roadmap, attestor signatures, progress meter.
Brief: Lock collateral, mint a debt token; liquidate if undercollateralized. On-chain spec
-
VaultDatum:
owner, collValue, debt, MCR, LCR. -
Redeemer:
Open | Draw | Repay | Close | Liquidate{oracleRef}. -
Rules: post-op
coll/debt ≥ MCR; liquidation if< LCRwith discount; oracle freshness. Tx flows: Open; draw/repay; liquidate unhealthy vaults in auction or fixed penalty. App features: Health widget, rate/fee accrual, batch repay, liquidation alerts.
Brief: Lenders deposit to a pool; borrowers draw from pool; variable rate. On-chain spec
-
PoolDatum:
cash, borrows, reserveFactor, rateModelParams. - ShareToken policy: mints/burns vs pool exchange rate.
-
Redeemer:
Deposit | Withdraw | Borrow | Repay | Accrue. Rules: exchange rate grows with interest;Accrueupdatesborrowsand reserves; borrow limits via utilization. Tx flows: Deposits mint shares; borrowers take funds; periodicAccrue. App features: Utilization meter, APY history, rate model graph, risk dashboard.
Brief: Pre-approved line with dynamic limit/APR; draw/repay anytime. On-chain spec
-
LineDatum:
borrower, limit, drawn, rateModel, lastAccrual. -
Redeemer:
Draw | Repay | AdjustLimit | Accrue. -
Rules:
drawn ≤ limit; interest accrual; limit changes require controller/governance sigs. Tx flows: Draw/repay mutatedrawn;Accrueapplies interest to outstanding. App features: Credit score link (oracle), autopay, utilization alerts, statement export.
- Brand state UTxOs with unique NFTs; keep parameters in reference inputs for controlled upgrades.
- Oracle data: include
pair, priceNum/Den, validUntil, signerPKH; verify freshness and signature in consumers. - Deterministic math: document rounding; add small executor bounties where keeper actions are required.
- Off-chain: provide builders that compose transactions deterministically and verify invariants before submit.
Brief: Auction collateral of unhealthy vaults or sell protocol surplus.
On-chain spec: AuctionDatum{lot, quote, start, end, minInc, topBid, topBidder, mode: Surplus|Deficit, kicker}; Bid|Settle|Cancel. Invariants: valid increments; settle only after end; single settlement.
Flows: Liquidator “kicks” auction; bids raise top; settle routes proceeds to protocol and lot to winner.
App: Live ladder, kicker bounty, auto-bid, circuit-breaker.
Brief: Mint stable vs collateralized vaults; stability via fees and auctions.
On-chain spec: VaultDatum{owner, coll, debt, MCR, rateIdx}, Open|Draw|Repay|Liquidate; policy for stable mint/burn gated by vault spend; RateRef for stability fee.
Flows: Draw mints stable; repay burns; liquidations feed #31 auction.
App: Peg dashboard, SF accrual, debt ceilings per collateral, keeper hooks.
Brief: Mint sASSET tracking index with over-collateralization.
On-chain spec: SynthVault{coll, debt, ratio}, mint/burn policy validates vs oracle ref (fresh/signed).
Flows: Mint/burn sASSET; periodic re-price updates; liquidation if ratio breached.
App: Price sources, tracking error, basket comp (if index), redemption UI.
Brief: Supply expands/contracts to target index; holders keep proportional share.
On-chain spec: Mint policy that allows Rebase{factor} only when spending ControllerRef signed by governors and within bounds; prevents arbitrary mint/burn.
Flows: Governance triggers Rebase; balances scale via off-chain indexer/UI.
App: Rebase history, APY/target index, opt-out vault, accounting export.
Brief: Deposit ADA → mint sADA; withdraw ADA via queue after on-chain epoch.
On-chain spec: LSDPool{totalADA,totalShares,fee}, share policy mints/burns vs exchange rate; withdrawals tracked with WithdrawalTicket NFTs.
Flows: Deposit mints shares; RequestWithdraw mints ticket; Finalize redeems ticket after epoch.
App: Exchange rate chart, queue status, validator set view, rewards breakdown.
Brief: Trusted publisher writes price as reference input.
On-chain spec: OracleDatum{pair, priceNum, priceDen, validUntil, signerPKH}; Update requires signer’s sig; optional commit-reveal to avoid frontrun.
Flows: Publisher rotates UTxO periodically; consumers read via reference input.
App: Feed latency, signer rotation, multi-publisher median, alerts.
Brief: A reusable validator snippet to enforce price sanity.
On-chain spec: Redeemer carries PairId; script checks presence of matching oracle ref, now < validUntil, bounded decimals, and signer.
Flows: Linked by other protocols (AMM, lending, synths).
App: None (library), but expose test vectors and integration docs.
Brief: Enforces delay between approval and execution.
On-chain spec: TimelockDatum{txTemplateHash, eta, proposer, timelockNFT}; Queue|Execute|Cancel. Invariants: now ≥ eta for Execute; cancel by governance before eta.
Flows: Queue proposal → after delay Execute builds exact tx.
App: Queue calendar, ETA countdown, diff of queued actions.
Brief: Token-based voting controlling timelock/params.
On-chain spec: Proposal{actionsHash, snapshotSlot, quorum, for, against, end}, Vote{weight,choice}, Execute. Uses snapshot (see #40) to fix voting power.
Flows: Create proposal; cast votes; if for ≥ quorum and end passed → queue to timelock, then execute.
App: Forum link, vote breakdown, delegation, proposal templates.
Brief: Freeze voting power at block/time without moving tokens.
On-chain spec: Snapshot UTxO binds policyId + slot; validator reads balances via CIP-68 metadata refs or accumulator proofs; CreateSnapshot|Verify.
Flows: Governor references snapshot when tallying.
App: Snapshot explorer, balance proof helper, audit trail.
Brief: Central parameters object other scripts read but rarely spend.
On-chain spec: Params{version, fees, limits, admins}, gated by governance for Update; other validators require this ref and version match.
Flows: Param update via Governor+Timelock; products read via ref.
App: Param diff viewer, version pinning, rollout notes.
Brief: Non-transferable badges grant roles/permissions.
On-chain spec: SBT mint policy: Mint|Revoke only by controller; transfer forbidden (spend requires same owner).
Flows: Issue/revoke badges; validators require presence of role badge in inputs.
App: Role manager, expiry/renewal, audit log.
Brief: Token transfers or mints require KYC proof.
On-chain spec: Policy checks reference input KYCProof{subjectPKH, expiry, providerSig}; validators gate spends to attested addresses within TTL.
Flows: User obtains proof NFT/UTxO; dApps verify on use.
App: KYC portal, provider registry, redaction/renewal flow.
Brief: Deterministic split of incoming fees/royalties.
On-chain spec: Splitter{[{dest,bps}], splitterNFT, version}, Route|Update (timelocked). Invariant: Σbps = 10_000; conservation.
Flows: dApps pay into splitter; one tx routes exact shares.
App: Recipient management, per-source analytics, CSV export.
Brief: Lock native asset; mint wrapped version elsewhere; burn to release.
On-chain spec: Lockbox{asset, custodianPKH, lockboxNFT}; Lock|Unlock requires custodian sig and proof of burn on remote (hash/oracle).
Flows: User locks → oracle attests → wrapped minted on target; burn there → Unlock here.
App: Status tracker, confirmations, fees, risk warnings.
Brief: Lends if returned with fee in the same transaction.
On-chain spec: LenderDatum{asset, feeBps, lenderNFT}; Borrow{amount} requires that an output recreates lender UTxO with +fee.
Flows: Composer builds multi-leg tx using loan; ends by repaying.
App: One-click “compose” playground, fee estimator, example bundles.
Brief: Collects intents, settles in batches via canonical matching.
On-chain spec: Batch{epoch, rulesHash, intentsRoot}, Settle{clearingData}; validator recomputes outcome deterministically.
Flows: Users post intents; keeper settles batch; everyone gets results atomically.
App: Epoch timer, published rules, proof viewer, intent builder.
Brief: Borrow against NFTs using floor oracle; liquidate on breach.
On-chain spec: Loan{nftId, principal, rate, LTV, lastAccrual, borrower}, Borrow|Repay|Liquidate{oracleRef}; checks floor freshness and decimals.
Flows: Borrow mints debt; repay burns; liquidate transfers NFT to auction if LTV violated.
App: Floor feed, health meter, refinance tool, liquidation alerts.
Brief: Mint BASK token that represents a target basket of assets.
On-chain spec: Basket{components[], weights[], version}, mint policy enforces deposit of target proportions; Rebalance via governance/keeper updates components.
Flows: MintBasket deposits components → mints BASK; Redeem burns BASK → returns components.
App: NAV chart, component breakdown, drift meter, rebalance history.
Brief: Members pool capital; claims paid after assessment vote/oracle event.
On-chain spec: Pool{capital, shares, policyRules}, Claim{claimer, amount, evidenceHash, deadline}, Vote|Approve|Reject; payouts only if quorum approves or parametric trigger fires.
Flows: Stake to mint pool shares; file claim; assess → pay or reject; adjust premiums.
App: Claims portal, loss ratio analytics, underwriting parameters, member voting.
Brief: Patients gate who can read billable data; claims pay out under policy rules.
On-chain spec: Consent{patientPKH, providerPKH, scopes[], expiry}, non-transferable; AccessLog{hash, ts}; Claim{policyId, claimant, amount, evidenceHash, state} with File|Approve|Reject.
Flows: Patient mints/revokes consent; providers append access logs; insurers settle claims.
App: Consent dashboard, scope presets, claim tracker, audit export.
Brief: Tokenize shipments; release funds per delivery milestone/IoT proof.
On-chain spec: ShipmentNFT + ShipDatum{route[], custodian, status, deadline}; Milestone{idx, proofHash}.
Flows: Shipper funds escrow; carriers submit milestone proofs; funds stream to carrier; dispute path.
App: Live map (off-chain), milestone timeline, POD uploads, SLA alerts.
Brief: Issue invoices; factor them; settle in stablecoin with compliance checks.
On-chain spec: Invoice{issuer, buyer, amount, due, paid, hash}; Assign to factor; stable policy gated by KYC ref.
Flows: Issue → assign → buyer pays → protocol routes principal+fee.
App: Aging report, discount quotes, automated reminders, compliance flags.
Brief: Verifiable diplomas; tuition paid on enrollment/attendance milestones.
On-chain spec: Soulbound Cert{student, program, grade, issuer, hash}; Tuition{student, school, amount, schedule, claimed}.
Flows: School mints SBT on completion; escrow releases per class/term.
App: Credential wallet, verify QR, refund rules, scholarship disbursement.
Brief: Split royalties by production; escrow equipment leases; track ore batches.
On-chain spec: RoyaltySplitter{bps[]}; Lease{lessor, lessee, rent, collateral, end}; OreBatchNFT{source, assayHash}.
Flows: Monthly settlement → splitter; lease default → collateral path; ore transfers append chain.
App: Production inputs, lease calendar, compliance docs.
Brief: Weather/oracle triggers pay crop insurance; co-op revenue shares.
On-chain spec: Policy{farm, trigger{rainfall<, temp>, drought idx}, sumInsured, expiry}; CoopShare mint vs deposits.
Flows: Oracle posts index; if threshold hit → automatic payout; seasonal profit split.
App: Weather feed, claim transparency, co-op ledger.
Brief: Product authenticity NFTs + creator payout split.
On-chain spec: AuthNFT{brand, model, serial, hash}; Splitter for royalties; resale validator enforces royalty.
Flows: Mint at manufacture; resale routes royalty.
App: Scan-to-verify, ownership history, drop auctions.
Brief: NFT tickets with anti-scalp rules; event revenue distributed.
On-chain spec: Ticket{seat, eventId, transferRules}; transfer capped or KYC-gated; RevenueSplitter.
Flows: Primary sale → wallet; gate scan checks rules; post-event payout split.
App: Seat map, resale cap, perks/airdrops to holders.
Brief: Tokenize lots; pay on milestones; recall across graph.
On-chain spec: LotNFT{batch, BOM[], qcHash}; MilestoneEscrow{supplier,buyer,steps}; ref graph via CIP-68 metadata.
Flows: Transfer lots between entities; hitting step releases payment; recall traces descendants.
App: Trace graph, QC attachments, step automation.
Brief: Warranty SBT; RMA handled by escrow with proof-of-test.
On-chain spec: WarrantySBT{deviceId, expiry, terms}; RMA{customer, deviceId, deposit, state}.
Flows: Claim checks SBT & expiry; repair/refund via RMA states.
App: Warranty wallet, claim portal, spare-part provenance.
Brief: Donations tracked; committees allocate via proposals.
On-chain spec: Treasury{splits, rules}; Proposal{grant, purpose, votes}.
Flows: Donors fund; proposals approved → execute grants; earmarks enforced.
App: Public ledger, earmark filters, impact reports.
Brief: Escrowed bounties; controlled response spending.
On-chain spec: Bounty{scopeHash, max, arbiter}; MSafe{signers, threshold}.
Flows: Researcher submits PoC hash; arbiter releases payout; incidents trigger MSafe spends.
App: Scope portal, payout history, signer dashboard.
Brief: Verifiable credentials; SBT KYC badges; zk gates.
On-chain spec: VCRef{issuer, subject, schemaHash, expiry}; KYCBadgeSBT; consumer snippets check issuer & TTL.
Flows: Issuers publish VC refs; apps read via reference input; revocation list.
App: Wallet for VCs, proof builder (selective disclosure), revocation viewer.
Brief: Open campaign treasury + grants with milestones.
On-chain spec: Campaign{treasurer, limits, disclosureRef}; Grant{milestones, reportHash}.
Flows: Donations in; disburse against reports; audit trail immutable.
App: Donor breakdown, spend explorer, milestone tracker.
Brief: Sign content; micropay per article; verified publisher tips.
On-chain spec: ArticleRef{publisherPKH, contentHash, ts}; Paywall{price, entitlement}.
Flows: Reader pays → entitlement NFT; tips route to publisher with proof-of-publisher.
App: Reader wallet, source verification, bundle passes.
Brief: Monetize posts; access via community tokens; on-chain reputation.
On-chain spec: PostRef{hash, author}; AccessPolicy{token, threshold}; RepScore{non-transferable}.
Flows: Fans pay → splitter to author/treasury; gating checks balance; rep accrues by attestations.
App: Pay button, token-gated rooms, rep badges.
Brief: Pay contractors per milestone; lien releases on payment.
On-chain spec: Project{owner, steps, inspectors}; LienNFT{contractor, amount, step}.
Flows: Inspector attests completion → pay + burn lien; disputes via arbiter.
App: Gantt milestone board, doc vault, payments timeline.
Brief: Token vouchers redeem for data/voice; message requires deposit to reduce spam.
On-chain spec: Voucher{quota, expiry}; MsgEscrow{sender, deposit, ttl} refundable when recipient accepts.
Flows: Burn voucher to redeem service; message accepted → deposit returned; else forfeited.
App: Top-up store, inbox with “deposit” filters.
Brief: Secure deposits; settle per head; split to caterer + suppliers.
On-chain spec: EventEscrow{client, caterer, headcount, price, refundRules}; Splitter.
Flows: Lock deposit; finalize headcount → settlement; refunds by rules.
App: RSVP integration, headcount oracle, receipt export.
Brief: Tokenize kWh; settle net-metering; issue/retire carbon credits.
On-chain spec: kWhToken mint vs meter oracle; Carbon{projectId, vintage, amount} with retire policy.
Flows: Producers mint; consumers pay; retire carbon to offset.
App: Marketplace, meter feed, portfolio/offsets report.
Brief: Tickets with refund rules; VIP perks and sponsor revenue.
On-chain spec: Ticket{tier, rules}; Refund{window, cause}; SponsorSplitter.
Flows: Sell → scan → settle sponsor splits; refunds per rule.
App: Tier perks, resell caps, guestlist tools.
Brief: Bookings escrow; dynamic pricing; loyalty SBT.
On-chain spec: Booking{host, guest, dates, price, cancelPolicy}; Loyalty{level, points}.
Flows: Guest pays → holds booking NFT; cancel/refund by policy; points accrue on stay.
App: Calendar, price oracle (off-chain), tier perks.
Brief: Oracle-triggered payouts or voted claims.
On-chain spec: Policy{trigger, sum, expiry} parametric; Mutual{pool, shares} + Claim{evidence} voted.
Flows: Trigger fires → payout; or vote → pay/reject.
App: Trigger feed, claim portal, risk metrics.
Brief: Continuous payroll; escrow for gigs; referral bounties.
On-chain spec: Stream{rate, start,end, claimed}; GigEscrow{milestones, arbiter}; Referral{candidate, bonus, cliff}.
Flows: Stream claims; milestone payouts; bonus after cliff.
App: Payslips, invoice generator, bounty tracker.
Brief: Time-bound rentals; fractional vaults; robust royalties.
On-chain spec: Lease{nft, renter, expiry}; Vault{nft, shares}; royalty policy via splitter.
Flows: Lease mints “use-rights”; fraction mint/redeem; royalties on secondary sales.
App: Rental marketplace, vault UI, royalty dashboard.
Brief: Price via bonding curve; vesting/lockups; transfer rules via KYC.
On-chain spec: Curve policy (see #19); Vesting{beneficiary, schedule}; ComplianceRef gate.
Flows: Mint/burn vs curve; claim vested; transfer checks ref.
App: Vesting calendar, policy editor, compliance status.
Brief: Pay for compute tasks; enforce output delivery; label bounties with QA slashing.
On-chain spec: Job{specHash, reward, deadline, verifier}; LabelTask{items, reward/item, QA rules}.
Flows: Worker submits result hash → verifier attests → payout; QA slashes for bad labels.
App: Job board, verifier plugins, reputation.
Brief: Trace parts; role-based access badges.
On-chain spec: PartNFT{nsn, lot, compliance}; RoleSBT{unit, clearance, expiry}.
Flows: Parts transfer record; access checks SBT roles.
App: Compliance viewer, inventory audit, access registry.
Brief: Points accrual with non-transferable tier badges.
On-chain spec: Points{balance}; TierSBT{level, expiry} minted on thresholds.
Flows: Purchases → points; tier upgrades; redemption burns points.
App: Rewards wallet, tier ladder, offers.
Brief: Membership SBT with renewals; voting weights.
On-chain spec: MemberSBT{org, joined, expiry}; governor weights by tenure/level.
Flows: Join/renew; proposals read member weight.
App: Renewal reminders, members directory, votes.
Brief: Hardware/API access requires pass; revocation via ref list.
On-chain spec: AccessPass{resourceId, expiry}; RevocationRef{passIds[]}.
Flows: Reader checks pass + not revoked; admins add to revocation ref.
App: Issuance portal, audit logs, device integrator.
Brief: Aircraft parts provenance and maintenance logs; slot/landing fee settlement.
On-chain spec: PartNFT{tailNo, serial, recordsHash}; MaintenanceLog{work, ts, certifier}; Slot{airport, time, fee}.
Flows: Certifier appends logs; slot booking pays fee; parts tracked across installs.
App: Airframe timeline, fee invoices, compliance export.
Brief: Low-cost remittances with corridor liquidity + attestations.
On-chain spec: Remit{sender, receiver, amount, corridor, fxOracleRef, KYCRef}; LiquidVault per corridor.
Flows: Sender pays local; LP/bridge handles FX; receiver cashes out; proofs stored as refs.
App: FX quote, fee breakdown, pickup options, AML flags.
- Brand critical state with NFTs to prevent duplicates; keep params in a reference UTxO behind governance.
-
Oracles: include
pair, priceNum/Den, validUntil, signerPKH; always check freshness & decimals. - SBTs for identity/roles; forbid transfers by requiring same owner on spend.
- Deterministic math & rounding; add small executor bounties for keeper actions.
- UX: dry-run previews, slippage/min-out guards, clear error traces.
Bernard Sibanda is a global Technology Entrepreneur, Web3 and Software Consultant with a deep focus on Cardano Blockchain, Midnight and Community building.
Key Positions:
- Founder, CTO, Developer Advocate cohort #1, Fullstake Developer, Cardano Ambassador, Catalyst Project Manager, DREP-WIMS:
- Co-founder of ABL Tech and Cardano Africa Live
- EBU-certified Plutus Pioneer (Plutus/Haskell)
- Cohort #1 Plutus Pioneer Developer
- Catalyst Community Reviewer & Funded Projects Manager
-
DRep for WIMS-Cardano (ID:
drep1yguj8zu48n99pv70yl6ckzt9hdgjy8yjnlqs2uyzcpafnjgu4vkul) - Intersect Developer Advocate
- Intersect Committe Member 2025-2026
- Cardano Marketer,Promoter and blogger
- Cardano Open Source Contributor
- Cardano communities and events organizer and builder
- Cardano Ambassador for South Africa
Official links:
- Stablecoins Dex
- Coxygen Global Universities
- WIMS Cardano Global
- Cardano Africa Live
- WIMS Cardano Videos
- Cardano Smart Contract Videos
- Fullstack IT Consulting
Social links: