Study how sealed-bid batch auctions can be implemented on-chain with encrypted orders
Learn how fully homomorphic encryption lets a smart contract compute on hidden values
Explore MEV-resistant exchange design as a reference for building similar systems
| vihaan1016/concord | 0xkinno/astraea | 0xkinno/halcyon | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | hard | hard | hard |
| Complexity | 5/5 | 4/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Built on Zama's FHEVM and depends on their relayer and KMS infrastructure for encrypted computation.
Concord is an experimental decentralized exchange, a place to trade tokens without a middleman, built to solve a specific problem: on most exchanges built on public blockchains, anyone can see a trade order sitting and waiting before it executes, and some traders exploit that by jumping in ahead of it or sandwiching it to profit at the original trader's expense. Concord tries to close that gap by keeping every order encrypted the whole time it sits in a queue, so no one, not even the people running the system, can read it before it is matched. Instead of matching trades one at a time as they arrive, Concord collects encrypted buy and sell orders for a fixed window of time, then works out a single fair price that clears as much of that batch as possible, all while the orders stay encrypted using a technique called fully homomorphic encryption, which lets a computer do math on encrypted numbers without ever decrypting them. Only the winning price and the total amount traded at that price become public. No individual order, and whether any specific order was filled, is ever revealed on the blockchain. The system moves through five stages for each batch: it opens to accept new sealed orders, closes once the time window ends, works through the price calculation across many small transactions to avoid overloading the network, publishes the final clearing price and volume, and finally settles every order, transferring tokens for orders that filled and doing nothing for the ones that did not, in a way that looks the same from the outside either way. A trusted helper program called a keeper drives this process along, and anyone can check its work against the public blockchain records. A trader can only decrypt their own individual order or trade result, never anyone else's. This project was built for a developer program run by Zama, the company behind the encryption technology it depends on, and is intended as a demonstration of what a trading system with this level of privacy could look like. The full README is longer than what was shown.
An experimental decentralized exchange that keeps trade orders fully encrypted until a fair batch price is calculated, to stop front-running.
Mainly TypeScript. The stack also includes TypeScript, Solidity, FHEVM.
Setup difficulty is rated hard, with roughly 1day+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.