Please describe your proposed solution.
Extended Problem Statement
Without an open-source smart contract library, developers face several challenges:
- Lack of Code Examples and Best Practices:
- New developers struggle to find guidance without an open-source library.
- Increased Development Time:
- Building smart contracts from scratch consumes significant time and effort.
- Security Risks:
- Developing without library guidance increases the risk of security vulnerabilities.
- Reinventing the Wheel:
- Developers duplicate efforts by writing similar code without a central repository.
- Limited Community Support:
- Collaboration and knowledge-sharing are hindered without a central code repository.
- Slower Adoption and Innovation:
- Absence of a smart contract library acts as a barrier for new developers, slowing Cardano adoption.
Proposed Solution
Aiken Open-Source Smart Contract Library:
- Integrated into the Mesh Github library: https://github.com/MeshJS/mesh/tree/main/packages/contracts
- Mesh facilitates easy and accessible dApp development on Cardano for both beginners and enterprises.
- A library of smart contracts, where each consists of a contract, Aiken workspace, exported blueprint, and Mesh Transaction Builder components.
- Transaction builders are included for ease of use, aiding new developers in understanding and implementing contracts.
- Inclusion of existing community open source simple contracts and newly implemented contracts showcasing common Cardano DApp design patterns.
1. List of ‘Standard’ Contracts:
- Marketplace (buy, update, cancel, purchase)
- Swap (deposit, cancel)
- Escrow (list, pay, report, dispute, claim)
- Vesting
- Gift card
- Examples can be found at:
- <https://github.com/aiken-lang/fortuna>
- <https://github.com/aiken-lang/awesome-aiken>
- <https://meshjs.dev/smart-contracts/marketplace>
2. List of ‘Complex’ Contracts:
- Smart Contract NFT Minting (3+ scripts included):
- Enables decentralized minting of Cardano NFTs with concurrency controls.
- Useful for NFT projects aiming to enhance decentralization in the minting process.
- App Oracle Design Pattern (3+ scripts included):
- Uses an app oracle validator as a single source of truth for static content in Cardano DApps.
- Implements custom content updating logics for full decentralization.
- Applicable design pattern for modern Cardano DApps.
3. List of ‘Bad’ Contracts
- This helps new and experienced developers to better understand how smart contracts work and improves their ability to fix bad contracts.
- A list of examples and source can be found here:
- <https://github.com/tweag/cooked-validators>
- <https://github.com/sigp/solidity-security-blog>