The goal of this repository is to implement the 21 most common blockchain use cases for Cardano using as many on-chain and off-chain frameworks and languages as possible. This will allow developers to use these implementations as blueprints for their own projects while also enabling us to monitor the Cardano ecosystem and its development. Essentially, this project aims to create a map and ecosystem monitoring tool for combinations of on-chain and off-chain technologies, as well as an ecosystem readiness check for upcoming Cardano hard forks.
This repository is divided into directories based on use cases and the technologies used for their implementation. The structure is as follows:
/use-case/onchain/<technology>/
: Contains the on-chain implementation of a specific use case using a particular technology (e.g. aiken, scalus, plu-ts, etc.)./use-case/offchain/<framework>/
: Contains the off-chain implementation of the same use case using a specific framework (e.g. meshjs, lucid-evolution, cardano-client-lib, etc.).
For example:
/payment-splitter/onchain/aiken/
/payment-splitter/offchain/meshjs/
The use cases implemented in this repository are based on the research paper Smart Contract Languages: A Comparative Analysis by Massimo Bartoletti et al. (2024). An on-chain implementation for Cardano in aiken
and in other languages for other blockchain ecosystems are already available in the rosetta-smart-contracts repository.
The 21 use cases identified in the research paper are as follows:
- Bet
- Simple transfer
- Token transfer
- HTLC
- Escrow
- Auction
- Crowdfund
- Vault
- Vesting
- Storage
- Simple wallet
- Price Bet
- Payment splitter
- Lottery
- Constant-product AMM
- Upgradeable Proxy
- Factory
- Decentralized identity
- Editable NFT
- Anonymous Data
- Atomic Transactions
Each use case is implemented in its own directory. To run a specific use case, navigate to its directory and follow the instructions provided in its README file. (E.g. here)
We welcome contributions from the community! If you would like to contribute, please follow these steps:
- Open an issue to discuss your proposed changes or additions.
- Fork the repository and create a new branch for your changes.
- Submit a pull request with a detailed description of your changes.
Please read the Contributing Guidelines before submitting your pull request. Thank you for contributing!