Silent Bid is a Sealed-Bid Auction platform built using Rust and Plonky3. The project aims to facilitate secure and private auctions by leveraging zero-knowledge proofs (ZKPs) to determine the highest bidder without revealing individual bid amounts. This serves as a reference model for developers interested in building dApps using Plonky3 and ZKPs.
Bidders submit encrypted bids to a smart contract, which only the auction owner can decrypt using their secret key. At the conclusion of the auction, the owner publishes the winner. ZKPs ensure that the auction owner reads all bids and selects the highest one without revealing their private key or any bid details.
Key components of the project include:
- Proving Service: Powered by Plonky3, this service generates a zero-knowledge proof from the execution trace of a program that decrypts bids and computes the winner, while preserving the confidentiality of individual bid amounts and the owner's private key.
- Smart Contract: The smart contract verifies the ZK proof and manages the entire auction lifecycle, including setup, bidding, and settlement.
- Smart Contract: Solidity
- Circuit: Rust, Plonky3
- Encryption scheme: RSA, Rolling Hash
The core logic of SilentBid operates on-chain, while off-chain processes handle the winner calculation and proof generation. The auction process follows four main phases:
- Initial Setup: The auction owner creates the auction, sets the required deposit amount, transfers assets to the smart contract, and defines the auction's start and end times.
- Bidding Phase: Bidders submit their bids to the smart contract by depositing the required amount.
- Opening Phase: After the bidding window closes, the auction owner calculates the winner and generates a zero-knowledge proof.
- Verification Phase: The owner submits the winner and the proof to the smart contract for verification, concluding the auction.
Sequence diagrams for each module are shown below:
- Initial Setup:
- Bidding Phase:
- Opening Phase:
- Verification Phase:
Here is the documentation of how we implemented the Proving Service.