funded
Aiken Open-Source Smart Contract Library [by MeshJS & TrustLevel]
Current Project Status
In Progress
Amount
Received
₳61,128
Amount
Requested
₳113,200
Percentage
Received
54.00%
Solution

We create a collection of open-source smart contracts with Aiken (including Workspace, Mesh TX builder components) and integrate them into the Mesh SDK library on Github - open and accessible to all.

Problem

The lack of an open-source smart contract library for Cardano is a barrier to entry for new developers, increases the development time and makes the development of new DApps more difficult.

Impact Alignment
Feasibility
Value for money

TrustLevel

4 members

Aiken Open-Source Smart Contract Library [by MeshJS & TrustLevel]

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>

Please define the positive impact your project will have on the wider Cardano community.

Alignment with Challenge KPIs:

  • More open-source projects, developers, and users.
  • More open-source tools and frameworks.
  • Increased open-source contributions and maintainers.
  • Improved adoption of Cardano technology.

Value for the Cardano Community:

  • Perception barrier: Overcoming the belief that building dApps on Cardano is difficult.
  • Ecosystem development: Facilitating a more inclusive and welcoming environment for developers.
  • Tooling improvement: Creating well-documented, user-friendly tools for increased productivity.
  • Mesh JS SDK: Enhancing the existing SDK to demonstrate the practicality and enjoyment of developing on Cardano.

How we measure our impact:

  • Increased Adoption: Enhancing open-source project visibility to attract more developers.
  • Improved Documentation: Increasing understanding and participation in the project.
  • Framework Adoption: Streamlining development with fewer bugs and more focus on core ideas.
  • Reputability: Enhancing the community's perceived credibility through examples and demos.

Sharing Outputs and Opportunities:

  • Commitment: MeshJS is fully committed to open-source development.
  • Documentation: Providing comprehensive, high-quality documentation and supporting resources.
  • Feedback Integration: Adapting and expanding tools based on feedback from developers.
  • Awareness: Actively promoting the tools and libraries.

What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?

  1. Team Capabilities:

MeshJS builds open source libraries and tools that enable developers to easily build powerful dApps on the Cardano blockchain. You can see our work at: https://MeshJS.dev/

To allow people to easily get started, we have developed several guides which allow developers of any level to make their first step building on the Cardano ecosystem: https://MeshJS.dev/guides, as well as some basic starter templates https://MeshJS.dev/starter-templates. For developers who would prefer to integrate MeshJS into an already existing project, we provide support for that as well with our https://MeshJS.dev/migration-manual-installation guide.

Smart Contract Design: In this folder, you currently see one marketplace smart contract as a reference: <https://github.com/MeshJS/mesh/tree/main/packages/contracts>

2. Track Record and Trustworthiness:

Our team members have been actively engaged since Fund 3 in Project Catalyst. We have been involved in multiple funded projects. All proposals are either successfully delivered or on track.

3. Fund Management:

We will use Dework to manage and track the progress of our proposal. This will also include a transparent overview of the received payments from the treasury and the payment to our team.

What are the key milestones you need to achieve in order to complete your project successfully?

Standard Contracts

  • Timeline: Month 1-2
  • Description: Develop and implement a set of standard contracts within the Aiken Open-Source Smart Contract Library.
  • Outputs:
  • Contracts: Marketplace (buy, update, cancel, purchase), Swap (deposit, cancel), Escrow (list, pay, report, dispute, claim), etc.
  • Implementation Steps:
  • Write a contract in Aiken.
  • Generate blueprint.
  • Build tx and conduct testing.
  • Develop Components.
  • Write comprehensive documentation.
  • Acceptance Criteria:
  • Successful implementation of each contract.
  • Contracts pass testing and validation.
  • Documentation for each contract is created and accessible.

>Complex Contracts

  • Timeline: Month 3-4
  • Description: Implement a set of complex contracts showcasing advanced functionalities within the Aiken Open-Source Smart Contract Library.
  • Outputs:
  • Contracts: Smart Contract NFT Minting (3+ scripts),
  • App Oracle Design Pattern (3+ scripts).
  • Acceptance Criteria:
  • Successful implementation of each complex contract.
  • Contracts pass testing and validation.
  • Documentation for each complex contract is created and accessible.

>List of Bad Contracts

  • Timeline: Month 5-6
  • Description: Create a set of intentionally bad contracts (at least 5+) within the Aiken Open-Source Smart Contract Library to serve as learning resources for developers.
  • Outputs: A curated list of intentionally bad contracts highlighting common mistakes and vulnerabilities, including but not limit to:
  1. Multiple satisfaction
  2. Unbounded protocol value
  3. UTxO contention
  4. Locked value
  5. Insufficient staking control
  • Implementation Steps:
  • Develop intentionally bad contracts with common mistakes.
  • Ensure each contract exhibits specific issues for educational purposes.
  • Conduct testing to confirm the contracts' flaws.
  • Document the identified flaws and suggest potential fixes.
  • Make the bad contracts and documentation accessible within the library.
  • Encourage community engagement for learning and discussion on identified issues.
  • Acceptance Criteria:
  • Successful implementation of each bad contract.
  • Contracts pass testing to ensure they exhibit specific issues.
  • Documentation detailing the flaws and potential fixes is created and accessible..

>Project Completion

  • Timeline: 1 Week
  • Outputs: This final milestone includes all close-out and project completion activities. Outputs will include a project completion video and the completion report. Additionally we can demonstrate all deliverables and outputs in a town hall meeting.
  • Acceptance Criteria:
  • Completed and submitted close out video
  • Completed and submitted close out report

Who is in the project team and what are their roles?

Name: Dominik Tilman

Role: Project Management

Links: <https://www.linkedin.com/in/dominikstumpp/>; www.trustlevel.io; www.conu21.com

Description: Founder of TrustLevel.io & Conu21.com, 15+ years experience in innovation management and company building.

Name: Hong Jing (Jingles)

Role: Technical Lead

Link: <https://jingles.dev/>

Description: Jingles is a machine learning engineer by day, and full-stack developer by night. Currently pursuing PhD in machine learning applied neuroscience while in the meantime building MeshJS, an open-source project for Cardano blockchain applications.

Name: Hinson Wong

Role: Smart Contract Developer

Links: <https://www.linkedin.com/in/hinsonwong/>; <https://github.com/sidan-lab>

Description: Experience Cardano smart contract architect and engineer. Lead developer at CNS. Build several open source tooling for the community at SIDAN Lab.

Please provide a cost breakdown of the proposed work and resources.

  1. Milestone: Standard Contracts

Outcome:

  • 5 Standard Contracts

Time requirement:

  • 40 hours per contract = 200 hours*
  • Project Management = 20 hours**

Budget:

  • In USD: 220 hours x 80 $/h = 17.600$
  • In ADA: 44.000

2. Milestone: Complex Contracts

Outcome:

  • 2 Complex Contracts

Time requirement:

  • 75 hours per contract = 150 hours*
  • Project Management = 15 hours**

Budget:

  • In USD: 165 hours x 80 $/h = 13.200$
  • In ADA: 33.000

3. Milestone: Bad Contracts

Outcome:

  • 5+ Bad Contracts

Time requirement:

  • 30 hours per contract = 150 hours*
  • Project Management = 15 hours**

Budget:

  • In USD: 165 hours x 80 $/h = 13.200$
  • In ADA: 33.000

Final Milestone

Outcome:

  • All close-out and project completion activities

Time requirement:

  • 16 hours

Budget:

  • In USD: 16 hours x 80 $/h = 1.280$
  • In ADA: 3.200

*This includes creating Aiken Workspace, Mesh, Docs & Demo per contract

** This includes Reporting and Administration

Total Budget: 113.200 ADA***

  1. Milestone: 44.000 ADA
  2. Milestone: 33.000 ADA
  3. Milestone: 33.000 ADA
  4. Milestone: 3.200 ADA

***Calculated with 1 ADA = 0.4 USD

How does the cost of the project represent value for money for the Cardano ecosystem?

Alignment with industry rates:

Our project costs and rates reflect competitive rates for freelancers in Western countries, taking into account the full extent of employment overheads.

Risk mitigation:

As a team, we willingly accept the currency risk of being paid in ADA, demonstrating our commitment and adaptability in a dynamic cryptocurrency environment. A decrease in the ADA price is a risk we bear, while any increase allows us to expand the scope.

Long-Term Cost Savings:

The initial project cost is viewed as an investment for long-term savings. The smart contract library's role in reducing duplication, promoting code reuse, and streamlining development processes contributes to overall cost savings for the Cardano ecosystem over time.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00