not approved

General Purpose Crowdfunding and Milestones-based Distribution Smart Contract Framework

₳155,000.00 Requested
Ideascale logo View on ideascale
Solution

Open source and audit a smart contract primitive that enables multi-party milestones-based distribution of funds to projects or individuals.

Problem:

Lack of accountability of grant/investment recipients. Traditional milestones approval mechanisms are centralized and have high overhead.

Yes Votes:
₳ 36,404,880
No Votes:
Votes Cast:
242

  • Video cover image

[SOLUTION] Please describe your proposed solution.

This section covers:

  • Problem
  • Short solution
  • Where we are now
  • Where we want to go
  • Detailed description

Problem

The person(s) with money (Investors) is often not the same as the executing party (Doer). One party is paying another party to do something. Friction can arise in several ways. If the money is paid upfront, then what happens if the Doer doesn't do what was promised? But if the money is paid retroactively, what if the Investor don't pay up? An escrow doesn't fully resolve the problem either. The manager of the escrow becomes a central point of trust with full discretion of the funds (even if it is a multi-sig).

Short Solution

A smart contract which first pools funding from an arbitrary number of Investors whilst enabling a number of Approvers who select Recipient(s) to carry out a project. The project is divided into milestones. One or several Examiners decide whether milestones were completed. If the proposal was not completed before the expiration date, then funds can be returned to Investors or another wallet.

Video

You can watch a 5 min video explaining the proposal here:

<https://youtu.be/CkmwDaQFBxg>It was recorded for the Fund 10 version of the proposal. The proposal is largely the same with some slight improvements and clarifications.

Where we are now

We have currently completed a prototype thanks to funding from F8. You can view the closeout video for this proposal here. The prototype showcases the simplest situation for what we want to achieve on the preproduction testnet using the emulator:

  1. Donors can contribute to a scholarship pool (Pooling Smart Contract)
  2. Two entities must each send an NFT to a student whom they approve for a scholarship.
  3. The student makes a transaction with those 2 NFTs to the Pooling Smart Contract, which initialises their Milestones Smart Contract.
  4. When a student passes a milestone, an "Examiner" sends an NFT that the student can use to withdraw a tranche of their scholarship.

Where we would like to take this

We want to make this smart contract more generally useful. In other words, we want to build out an audited open-source repository which enables any web2 and web3 developer to implement an instantiation of this smart contract (with parameterization tailored for the specific use-case).

Description of the general solution

Pooling-smart-contract-b1b918.jpg

There are four types of Agents and two smart contracts involved.

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 Agent type (defined below), who they are (stake address) and the parameterisation of the Milestones Smart Contract.

"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, A, B, N and M 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.

  1. X investors sends funds to the "Pooling Smart Contract" on the Cardano blockchain.
  2. 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".
  3. "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".
  4. "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 "Recipient 1" if they deem that milestone M was met.
  5. "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".
  6. 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 predefined 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 parameterisation 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. This was the first use-case.

  • NFT projects. Most NFT project launch products with great promises but little accountability. A smart contract like ours can hold all funds in a general pool, with trusted community members (NFT holders) holding “Approver” and “Examiner” roles, thus ensuring that the project owner's ability to rug is very limited.

  • 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. - Building Construction work. Upon approval of a loan, bank would fund a Pooling contract. A 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.

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

We are proposing a flexible smart contract framework suitable for a wide range of real-world use cases. This smart contract can optimise distribution mechanisms, and enhance accountability in a transparent manner.

It will be an open-sourced framework that is accessible to smaller teams and non-web3 companies.

  1. 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.
  2. 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.
  3. Accessible. 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 several projects who would be interested in using this smart contract including Commonlands, Self driven Foundation and Birble.win NFT marketplace.

How will we measure impact?

We will measure the following key metrics

  • The number of forks of the GitHub repository

  • The number of independent projects that implement and deploy a variation of this smart contract

  • The number of Web2 companies that implement and deploy a variation of this smart contract

  • The number of transactions interacting directly with any instantiation of this Smart Contract framework or primitive

  • Total Valued Locked in a parametrisation of this smart contract

    [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?

Proven track record of delivering

DirectEd has a long-standing history within the Cardano ecosystem and it was born out of a project proposal in Catalyst Fund 6 (proposal). It has since then received funding for two proposals in Fund 8 (dApp & SSI). Closeout video for the F8 dApp proposal here. To sign up for testnet Alpha testing, go to <http://testnet.directed.dev/> (open for alpha testing signups). We embrace radical transparency, as can be observed through our public Progress & OKR page and by inspection of our wallet transaction metadata ($directed, $simondirected).

We recently completed our second Fund 8 proposal building an SSI-powered (Atala PRISM) scholarship application and management proposal. It will be possible for Ethiopian students holding an Atala PRISM 2.0 credential with their high school grades to apply via our portal which then automatically verifies the grades and enables the student to fill in a full application form. You may view the proposal close-out here:

<https://youtu.be/QhFpbBcFnZc>Utilization of the network, open-source code contributions and real-world impact & partnerships.

The section below quantifies each of these:

Cardano use

  • 120+ wallets created and estimated 250+ transactions (lower end). To illustrate, the Decentralised Tutorial Marketplace pilot has (at the time of writing) generated 130 transactions. You can see it being actively used by inspection of the policyID <https://cardanoscan.io/tokentransactions?assetId=d365ad6a86fe81ed303eab00fc46031e88879166f7d26a271a553009445456>
  • Salaries have been paid on-chain. Previous treasury address: <https://cardanoscan.io/address/0158a6c035359d0c470f790c0eedc10b034bcbefeccf3573b979236358a6f473253923585a4137f57aa71ae386a96ca1f568ffec3c35320910>.
  • Current treasury (multi-sig): <https://cardanoscan.io/address/31edbbf1a2258c28b4fe58fd29abd38d79cf8b2d576006343de5d83ff8edbbf1a2258c28b4fe58fd29abd38d79cf8b2d576006343de5d83ff8>

These are of course very low volumes, but we are scaling up our operations 3x in 2024 and by another 3x in 2025. Overall, we aim to have about 5000 students take part in our program by the end of 2025, meaning 5000 new wallets.

Open Source Contributions (repo)

  • CIP-30 wallet connection for any NextJS/ReactJS website. Our wallet connect automatically detects which Cardano browser extension wallets are present in your browser and displays a dropdown upon hovering of the ones detected. <https://github.com/DirectEd-Development-Foundation/Directed-dapp/tree/main/components/ConnectWallet>
  • NFT-gating. We have written code enabling simple NFT gating for a NextJS/ReactJS website. Users can either choose to gate content by policyID in an array (multiple policyIDs can be added) or by the unique asset ID. This gives website owners a novel method of access control that does not hinge on storing emails and passwords. <https://github.com/DirectEd-Development-Foundation/Directed-dapp/>
  • Milestone-based smart contract. This smart contract enables accountability of approved granting of funds in a distributed manner wherein Examiners (human oracles) must issue tokens to grantees before they can redeem each tranche payout. <https://github.com/DirectEd-Development-Foundation/directed-smart-contract>
  • Voucher Redemption Contract. This smart contract enables education funders to restrict the use of stipends for specific uses, in our case students receive tutorial vouchers and only tutors can redeem those for stablecoin. <https://github.com/DirectEd-Development-Foundation/tutors-marketplace>

Real-world impact and Partnerships

  • 150+ students trained in our 1-week-long Introductory Coding course in Python with some testimonies here. Students received basic blockchain education and testnet wallet onboarding, video recording of the workshop here.
  • 14 Access Scholarships funded through the DirectEd Lions NFT fundraiser. This financed the purchase of laptops, WiFi devices and data bundles for students from needy backgrounds, enabling them to partake in the DirectEd Bootcamp. Images here. Sample on-chain transactions for data bundles and tutorial vouchers. Check out our Twitter for some of the testimonials from the students!
  • MOUs with 3 national high schools in Kenya, including most notably Mang’U High - one of the most famous schools in the country, with many eminent alumni including one former president, several vice presidents and a former governor of Central Bank of Kenya. Pictures from the MOU signing here.
  • MOU with Kotebe University of Education in Addis Ababa. This university is dedicated to research and development in education for Ethiopia.
  • In-person Bootcamp launch day at Young African Leaders Initiative East Africa regional center at Kenyatta University (USAID project).
  • Sponsorships: [CLOVR] stake pool, [KIND] stake pool, COTI Group
  • Internship partnerships with Snapbrillia and Tally
  • Other partnerships: Cardanowarriors, Web3 User Group

Traction

  • In the spring of 2022, DirectEd was admitted to the inaugural Ariob incubator for Catalyst-funded Africa projects.
  • During the Cardano summit, CEO Simon Sällström met with Shahaf Bar-Geffen (CEO of COTI) who generously agreed to sponsor for the first cohort of DirectEd students.
  • CEO Simon was invited to speak at NFT.NYC on a panel “Why NFTs will revolutionize charitable giving”.
  • First-ever charitable incorporated organisation (CIO) to be approved by the Charity Commission of England and Wales for its use of blockchain in operations.

Media and Twitter spaces

Spring 2023

Fall/Winter 2022

Financial Management and Transparency

We have implemented robust financial management processes, leveraging cardano blockchain technology for transparency, accountability, and responsible use of funds. All transactions contain metadata and can be tracked on the Cardano blockchain. We maintain accurate records, conduct regular audits, and provide transparent financial statements to relevant parties, promoting transparency and accountability in our financial management practices.

To this end, we have implemented the following policies for our treasury management.

  1. Catalyst funds received in the main multi-sig with 5 signatories, with 3/5 signatures required for any transaction.
  2. ADA funds received are immediately converted to stablecoins to avoid volatility
  3. All transactions contain metadata regarding its intended use.
  4. All DirectEd-controlled wallets will contain ADAhandles indicating its purpose and controller.

This means we have a multi-sig for the custodianship of received funds. We convert the majority of funds to one or several stablecoins upon receipt. We also extensively document each transaction with information about its use in the metadata. The multi-sig wallet can be explored here ($directeddev) and the payout wallet ($directedsimon) can be audited here.

Project Governance and Reporting

Building upon our previous project experience, we have established a robust project governance structure that emphasizes transparency and accountability. Regular reporting and monitoring mechanisms are in place to track progress and ensure adherence to project milestones and targets. You can inspect our public Progress reporting and OKR page here.

As part of our commitment to transparency, we implemented a progress page for donors to track the performance of students, providing updates on their achievements, which can be observed by donors (NFT gated) here. This reporting framework enables stakeholders to stay informed about project status, outcomes, and financial performance, fostering transparency and accountability throughout the project lifecycle.

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

Completion of a flexible parameterisable smart contract.

Acceptance criteria

  • Demo video showing an illustrative example on how one can parameterise the smart contract
  • Open-sourced code in GitHub

>Auditing of the smart contract completed.

Acceptance criteria

  • An audit report published publicly

>Documentation, marketing and adoption of this smart contract framework.

Acceptance criteria

  • Documentation that explains step-by-step how to parameterise and deploy one's own version (bespoke parameterizations) of the smart contract

  • 5 Town hall or Twitter space appearances about this contract

  • 3 projects starting to use the smart contract

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

Team

Below is a selection of team members. To see the full team of volunteers and other contributors, head over here.

Simon Sällström, project manager. MPhil in Economics, University of Oxford. Founder and CEO, DirectEd Development Foundation with several open-source contributions to the Cardano ecosystem including NFT gating, wallet-connect and two general-purpose smart contract primitives. PA and vPA in Catalyst F6-F9. Chair, Cardano RealFi Consortium Spring 2023. Workstream lead, Oxford Blockchain Society. Founder, Cardano Student Hub Oxford. Speaker at NFT.NYC. 5 completed Catalyst proposals, 3 pending completion (2 for CardanOx).

LinkedIn

Rohan Mitta. Smart Contract Lead. MAst in Pure Mathematics, University of Cambridge; MSc Foundations of Computer Science and Mathematics, University of Oxford. Plutus Pioneer 2022. Atala PRISM Pioneer 2022.

LinkedIn

Edmund Ebiyenrin. Front-End. BSc in Computer Science, Federal University Makurdi, Google Student Developer Club regional lead. Github: https://github.com/Brave-source

LinkedIn

John Ndigirigi. Atala PRISM engineer. BSc Computer Science, Dedan Kimathi University of Technology, Software developer, community builder, Atala PRISM pioneer.

Socials: Linktree

Ency Lu. UIX design. BFA in Studio Fine Arts Queens College…Fashion Design Parsons the new school. UIUX Springboard

LinkedIn

In addition, we will be assisted on the technical side by haskell.team, led by Bartłomiej (Bart) Kącicki (ex IOG).

[BUDGET & COSTS] Please provide a cost breakdown of the proposed work and resources.

We are unable to provide a precise quote for the auditing cost of the smart contract at this point. There are also significant uncertainties as to the precise cost of the remaining smart contract development. This means that we are providing ranges for the budget posts below.

Completion of generalisable smart contract

  • 30,000 - 60,000 ADA
  • depends on how much auditing costs and the extent we will require haskell.team consultancy

Smart contract auditing (estimate)

  • 60,000 - 90,000 ADA

Marketing and General Outreach

  • 10,000 - 20,000 ADA
  • depends on auditing costs

Contingency (ADA fluctuation and variation of above)

  • 20,000 ADA

We have used USD-ADA of 0.35 to make our estimates above.

TOTAL

By taking the mid-point of each range, we get a total of 170,000 ADA

[VALUE FOR MONEY] How does the cost of the project represent value for money for the Cardano ecosystem?

Why is this value for money?

Use cases.

The number of use cases enabled by this smart contract is extremely large. Any time you have a Principal (Investor) and Agent (Doer/Recipient), with the potential for trust breakdowns and the need to reduce the middlemen involved, this smart contract can lead to significant cost reductions.

This includes anything from decentralised venture capital, improvements to the distribution mechanisms of Catalyst, to the distribution of scholarships for DirectEd scholarships.

Cost is a barrier to the adoption of Cardano

At the moment, any Web2 company looking to adopt blockchain to improve its business processes will face massive hurdles in doing so at the moment due to the massive investment costs in this.

The cost of implementing a seamless and distributed smart contract flow will at least amount to $50k, not including auditing.

With a flexible smart contract framework like ours that has been audited, this cost is reduced 10x so that the cost falls to below $5k in terms of costs and 1 or 2 man-days of Cardano consultancy services to verify that the implementation was done correctly.

Conclusion

It is naturally hard to estimate the return on investment for this but it is very clear that a significant deterrent for any company looking to use blockchain is simply the cost of adoption. They will go for an EVM chain if the costs are lower, despite the many security flaws and issues that ecosystem has. They will look at the network effect and short term (lower) cost and go for it. We need to provide a cheap AND secure alternative (hence the auditing).

Comments

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