The goal is to allow users to participate in auctions while keeping their bid amounts private during the bidding phase. Only the winning bid is revealed at the end, ensuring fairness without sacrificing user privacy.
Workflow
The project is not yet functional, therefore unfortunately we cannot test anything yet.
The main contract is a Cairo Starknet smart contract. I was planning to deploy it to the Starknet Sepolia testnet. I was planning to make use of Starknet Composability & Components features to integrate existing logic to my contract like ownable related logic. I also was planning to deploy a NFT contract as the reward of the auction.
Concerning the proof, I wanted to deploy my very own groth16 proof verifier contract on Starknet Sepolia using Garada, which would verify zk-SNARK proofs. In order to generate proofs, I was going to build a circom circuit (program to prove) and use snarkjs to set up the trusted setup needed for zk-SNARKS as well as to generate the proof that I would then send for verification to the verifier contract mentioned right before. And this proof generation would happen in the frontend following the user bid input, before sending it to my Auction contract, which would itself call my groth16 proof verifier contract before executing its own logic.
A Nextjs frontend for the users to participate to the auction by making their bids. The frontend is incomplete because I was first focusing on the smart contract & proof generation/verification parts before working on the frontend, which I did not end up having time, as I had too many issues with the proof generation & verification.
My main difficulties were related to the zk-SNARKs generation & verification: