bleu/confidential-buybacks — explained in plain English
Analysis updated 2026-05-18
Prototype a token buyback mechanism that hides order size and price from front-running bots.
Study a working example of encrypted on-chain matching logic built with FHE smart contracts.
Test confidential token transfers and settlement on the Sepolia test network.
Learn how to structure a Hardhat and Next.js project around Zama's FHEVM tooling.
| bleu/confidential-buybacks | 0xradioac7iv/tempfs | 52191314/web-agent-proxy-sdk | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 5/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Node 20+, Hardhat, and familiarity with Zama's FHEVM tooling and Sepolia testnet deployment.
ConfidentialBuybacks is a proof-of-concept blockchain project that lets a crypto project's treasury buy back its own token from holders without revealing how much it is buying, at what price, or how much budget it has left while the purchase window is open. It is built on Zama's FHEVM, a blockchain technology that lets smart contracts do math on encrypted numbers without ever decrypting them. The project explains that normal on-chain buybacks are a problem because every order, budget, and timing detail is visible the moment the program starts, letting automated bots trade ahead of the treasury and letting the market push prices against it. This project describes itself as proof-of-concept and MVP quality, not audited and not meant for production use, and it only runs on the Sepolia test network so far. The system works like a private matching pool. A treasury deposits an encrypted budget into a smart contract called the BuybackVault. Sellers submit encrypted offers stating how much of the token they want to sell and the lowest price they will accept. The contract matches offers against the remaining encrypted budget on a first-come, first-served basis, without anyone, including other sellers, being able to see individual offers or how much budget remains. After a settlement window closes, anyone can trigger settlement, and after a short delay anyone can also trigger a public reveal of that window's total activity, so the system is private while running but becomes accountable afterward. The repository includes two parts, a set of smart contracts written for the Hardhat development framework with 21 tests, and a Next.js frontend that connects to the contracts using the wagmi and viem libraries plus Zama's relayer software. The contracts are already deployed to the Sepolia test network for demonstration purposes, including a mock version of a stablecoin used for payment. The README is explicit about several known limitations, including that only the amounts and price floors are hidden while the fact that someone interacted with the contract is still visible on-chain, and that the treasury's solvency is not checked automatically. Setting it up locally requires Node version 20 or newer.
A proof-of-concept smart contract system for encrypted, MEV-resistant token buybacks using Zama's FHE blockchain technology.
Mainly TypeScript. The stack also includes TypeScript, Solidity, Hardhat.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.