DocumentationHow sealed bidding works

Overview02

How sealed bidding works

Arc does not offer private execution yet (Arc Privacy Sector is on its roadmap), so all on-chain data is public. Hedgora therefore keeps prices secret with a commit–reveal scheme.

1 · Commit

Before the submission deadline a bidder sends only a 32-byte commitment. It is computed in the browser and is the same in the app and in the contract:

commitment = keccak256(abi.encode(
    tenderId,      // uint256
    bidder,        // address — msg.sender, so a copied hash cannot be reused
    amount,        // uint256, USDC with 6 decimals (7,500 USDC = 7_500_000_000)
    salt,          // bytes32, random (crypto.getRandomValues)
    keccak256(docKey)  // binds the encrypted proposal to the price
))

Without the random salt the hash cannot be reversed, so the price cannot be read from the chain. Because the bidder's address is inside the hash, copying someone else's commitment does not work: it fails at reveal.

2 · Reveal

During the reveal window the bidder calls revealBid(amount, salt, docKey). The contract recomputes the hash and rejects the reveal if any value differs from what was committed. The published docKey lets the buyer decrypt the proposal.

3 · Award and proof

After the reveal window the buyer may award only a bidder who revealed. Because amount, salt and key are now public, anyone can recompute each commitment and check it was fixed before the deadline.

Trade-off

A bidder can choose not to reveal. That bid is excluded, and if the tender requires a bid bond, the bond goes to the Hedgora treasury — never to the buyer, so a buyer gains nothing when bidders miss the reveal window. See Revealing & bonds.

Hedgora documentation · Arc Testnet