If you want to use this code, please cite our article describing them:
Conference paper IEEE style
K. Košťál, R. Bitarovský and L. Mastilak, "Hopinzero: zkSNARK-Verified Privacy for On-Chain Options with Pooled Liquidity," 2026 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Brisbane, Australia, 2026, pp. 1-9.
On-chain options protocols enable transparent, composable derivatives but expose commercially sensitive parameters and strategies due to public transaction data. This project presents Hopinzero, a privacy-preserving options protocol for EVM chains where traders keep strike prices and option terms private while still enabling verifiable settlement. Hopinzero combines a dual-asset pooled-liquidity smart contract with zkSNARK circuits that (i) prove the correctness of the paid premium under a bounded pricing policy and (ii) prove ownership and validity at exercise time without revealing private terms on-chain. We describe the protocol, threat model, and security considerations, and report on a proof-of-concept implementation using Circom and Groth16 with on-chain verification. An evaluation based on end-to-end functional tests and static analysis demonstrates feasibility; we discuss remaining gaps toward production readiness, including circuit auditing, oracle hardening, and cost optimization required for deployment at scale.
Before you begin, you need to install the following tools:
- Node (>= v20.18.3)
- Yarn (v1 or v2+)
- Git
yarn install
yarn test
cd zk
bash setup.sh
Process of successful run of this script can be found in file zkSetupBash.txt in assest folder of this project structure.
To get started with Scaffold-ETH 2, follow the steps below:
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network that runs on your local machine and can be used for testing and development. Learn how to customize your network configuration.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. You can find more information about how to customize your contract and deployment script in our documentation.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000. You can interact with your smart contract using the Debug Contracts page. You can tweak the app config in packages/nextjs/scaffold.config.ts.