[GENERAL] Name and Surname of Main Applicant
[GENERAL] Email address of Main Applicant
- Juan Salvador Magán-Valero
- Agustín Salinas-Hernández
[GENERAL] Please specify how many months you expect your project to last (from 2-12 months)
[GENERAL] Please indicate if your proposal has been auto-translated into English from another language.
[GENERAL] Does your project have any dependencies on other organizations, technical or otherwise?
[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.” in this field.
[GENERAL] Will your project outputs be fully Open Source?
[GENERAL] If NO, please describe which outputs are not going to be open source. If YES, please write “Project will be fully open source.” in this field.
Project will be fully open source.
[METADATA] Category of Proposal
Dev Tools, API or Library
[IMPACT] Please describe your proposed solution.
We plan to enable a type of ZKPs known as ZK-SNARKs (“zero-knowlege succinct non-interactive argument of knowledge”) to Cardano users by leveraging existing open-source solutions, particularly CIRCOM and SNARKJS. We will develop off-chain tooling that will generate ZK-proofs whose verification will be executed on-chain by smart contracts running on a Hydra head. We will also develop said smart contracts, which will implement an "Optimal Ate" pairing adapted to the BN128 Elliptic Curve.
[IMPACT] How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
Zero-Knowledge-Proofs enable verification of information without revealing the information itself. By creating tools that enable native ZKPs on Cardano, we open the door for developers to create solutions where privacy is an important component. Furthermore, it is worth mentioning that ZKPs also have applications in scalability solutions and cross-chain protocols. Making sure that these tools exist in Cardano is of paramount importance given that ZKPs utilization in the Web3 space will increase significantly. This will allow novel applications, where a combination of transparency and privacy is required, to be brought to the Cardano ecosystem.
[IMPACT] How do you intend to measure the success of your project?
A successful completion of the project will mean having a Github repo offering:
- Off-chain tooling that facilitates the deployment of ZK-SNARKs on a Hydra head, leveraging open source projects like CIRCOM and SNARKJS.
- On-chain tooling written in Plutus/Plutarch that implements the BN128 Elliptic Curve pairing in order to execute the verification of ZK-proofs produced by the off-chain code.
- Roll-up code to integrate the result of verification in the Cardano mainnet.
- Documentation and application examples to guide the Cardano community in the incorporation of Zero Knowledge Proofs in their projects.
- If the need is found justified, we will have written a CIP to improve the adaptability of low-level UPLC to the computation of the SNARK algorithms involved in ZK-proof verification.
Beyond the Github repo itself, an important measure of success is utilization of our tooling by the Cardano developers community.
[IMPACT] Please describe your plans to share the outputs and results of your project?
We plan to make all the code fully open. This is just fair since we are leveraging existing open-source resources.
A very important “open” aspect of our project is the technical documentation that will be generated. ZKPs are very heavy on Mathematical sophistication, and having a clear documentation of how the Elliptic Curve implementation is executed will be very valuable to the community.
[CAPABILITY/ FEASIBILITY] What is your capability to deliver your project with high levels of trust and accountability?
Our team was formed as a result of our participation in the Zero-Knowledge track of the Cardano Emurgo Build 2023 Hackaton. As a result of very intensive work we were able to:
- Deliver a working DApp showcasing the use of Hydra to implement ZKPs in the context of the game “Mastermind” as a proof of concept.
- Write a Plutus implementation of a Weil’s pairing for a generic Elliptic Curve and initiate testing on the BN128 Elliptic Curve (which is extensively used in ZKPs deployed in Ethereum).
- Did extensive testing on various components of Miller’s algorithm (which is required by the Elliptic Curve pairing) which has allowed us to identify the “bottlenecks” that need to be optimized in order to be run by Hydra heads as smart contracts.
- Gained experience that gives us confidence that we will be able to successfully integrate the off-chain and on-chain code to arrive at a consolidated solution.
Our team has a strong background in software development for the Cardano ecosystem and Mathematics research. (See section on ‘Project Team’ below.)
[CAPABILITY/ FEASIBILITY] What are the main goals for the project and how will you validate if your approach is feasible?
Our main goal is to develop the necessary tooling so that projects in the Cardano ecosystem can perform ZK-proof verification via smart contracts on Cardano, at the security and versatility level of the Groth16 protocol of ZK-SNARKS. Since this is currently not possible to do directly on the Cardano mainnet, our solution will use the Hydra protocol.
[CAPABILITY/ FEASIBILITY] Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.
- Starting from the generic “Weil’s pairing” that we already have developed as part of our solution submitted to the Emurgo Hackathon, we will construct the necessary algorithms, essentially a “tower of field extensions”, to implement in Plutus the “Optimal Ate” pairing for the BN128 Elliptic Curve. (We chose BN128 because it works well with existing open-source tooling that we plan to bring to Cardano.) [Six weeks]
- Perform optimization analysis on the algorithm written in Plutus and implement the necessary optimizations, porting (parts of) the code to Plutarch if necessary. (We indeed anticipate the necessity of using Plutarch due to PlutusTx’s added overhead due to “strictness enforcement” in Haskell code.) Hydra nodes should be able to run UPLC code generated from the aforementioned optimized code. [Six weeks]
- Integration of off-chain and on-chain tooling. ZK-proofs generated off-chain (leveraging existing open-source tooling) will be capable of being verified by the smart contracts running on Hydra. Roll-up to the Cardano mainnet will transfer the result of ZK-proof verification. [Eight weeks]
- Documentation and sample use-cases. [Four weeks]
[CAPABILITY/ FEASIBILITY] Please describe the deliverables, outputs and intended outcomes of each milestone.
Deliverable of milestone 1. - The code for elliptic code pairing must pass property based testing corresponding to its well known expected mathematical properties (e.g. “bilinearity”). The resulting validator (before compilation to UPLC) should “ACCEPT” valid proofs generated in the context of the BN128 elliptic curve.
Deliverable of milestone 2. - Should have generated experimental tables of code performance for various components of the “pairing” algorithm. UPLC code generated from optimized validator should be amenable to be run by Hydra nodes.
Deliverable of milestone 3. - Tooling must have been written allowing users to deploy an integrated solution where ZK-proofs generated off-chain are then verified on-chain by a smart contract deployed using the Hydra protocol.
Deliverable of milestone 4 . - Well written documentation and sample applications should have been incorporated into the project’s repository.
[RESOURCES & VALUE FOR MONEY] Please provide a detailed budget breakdown of the proposed work and resources.
[RESOURCES & VALUE FOR MONEY] How does the cost of the project represent value for money for the Cardano ecosystem?
Hourly rates are at or below typical software development standards. Development time based on our past experience as a team working on a ZKP related project.
[IMPORTANT NOTE] The Applicant agreed to Fund10 rules and also that data in the Submission Form and other data provided by the project team during the course of the project will be publicly available.