Cardano Contracts Library
A curated aggregator of reference smart contracts from across Cardano. We index proven work from other open sources and link straight to each contract's own repo, organized by use case.
Anonymous data
via CF monitoring
Commit data on-chain under an identifier derived from a wallet and a secret nonce, then prove ownership later by revealing the nonce.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoAtomic transaction
via CF monitoring
Spend from a script and mint a token in one transaction to show how Cardano transactions succeed or fail as a single unit.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoAuction
via CF monitoring
Run an on-chain English auction where bids are locked in the contract, outbid bidders reclaim their funds, and the highest bid settles when the deadline passes.
On-chainAikenScalusOff-chainCCL JavaEvolutionMeshJSPyCardanoBet
via CF monitoring
Let two players stake an equal amount and have a restricted oracle announce the winner, who then claims the whole pot.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoConstant product AMM
via CF monitoring
A written specification for an automated market maker that prices swaps with the constant product formula and lets anyone provide liquidity.
ReferenceContent ownership
via MeshJS
A registry where users create and own content.
On-chainAikenOff-chainMeshJSCrowdfund
via CF monitoring
Collect donations toward a funding goal where the beneficiary withdraws only if the goal is met by the deadline, and contributors otherwise reclaim their funds.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoDecentralized identity
via CF monitoring
Manage self-sovereign identities where an address controls ownership through signatures and can authorize time-limited delegates.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoEditable NFT
via CF monitoring
A written specification for an NFT whose owner can update its data, transfer it, and permanently seal it against further edits.
ReferenceEscrow
via CF monitoring
Hold assets from two parties until both sign off, then complete or cancel the exchange.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoFactory
via CF monitoring
Deterministically create and track many product contracts from a single factory instance using a marker NFT and on-chain registry.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoHello World
via MeshJS
Lock and unlock assets, a hands-on intro to validation and transaction building.
On-chainAikenOff-chainMeshJSHTLC
via CF monitoring
Lock funds behind a secret and an expiry so anyone can claim them by guessing the secret before the deadline, after which the owner reclaims them.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoLottery
via CF monitoring
Run a fair two-player lottery using a commit-reveal-punish protocol that needs no external randomness or oracle.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoNebula
via awesome-aiken
An NFT marketplace contract with a chain indexer and event listener for individual projects.
On-chainAikenNFT minting machine
via MeshJS
Mint NFTs with an automatically incremented index.
On-chainAikenOff-chainMeshJSPayment splitter
via CF monitoring
Distribute locked funds equally among a fixed list of known payees.
On-chainAikenScalusOff-chainCCL JavaEvolutionMeshJSPyCardanoPayment subscription
via Anastasia Labs
Automated recurring payments between subscribers and merchants.
On-chainAikenOff-chainEvolutionPrice bet
via CF monitoring
Let two players bet on whether an oracle exchange rate reaches a target before a deadline, with the pot going to the winning side.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoProjected NFT Whirlpool
via awesome-aiken
A protocol that lets NFTs from other ecosystems be used in games while keeping custody.
On-chainAikenRoyalties
via MeshJS
Enforce creator royalty payments on NFT sales using the CIP-102 royalty datum standard.
On-chainAikenOff-chainMeshJSSimple transfer
via CF monitoring
Deposit assets at a script and name a receiver who can later withdraw them.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoSimple wallet
via CF monitoring
An on-chain ADA wallet where the owner creates payment intents, executes them to pay recipients, and can withdraw the full balance.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoStorage
via CF monitoring
Anchor SHA-256 commitments of off-chain data on-chain so anyone can re-hash the data and verify its integrity and existence.
On-chainAikenOff-chainBlazeCCL JavaEvolutionMeshJSPyCardanoSundaeSwap Yield Farming v2
via awesome-aiken
Yield farming reward-distribution contracts.
On-chainAikenToken transfer
via CF monitoring
Lock a specific native asset that only a designated receiver can withdraw by signing the spending transaction.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoUpgradable multisig
via Anastasia Labs
Collective fund management requiring multiple approvals.
On-chainAikenOff-chainEvolutionUpgradable proxy
via CF monitoring
Point a stable proxy address at a logic script hash stored in its datum, so the logic version can be swapped by updating the datum.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoVault
via CF monitoring
Protect funds with time-delayed withdrawals and a separate recovery key that can cancel a pending withdrawal during the wait period.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardanoVesting
via CF monitoring
Lock funds for a period and let the beneficiary withdraw them once the lockup elapses.
On-chainAikenOff-chainCCL JavaEvolutionMeshJSPyCardano