Decentralized. Deterministic. Uncorruptible.
Public procurement handles huge amounts of money, yet traditional e-tendering still depends on trusting people and editable databases. TenderChain replaces that trust with cryptography and code.
Bid leakage
Sealed bids can be opened early and leaked to a favoured vendor.
Human bias
Officials decide the winner manually, which opens the door to favouritism.
Editable records
Database entries and documents can be silently changed after submission.
No public audit
Bidders cannot independently verify how or why a winner was chosen.
Commit-reveal bidding
Only a cryptographic hash is published until the deadline. Nobody, including the officer, can see a price early.
Smart contract decides
The lowest revealed price wins automatically. Ties go to the earliest reveal. No human picks.
Immutable storage
Bids live on Ethereum; tender documents live on IPFS, addressed by their content hash.
Fully auditable
Every action emits a blockchain event anyone can verify on Etherscan.
Follow one tender from publication to award. Colour shows where each step runs: in the browser, on our server and database, on IPFS, or on the Ethereum blockchain.
Stage 1 · Publish
Procurement Officer
Title, category, description, deadlines, minimum deposit
Tender document pinned on Pinata, returns a content ID (CID)
Title, CID, commit & reveal deadlines, deposit written on-chain
Tender details indexed in MongoDB for fast search
Stage 2 · Sealed bidding
Bidder (before commit deadline)
Filter by category; view the tender PDF from IPFS
Browser makes a random 32-byte salt and computes keccak256(tenderId, address, price, salt)
Only the hash + ETH deposit is sent. The price stays secret.
Salt encrypted with AES-256-GCM on the server, emailed, and downloadable as JSON
Stage 3 · Reveal
Bidder (after commit deadline)
Contract moves the tender from OPEN to REVEAL; no new bids accepted
Bidder discloses the real price and the salt
Contract recomputes the hash. Any change to price or salt → "Hash mismatch", rejected
Stage 4 · Award & settle
Smart contract (anyone can trigger)
Lowest revealed price wins; tie → earliest reveal. Tender CLOSED.
Every bidder who revealed honestly gets the deposit back
Bidders who committed but never revealed lose their deposit
Winner, price and full audit trail visible to everyone
Like putting your price in a locked box and showing everyone the box first. Later you open it. Nobody can peek early, and you cannot swap what is inside.
Phase A · Commit (price hidden)
e.g. 4.2 ETH (secret)
random 32 bytes (secret)
0x9f3c…e1 (public)
Only the hash and the deposit go on-chain. Including the bidder's address means nobody can copy someone else's hash.
Phase B · Reveal (verified on-chain)
Bid accepted and counted
Rejected: price was changed
Hiding
A hash reveals nothing about the price, so competitors and officers learn nothing during bidding.
Binding
It is computationally infeasible to find a different price with the same hash, so bids cannot be changed.
Accountable
The ETH deposit is lost if a bidder refuses to reveal, which stops fake or spam bids.
Every tender is a state machine enforced by the smart contract. Transitions are driven by block timestamps, not by a person clicking a button.
Bidders commit hashes + deposits
Bidders reveal price + salt
Winner fixed on-chain; refunds & slashing
Officer can cancel an OPEN or REVEAL tender; every bidder can then reclaim the full deposit.
Extend the commit deadline (max 7 days, OPEN only), or fast-forward phases for demos. The officer can never see or change a bid.
Contract owner can pause commits and reveals if a problem is found (OpenZeppelin Pausable).
Refunds and slashing are protected by OpenZeppelin ReentrancyGuard and update state before sending ETH.
STRICT MULTI-LAYERED STACK
User / Browser
Node.js Backend
Infrastructure
SEQUENCE LOGIC ENSURING ZERO FRONT-RUNNING
Initiator: Officer
Initiator: Bidder
Initiator: Bidder
Initiator: Smart Contract
STRICT ROLE-BASED ACCESS CONTROL
System governors responsible for officer approval.
Professionals who publish and manage selection cycles.
Vendors submitting encrypted salts and ETH.
Signing in needs all three: your email, your password, and a signature from the exact MetaMask wallet linked to your account. Sign-In with Ethereum (EIP-4361) signatures are free and send no transaction.
Random, HMAC-signed, expires in 5 minutes
Standard EIP-4361 message bound to this website's domain
Signed JWT (NextAuth); redirected to role dashboard
Step 04 · Checks performed on the server
Password · bcrypt hash comparison
Incorrect email or password
Domain · Message must name this exact website
Blocks phishing sites reusing signatures
Nonce · Valid HMAC, unexpired, never used before
Blocks replaying an old signature
Signature · ethers.verifyMessage recovers the signer
Proves ownership of the private key
Wallet link · Signer must equal the account's registered wallet
Wrong MetaMask account is refused
If any single check fails, login is refused with a clear reason. A stolen password alone is useless without the wallet, and a wallet alone is useless without the password.
Frontend
Backend
Blockchain
Data & Storage
Security guarantees
Commit-reveal hides every price until the deadline
Winner chosen by code: lowest price, tie → earliest reveal
Deposits punish fake bids (slashing) and refund honest ones
Salts encrypted with AES-256-GCM, plus email & file backup
Login = password + wallet signature (EIP-4361, one-time nonce)
Role-based access: Admin approves Officers; Officers cannot bid
Reentrancy guard and emergency pause on the contract
Tender documents tamper-proof on IPFS (content-addressed)
Lead Developer & Architect