fhenix-confidential-auction

Installation
SKILL.md

Fhenix Confidential Auction

Overview

A fully confidential auction: bids stay encrypted during bidding (no one can see or react to the current high bid), and the winner is revealed only after close via the decrypt-with-proof flow. Demonstrates encrypted inputs, encrypted comparison/selection, ACL, and on-chain decryption together.

Pattern

  • State: euint64 highestBid, eaddress highestBidder (both encrypted).
  • Bid: encrypt, compare with FHE.gt, update with FHE.max + branchless FHE.select, then FHE.allowThis both new handles.
  • Close: auctioneer calls FHE.allowPublic(highestBid) and FHE.allowPublic(highestBidder).
  • Reveal: client decryptForTx(...).withoutPermit() each handle off-chain → submit to revealWinner which FHE.publishDecryptResults both.

Reference contract

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.19 <0.9.0;
import "@fhenixprotocol/cofhe-contracts/FHE.sol";
Installs
1
First Seen
Jun 22, 2026
fhenix-confidential-auction — nickthelegend/fhenix-skills