Please describe your proposed solution.
We propose to generalize and audit the milestone-based smart contract developed by DirectEd and then make it "off-the-shelf" usable for any project to implement.
By off-the-shelf usable, we mean that a Web2 developer should be able to implement it to their use case with only a few Man-Days of external (Haskell/Plutus) consultancy required (to ensure that the primitive was correctly parameterized).
Below is a description of the Generalized Smart Contract Primitive
There are four types of Agents and a smart contract involved in this use case.
A person (here understood as a Cardano stake address) can have any number of roles at the same time. We shall define all four Agent types below. We will then describe how they interact. "Pooling Smart Contract", the smart contract defines the number of Agent type (defined below), who they are (stake address), and the parameterization of the Milestones Smart Contract.
Definitions
- "Milestones Smart Contract", defines the Recipients, number of milestones, token and amount of each token.
- "Facilitator", the agent defining the parameters of the milestones smart contract, responsible for deployment, defines which people (Cardano wallets) will be Reviewers and Examiners.
- "Investor", the agent(s) providing liquidity to the pooled smart contract(s).
- "Approver", the agent(s) with the (joint, if mulitple) power to approve which "Recipient(s)" will receive Funding.
- "Recipient", the agent(s) receiving the funds.
- "Examiner", the agent(s) with the power to determine if a milestone has been reached. Can be interpreted as a "Human oracle" if it is a physical person, or a smart contract making decisions purely based on an oracle data feed.
How the Agents Interact
Let X, Y, F, M, and A be integer variables strictly greater than 0.
We assume that the Facilitator has already defined all relevant parameters and deployed the smart contract. We will describe the flow for an arbitrary number of each of the other Agents but just one Recipient, the user flow is identical for several Recipients.
- X investors sends funds to the "Pooling Smart Contract" on the Cardano blockchain.
- Y Approvers each send an Approver NFT to "Recipient 1". This means that they approve Recipient for a distribution of Funds (F) divided into M tranches/milestones, each with A amount (hence, F=M*A is Funding amount approved for "Recipient 1"). "Approving" means sending an NFT to the wallet of "Recipient 1".
- "Recipient 1" sends Y Approver NFTs to the "Pooling Smart Contract". This initialises the "Milestones Smart Contract 1", taking F from "Pooling Smart Contract" to "Milestones Smart Contract 1". Each Recipient has a unique "Milestones Smart Contract".
- "Recipient 1" provides evidence of progress towards milestone M. Each of the N Examiners mints and sends a milestones completion NFT for milestone M to "Receipient 1" if they deem that milestone M was met.
- "Recipient 1" sends N milestone NFTs for milestone M to smart contract. The smart contract burns the milestone NFTs and returns "A" amount to "Recipient 1".
- The process is repeated until all milestones have been met or if the Deadline defined in the "Milestones Smart Contract" has been reached and funds are returned to a pre-defined address.
Extra notes
- Amount A and types of Cardano native tokens can vary for each milestone M.
- Each milestone distribution require a unique set of NFTs.
- The NFT from each Reviewer is necessary but not sufficient to receive milestones funding (Examiner NFT is also necessary).
- The Pooling Smart Contract contains a timer such that if not all funds have been approved for a particular Milestones Smart Contract, then it can be returned to a pre-defined wallet.
The above-described Smart Contract Primitive has a very large number of business use cases, depending on the parameterization of the above. Any situation which requires accountability and where parties would like to distribute the approvals mechanism and automate the payout mechanism would be suitable.
To illustrate, we will sketch a small number of them below, including the use-case that inspired the development of it.
- DirectEd Development Foundation Access Scholarships. Donors contribute to a scholarship pool for students from a specific school. The School and DirectEd are the "Approvers". Students have to pass milestones in order to receive further mobile data stipends or incentive prizes. A Chief Examiner (DirectEd or external) is the Examiner.
- Catalyst funding. Project proposals in Catalyst would be approved by the community, currently represented by IOG who would be the "Approver". Right now, Challenge Team members have served as "Examiners" in a manual process. The decisions on milestones pass examinations would become highly transparent.
- Construction Work. Upon approval of a loan, bank would fund a Pooling contract. Lender who wants to build a house selects a service provider (Recipient) and defines trusted domain experts (Examiners) and can assess the quality of work of construction workers for each milestone.
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
The Challenge describes that the purpose of this challenge is to provide a stream of resources to teams that want to develop their projects and contribute back to the community by sharing part of their efforts in terms of open source projects, open-source frameworks, and accessible knowledge.
This proposal addresses all of the above three points.
- Open Source. The DirectEd Development Foundation’s own GitHub repository has been open-sourced since January 2023, enabling anyone to utilize the milestones-based smart contract for scholarships.
- Framework. We use the term Smart Contract Primitive because we believe this code-base constitutes a foundational building block for a plethora of use-cases. Reducing cost of employing a blockchain solution by 10x.
- Accessible Knowledge. We not only provide knowledge in the form of documentation and guidance for non-Web3 developers, we will also build out the infrastructure making the process of taking this out to the real world both secure (through the auditing firms we hire) and accessible.
What Value Does This Bring to the Cardano Ecosystem?
- Reducing the cost for any business requiring milestones-based (tranches) distribution of funding. We estimate that this reduces the cost of development, including auditing, for the proposed use cases from mid-high 6 figures to less than $5000.
- Well-documented and highly versatile Open Source repository and Framework, helping further educate new developers looking to build on Cardano.
Proven demand
Other than our own project, we have received public testimonies from two projects. Several web2 businesses have also expressed their interest but we are not allowed to disclose those.
Cardano projects with public testimonies:
- Commonlands.
- Selfdriven Foundation.
How do you intend to measure the success of your project?
We will have the following medium-term metrics of success (after delivering the product)
- Number of Web3 projects adopting the Smart Contract Primitive with their own parametization
- Number of Web2 companies adopting the Smart Contract Primitive.
- Number of different Github accounts and number of comments, pull request,s and commits to the GitHub repo
Long Term-
- Number of transactions interacting directly with Smart Contracts based on this project.
- Number of transactions enabled (second order) by smart contracts from this repository
Please describe your plans to share the outputs and results of your project?
The two main sources of output and updates will be the DirectEd Progress Updates page and the Github Repository itself.
- Documentation: We will create comprehensive documentation that explains the implementation and usage of the smart contract. This will be publicly accessible on our GitHub repository.
- Community engagement: We will actively engage with the Cardano community through forums, social media platforms, and developer channels to share our project's outputs, progress, and insights.
- Presentations and workshops: We will organize presentations and workshops to demonstrate the functionality and benefits of the milestone-based funds distribution smart contract. These events will target educational institutions, scholarship organizations, and the broader blockchain community.
- Collaboration opportunities: We will actively seek collaboration opportunities with other projects and organizations in the Cardano ecosystem to leverage synergies and promote the adoption of our solution.