This protocol eliminates corporate espionage and corruption in high-value procurement by replacing trusted intermediaries with cryptographic guarantees. It enables sealed-bid auctions for $10M+ tenders entirely on-chain using:
- Commit-Reveal Cryptography β Bids remain secret until the reveal deadline
- Zero-Knowledge Proofs β Range validation without exposing bid amounts
- Identity Verification β Sybil-resistant, authorized-entity-only participation
Status: Research-grade. Deployed to Sepolia testnet. Mainnet deployment pending formal audit.
- Foundry (
forge,cast,anvil) - Rust toolchain (for ZK circuits)
git clone --recurse-submodules https://github.com/your-org/e-tendering.git
cd e-tendering
forge installforge build# Unit tests
forge test --match-path "test/unit/*"
# Integration tests
forge test --match-path "test/integration/*"
# Invariant (fuzz) tests
forge test --match-path "test/invariants/*"
# All tests
forge testThe protocol operates as a finite state machine ensuring tenders progress irreversibly through valid states:
βββββββββββ ββββββββ ββββββββββ ββββββββββββββ βββββββββββ ββββββββββββ
β CREATED β βββΈ β OPEN β βββΈ β REVEAL β βββΈ β EVALUATION β βββΈ β AWARDED β βββΈ β RESOLVED β
βββββββββββ ββββββββ ββββββββββ ββββββββββββββ βββββββββββ ββββββββββββ
β β β
βΌ βΌ βΌ
Commitments ZK Proofs + Disputes
+ Bonds Reveals + Finalize
π Full State Machine Specification β
e-tendering/
βββ src/
β βββ core/ # Tender.sol, TenderFactory.sol
β βββ crypto/ # ZK verifiers (Halo2), commitment schemes
β βββ identity/ # Identity verifiers (signature, ZK-nullifier)
β βββ strategies/ # Bid evaluation (ZK, LowestPrice, Weighted)
β βββ compliance/ # Regulatory logging module
β βββ interfaces/ # Contract interfaces
βββ test/
β βββ unit/ # Per-function tests
β βββ integration/ # Cross-contract scenarios
β βββ invariants/ # Stateful fuzzing (solvency, monotonicity)
βββ script/ # Deployment scripts
βββ circuits/ # Halo2 ZK circuits (Rust)
βββ docs/ # Specifications & security docs
At deployment, each Tender is configured with exactly one evaluation strategy:
| Strategy | Purpose | When to Use |
|---|---|---|
| ZKAuctionStrategy | ZK range proofs + cryptographic validation | Privacy-preserving, spam-resistant |
| LowestPriceStrategy | Lowest valid bid wins | Simple, transparent auctions |
| WeightedScoreStrategy | Multi-criteria (price, delivery, compliance) | Complex procurement |
π Full Strategy Documentation β
| Attack | Mitigation |
|---|---|
| Bid Leakage | EIP-712 typed commitments hide bid contents |
| Front-Running | Salted hashes prevent MEV copy-cat attacks |
| Retroactive Bidding | Immutable block.timestamp enforces deadlines |
| Sybil Attacks | Identity verifiers ensure 1-entity-1-bid |
| Invalid Bids | ZK range proofs reject out-of-range values |
The protocol supports two distinct identity verification strategies:
| Verifier | Type | Description |
|---|---|---|
| ZKNullifierVerifier | Public / Permissionless | Open to all. Uses Zero-Knowledge Nullifiers to enforce "One Person, One Bid" without revealing identity. Prevents spam while preserving anonymity. |
| SignatureVerifier | Permissioned | Restricted. Only addresses signed by a trusted off-chain Issuer (allowlist) can participate. No anonymity guarantees. |
| Risk | Assumption |
|---|---|
| L1 Downtime | Underlying chain remains live |
| Off-chain Collusion | Protocol ensures process integrity, not social integrity |
We employ a comprehensive testing strategy beyond unit tests:
| Type | Tool | Coverage |
|---|---|---|
| Unit Tests | Foundry | Per-function behavior |
| Integration Tests | Foundry | Cross-contract flows |
| Stateless Fuzzing | forge fuzz |
Input edge cases |
| Stateful Fuzzing | forge invariant |
System invariants |
- Solvency β Contract ETH balance β₯ sum of active deposits
- State Monotonicity β Tender state never reverts to a previous state
- Commitment Integrity β Revealed values always match commitments
The protocol uses Halo2 (KZG polynomial commitments) for zero-knowledge range proofs:
| Property | Value |
|---|---|
| Proof System | Halo2 with KZG |
| Setup | Universal SRS (Powers of Tau) |
| Proof Size | ~192 bytes |
| Verification Gas | ~20,500 |
| Contract | Description |
|---|---|
Halo2Verifier.sol |
Core pairing-based verification |
ZKRangeVerifier.sol |
Public input formatting adapter |
ZKAuctionStrategy.sol |
Verification + bid scoring |
π Full ZK Integration Guide β
The protocol supports cross-chain bid submission via Chainlink CCIP:
| Chain | Contract | Address |
|---|---|---|
| Sepolia | CCIPBidReceiver | 0x645921f2...4839 |
| Fuji | CCIPBidSender | 0x2a026858...b7fc |
Features:
- Submit bids from any CCIP-supported chain
- Automatic bidder ID computation for cross-chain identity
- Replay protection via message ID tracking
- Access-controlled sender authorization
π Full Cross-Chain Guide β
| Contract | Address |
|---|---|
| Halo2Verifier | 0x03Fa...57BD |
| ZKRangeVerifier | 0xd1aD...0d8a |
| ZKAuctionStrategy | 0xFf91...b969 |
π Full Deployment History β
| Document | Description |
|---|---|
| State Machine | Tender lifecycle states & transitions |
| Threat Model | Security analysis & attack vectors |
| Trust Assumptions | Protocol dependencies & guarantees |
| ZK Integration | Halo2 proof system details |
| Deployments | Contract addresses & gas costs |
This is research-grade software. While rigorously tested with fuzzing and invariant proofs, it:
- Relies on the integrity of the Identity Oracle
- Assumes L1 consensus liveness
- Has not undergone formal security audit
- Is not recommended for production use without further verification
This project is licensed under the MIT License β see LICENSE for details.
Built with Foundry Β· Verified on Ethereum Sepolia