Buybacks are everywhere right now: CoW, Hyperliquid, Lighter, Jupiter, all using protocol revenue to buy back their tokens. But on-chain, they would leak everything: the budget, the schedule, and every fill are all public. That lets the market front-run the treasury and time exits against it, so the protocol overpays for its own token. TradFi handled this with dark pools; we wanted to see what one looks like on FHEVM.
What it is
ConfidentialBuybacks is a buyback dark pool. The treasury buys directly from holders in sealed epochs, with the budget, offers, and fills all encrypted on-chain. Price stays public, everything else is confidential.
How it works
The matching runs entirely on encrypted data, with no decryption at any point during execution. An encrypted budget draws down first come first served: each offer fills against the remaining budget, and once it’s exhausted, later offers silently fill zero.
Transparency is handled after the fact. 5 minutes after an epoch closes, anyone can trigger public disclosure of the epoch total: the KMS decrypts it, the contract verifies the signatures on-chain, and the plaintext is written to storage.
Live demo
Everything is live on Sepolia. (removed links to be able to post it)
-
Code: Github @bleu
-
Demo: confidential-buybacks.vercel.app
-
We also posted a thread on X (@bleubuilders) and appreciate any amplification;
We’re excited to keep building on Zama, the goal is to grow it from PoC into a real product.