[GENERAL] Name and surname of main applicant
Dominik Tilman
[GENERAL] Are you delivering this project as an individual or as an entity (whether formally incorporated or not)
Individual
[GENERAL] Please specify how many months you expect your project to last (from 2-12 months)
10
[GENERAL] Please indicate if your proposal has been auto-translated into English from another language
No
[GENERAL] Summarize your solution to the problem (200-character limit including spaces)
We will create an open-source DeFi smart contract library in Aiken for Cardano, for better contract security, reducing development time, and to fostering innovation in Cardano's DeFi sector.
[GENERAL] Does your project have any dependencies on other organizations, technical or otherwise?
No
[GENERAL] If YES, please describe what the dependency is and why you believe it is essential for your project’s delivery. If NO, please write “No dependencies.”
No dependencies.
[GENERAL] Will your project’s output/s be fully open source?
Yes
[GENERAL] Please provide here more information on the open source status of your project outputs
All project outputs, including developed software and documentation, will be fully open source under the Apache 2.0 or MIT License.
[SOLUTION] Please describe your proposed solution
Background
This proposal builds on the success of our Fund 11 initiative, where we started to develop the initial Aiken Open-Source Smart Contract Library.
https://projectcatalyst.io/funds/11/cardano-open-developers/aiken-open-source-smart-contract-library-by-meshjs-and-trustlevel
Given the positive community feedback and the clear advantages Aiken-based contracts bring, we are now focusing on expanding this library to include DeFi smart contracts.
As seen with Minswap Labs' development of their V2 DEX Smart Contract, this upgrade demonstrated Aiken's potential to significantly enhances performance - running at least 5x faster- and to improve throughput and reduce costs. Despite these advances, Cardano's DeFi ecosystem still lacks a unified smart contract library, leading to duplicated efforts, increased security risks, and slower innovation.
By extending our Aiken library to DeFi, we aim to provide developers with new tools for building efficient and secure applications, and thus accelerating innovation and adoption across of Cardano DeFi.
Overview of our proposed library
With this proposal we want to create an open-source library of DeFi smart contracts using Aiken. We aim to offer reusable contract templates that could facilitate faster deployment and scaling of DeFi applications.
Library Composition:
The library will consist of a curated collection of smart contracts categorized into four main groups, each addressing key areas of DeFi:
- Trading and Liquidity Provision: Contracts that facilitate automated market-making and manage liquidity contributions for efficient trading.
- Financial Instruments and Derivatives: Contracts for creating and managing stablecoins, and enabling complex financial operations like options, futures, and swaps.
- Asset Management and Collateral: Contracts for tokenizing assets and managing collateral to ensure financial stability and integrity.
- Oracles: Systems for handling external data integration through oracles, ensuring accurate and real-time data flow for stablecoin pricing and other financial applications.
Detailed Description of Contract Categories
This section will provide a thorough understanding of how these contracts are designed to operate within the DeFi ecosystem:
1. Trading and Liquidity Provision
- Purpose: To ensure that DeFi platforms operate efficiently with sufficient liquidity.
- Construction:
- Automated Market Maker (AMM) Contracts: Contracts with algorithms to automatically balance asset ratios in liquidity pools to determine pricing, allowing for continuous trading.
- Liquidity Provision Contracts: These contracts manage the injection and withdrawal of funds from liquidity pools, calculating and distributing yield based on the amount and duration of liquidity provided by participants.
- Key Functionalities: Dynamic pricing based on liquidity, liquidity pool management, yield calculation, and distribution.
2. Financial Instruments and Derivatives
- Purpose: These contracts allow for the creation and trading of financial products such as derivatives.
- Construction:
- Stablecoin Contracts: Contracts to issue and manage stablecoins, ensuring they remain pegged to external references like fiat currencies or commodities.
- Derivative Contracts: Such as options, futures, and swaps, are designed to execute based on predefined conditions and use smart contract-enforced terms for automatic settlement.
- Key Functionalities: Stablecoin peg maintenance, options for buying/selling, futures for locking in future buy/sell prices, and swaps for exchanging different financial instruments.
3. Asset Management and Collateral
- Purpose: These contracts facilitate the tokenization of both digital and real-world assets, making them accessible and tradable on the blockchain. They also manage collateral, which is essential for securing various financial transactions within DeFi applications.
- Construction:
- Tokenization Contracts: Built to convert physical or digital assets into blockchain tokens, these contracts include mechanisms for verifying asset authenticity, establishing and managing (fractional) ownership.
- Collateral Management Contracts: Designed to handle the locking, tracking, and valuation of collateral assets. These include functions for automated adjustments based on market conditions and protocols for liquidation in case of contract breaches.
- Key Functionalities: Asset registration, fractional ownership management, real-time valuation, and collateral liquidation processes.
4. Data Integration and Oracles
- Purpose: To fetch and verify external data necessary for the accurate functioning of various DeFi applications, particularly those involving valuation-dependent instruments like stablecoins and derivatives.
- Construction:
- Oracle Contracts: Connect with multiple external data sources to fetch reliable, timely, and verifiable data.
- Price Oracles: These contracts are important for providing external data to the blockchain, necessary for DeFi applications that rely on real-time information, such as pricing assets accurately.
- Key Functionalities: Data fetching from external sources, real-time data updates, aggregation of data from multiple sources, and conflict resolution in data discrepancies.
Implementation Plan:
There is already a lot of good open-source code that incorporates some aspects of our proposal. Our main goal is to create a central place where the community can collaborate. If a team wants to contribute without us having to rewrite the code, then we could also use some of the funds for audit, for example, so that we ensure that the code is really secure and correct. Win-win for all open-source DeFi projects in Cardano! However, many contracts are not yet available in Aiken, or only fragmented, so the first step after funding is to ask the community who wants to contribute, and also what the best place for library is (for example, it can be Cardano Foundation, or community sites like Mesh or a new one in our TrustLevel Repo).
Features:
- A library of smart contracts, where each consists of a contract, Aiken workspace, exported blueprint, and 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.
- Documentation includes example use cases and developer support materials making it easier for new and experienced developers to adopt and adapt the library for their specific needs.
[IMPACT] 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.
How we measure our impact:
- Increase in DeFi Projects on Cardano:
- Track the number of new DeFi projects developed using the library.
- Measure library usage.
Sharing Outputs and Opportunities:
- Commitment: We are fully committed to open-source development.
- Documentation: We will provide high-quality documentation and supporting resources.
- Awareness: We will actively promoting the tools and libraries.
[CAPABILITY & FEASIBILITY] 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?
Team Capabilities:
We got already funded in F11 to develop the initial Aiken Smart Contract Library (will be implemented here: https://MeshJS.dev/).
Collaborations:
We are currently involved in various topics in Cardano, from open source code creating, to reputation and voting topics and have Active collaborations with the following teams in Cardano:
- SidanLab and MeshJS (Smart Contract Development: https://projectcatalyst.io/funds/11/cardano-open-developers/aiken-open-source-smart-contract-library-by-meshjs-and-trustlevel)
- Lidonation (Reputation-Scores for Catalyst Reviewers: https://projectcatalyst.io/funds/11/cardano-use-cases-concept/reputation-scores-for-catalyst-proposers-and-reviewers-by-lidonation-and-trustlevel)
- Photrek (Development of a community tool for voting calculations and community engagement in SingularityNet: https://proposals.deepfunding.ai/graduated/accepted/ed600af3-885c-45bc-a874-56d2dde371ce)
Feasibility:
- Pilot Testing: We will conduct a series of pilot tests to refine the system, using real-world data and scenarios to ensure that the system performs as intended.
- Feedback Loops: Implement feedback mechanisms to gather insights from the community, which will be used continuously to improve the system.
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.
[PROJECT MILESTONES] What are the key milestones you need to achieve in order to complete your project successfully?
Setup and Community Engagement
- Timeline: Month 1
- Description: Initiate the project by establishing foundational structures and engaging with the Cardano community for input and collaboration.
- Activities: Engagement with the Cardano DeFi community to get feedback, gather requirements, and promote participation.
- Deliverables and Acceptance criteria: Comprehensive summary of community feedback to guide the development phases.
- Evidence of milestone completion: Published documents, specification and code on Github repository.
Smart Contract Development - Phase I
- Timeline: Months 2-3
- Description: We will begin the development of the first set of DeFi smart contracts. This phase will focus on the foundational aspects of the library, including core financial instruments and initial trading and liquidity provision contracts.
- Flexible Execution: Teams will operate in parallel on different contract sets to prevent development bottlenecks and ensure timely progress. This approach allows for simultaneous development of various functionalities
- Deliverables and Acceptance Criteria:
- A functional set of the first third of smart contracts, designed to establish the groundwork for more complex DeFi operations.
- Comprehensive documentation for each contract developed in this phase, providing clear guidelines and operational details to ensure ease of use and integration by developers.
- Completion of initial security audits for the developed contracts.
- Evidence of milestone completion: Published documents, specification and code on Github repository.
Smart Contract Development - Phase II
- Timeline: Months 4-6
- Description: Develop the second set of DeFi smart contracts. This phase will focus on completing another third of the contract library, incorporating more complex functionalities such as advanced derivatives and enhanced liquidity management tools.
- Flexible Execution: To avoid bottlenecks, teams will continue working in parallel on different sets of contracts. This approach allows for simultaneous progress across multiple development streams.
- Deliverables and Acceptance Criteria:
- A functional set of the second third of smart contracts, ensuring that they integrate seamlessly with those developed in Phase I.
- Detailed documentation for each new contract developed during this phase, ensuring that all features and functionalities are clearly understood.
- Security audits for all new contracts to identify and rectify any vulnerabilities.
- Evidence of milestone completion: Published documents, specification and code on Github repository.
Contract Development - Phase III
- Timeline: Months 7-9
- Description: Complete the development of the final set of contracts. This final phase will focus on completing the remaining contracts, which may include complex financial instruments, final integrations of oracle systems, and ensuring full interoperability among all contract components.
- Flexible Execution: Development teams will continue to work in parallel, finalizing all remaining components.
- Deliverables and Acceptance Criteria:
- Completion of the final third of smart contracts, fully integrated and tested to function as part of the comprehensive DeFi ecosystem on Cardano.
- Comprehensive and final documentation for all contracts, providing complete user guides, integration tips, and examples.
- Final round of security audits for the last set of developed contracts, ensuring that the entire library meets the highest standards of security and functionality.
- Evidence of milestone completion: Published documents, specification and code on Github repository.
Launch, Marketing and Closeout Report
- Timeline: Month 10
- Description: Launch the complete library to the public and execute a marketing plan to promote adoption and usage.
- Activities:
- Prepare marketing materials and launch campaigns.
- Host launch events, including webinars and live demos, to showcase the capabilities of the library.
- Deliverables and Acceptance Criteria:
- Official launch of the Aiken Open-Source Smart Contract Library.
- Submit comprehensive project documentation and completion reports.
- Hold a final presentation to showcase the developed contract library.
- Evidence of milestone completion: Published documents, specification and code on Github repository.
[RESOURCES] Who is in the project team and what are their roles?
TrustLevel was founded by Dominik Tilman with the vision to develop methods and protocols to make the reliability of data and information measurable. Since then, we have received various grants (Cardano, SingularityNet, Arbitrum) and projects that have continuously improved our knowledge and developed tools and enabled us to provide better reviewing and voting processes and systems in decentralised communities. All our outputs are open-source.
TrustLevel Core Team:
- Dominik Tilman: Project Lead
- Dominik has been actively engaged since Fund 3 in Project Catalyst and involved in multiple funded projects. All proposals are either successfully delivered or on track. He is founder of TrustLevel.io & Conu21.com and has 15+ years experience in innovation management and company building.
- Links: https://www.linkedin.com/in/dominikstumpp/; www.trustlevel.io; www.conu21.com
- Roman Preuss: Full-Stack Developer
- https://de.linkedin.com/in/roman-preuss-0b145558
- Josch Rossa: Full-stack developer and LLMs
- https://github.com/josros
- Alex Ramalho: Full Stack AI Developer
- https://alexramalho.dev
- Sergey K.: ML + Blockchain Developer
- https://www.linkedin.com/i
Support Team:
Community Bounties:
We would like to encourage the Cardano's DeFi community to participate in the creation of this library, therefore up to 50% of the budget is reserved for community bounties.
[BUDGET & COSTS] Please provide a cost breakdown of the proposed work and resources
Total Budget: 200,000 ADA
Budget Allocation by Milestones:
Milestone 1: Setup and Community Engagement
- Total Allocation: 40,000 ADA
- Project Setup and Infrastructure: 5,000 ADA
- Community Engagement and Feedback Collection: 10,000 ADA
- Initial Reserve for Community Bounties: 25,000 ADA
Milestone 2: Contract Development - Phase I
- Total Allocation: 40,000 ADA
- Development Costs: 25,000 ADA
- Documentation: 5,000 ADA
- Security Audits: 10,000 ADA
Milestone 3: Contract Development - Phase II
- Total Allocation: 40,000 ADA
- Development Costs: 25,000 ADA
- Documentation: 5,000 ADA
- Security Audits: 10,000 ADA
Milestone 4: Contract Development - Phase III
- Total Allocation: 40,000 ADA
- Development Costs: 25,000 ADA
- Documentation: 5,000 ADA
- Security Audits: 10,000 ADA
Final Milestone: Launch and Marketing
- Total Allocation: 40,000 ADA
- Launch Activities and Marketing: 20,000 ADA.
- Bug-Bounties: 15,000 ADA
- Closeout-Report: 5,000 ADA
Note:
We have calculated with an hourly rate of 75 USD (at 1 ADA = 0,5 USD).
We plan to distribute up to 50% of the funds via bounties to contributors from the community.
[VALUE FOR MONEY] 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.