Large Computations Market based on zero-knowledge proofs. The core algorithm is based on Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (SNARKs) generations and verification in EVM based smart contracts.
Zero-Knowledge proofs are suitable for large computation problems, because we can quickly and on-chain verify wheter a given solution is correct or wrong. It could also give more flexibility to the Problem Solver and protect him from front-running.
- Solution Seeker X wants to find the answer of Large Computation Problem.
- X generates a verifier contract and deploys it
- The verifier contract is funded by X with some amount that will be used for potential reward
- The Problem desciption is posted on ZkComputations UI app
- Problem Solver Y tries to solve the big computation problem
- If Y finds the solution then Y generates the proof off-chain using zokrates
- Y send transaction to Verifier Contract containing the proof and withdraws half of the amount
- Y is insentivized to reveal the actual solution to X (via email or on-chain) in order to receive the rest of the reward
- X can verify the actual solution and then send the extraReward to Y, otherwise his rating goes down and money are locked forever
- If X and Y finish the flow end to end this constitutes a Nash equilibrium,
curl -LSfs get.zokrat.es | sh
# Set export path
export PATH=$PATH:/Users/tima_t/.zokrates/bin
cd zokrates-contracts/prime-numbers
# compile
zokrates compile -i primes.zok
# perform the setup phase
zokrates setup
# export a solidity verifier
zokrates export-verifier
# execute the program
zokrates compute-witness -a 1087
# generate a proof of computation
zokrates generate-proof
# or verify natively
zokrates verify
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.