project screenshot 1
project screenshot 2
project screenshot 3

OmnichainFHEAuction

Using fully-homomorphic encryption on Fhenix to implement second-price sealed bid auctions, and using LayerZero to allow bids from any chain, unifying liquidity: a global secret auction across all chains.

OmnichainFHEAuction

Created At

ETHGlobal San Francisco

Project Description

Auction creator creates an auction contract on Fhenix: The auction creator sets an auction start / end date, minimum bid, and code to run when the auction is won (e.g. automatically send an NFT). This code can be run cross-chain using LayerZero. User visits our frontend, they want to bid on X Chain We use Fhenix’s FHE frontend library to encrypt their bid. Encrypted bid is sent to our bid submission smart contract on X Chain. We also ask the user to approve the bid submission smart contract as a spender for UINT256_MAX We use LayerZero to send the encrypted bid to our auction smart contract on Fhenix. The auction contract stores the encrypted bit and the chain from which the bid originated. Since it’s difficult to install on LayerZero on new chains, we’re actually sending via Sepolia (the base cain for the Fhenix L2) At the end of the auction period, the contract uses FHE to compare all bids and determine which bid is the highest We use LayerZero to send a message back to the chain from which the bid originated and transfer the assets from the winning bidder. If the transfer is unsuccessful, LayerZero can send message back and Fhenix contract can move on to next highest bidder

How it's Made

Frontend which can grab data from Fhenix to show auction status and can send data to X Chain to submit bids Figure out how encrypt data with the Fhenix JS SDK and send it as arbitrary bytes to another smart contract

Auction smart contract on Fhenix Figure out how to compare different encrypted values on Fhenix https://github.com/FhenixProtocol/blind-auction-example

Bid submission contract on any L1 we want to support Figure out how to accept encrypted bytes

LayerZero infrastructure to send data to and from other L1s and Fhenix Figure out how to send data between chains

background image mobile

Join the mailing list

Get the latest news and updates