git404hub

what is confidential-buybacks fr?

bleu/confidential-buybacks — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 5/5Setup · hard

tl;dr

A proof-of-concept smart contract system for encrypted, MEV-resistant token buybacks using Zama's FHE blockchain technology.

vibe map

mindmap
  root((confidential buybacks))
    What it does
      Encrypted buybacks
      Hides offers and budget
      Public disclosure later
    Tech stack
      Solidity
      Hardhat
      Next.js
      Zama FHEVM
    Use cases
      Prevent front running
      Confidential settlement
      Testnet prototyping
    Audience
      Smart contract developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Prototype a token buyback mechanism that hides order size and price from front-running bots.

VIBE 2

Study a working example of encrypted on-chain matching logic built with FHE smart contracts.

VIBE 3

Test confidential token transfers and settlement on the Sepolia test network.

VIBE 4

Learn how to structure a Hardhat and Next.js project around Zama's FHEVM tooling.

what's the stack?

TypeScriptSolidityHardhatNext.jswagmiviem

how it stacks up fr

bleu/confidential-buybacks0xradioac7iv/tempfs52191314/web-agent-proxy-sdk
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardmoderatemoderate
Complexity5/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · hard time til it works · 1h+

Requires Node 20+, Hardhat, and familiarity with Zama's FHEVM tooling and Sepolia testnet deployment.

in plain english

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.

prompts (copy fr)

prompt 1
Explain how the FHE.min running-budget pattern in BuybackVault.sol matches offers without revealing amounts.
prompt 2
Walk me through deploying and testing the contracts in this repo's Hardhat project on Sepolia.
prompt 3
Describe what information stays private versus public in this confidential buyback system.
prompt 4
Help me connect the Next.js frontend in this repo to a locally deployed BuybackVault contract using wagmi.

Frequently asked questions

what is confidential-buybacks fr?

A proof-of-concept smart contract system for encrypted, MEV-resistant token buybacks using Zama's FHE blockchain technology.

What language is confidential-buybacks written in?

Mainly TypeScript. The stack also includes TypeScript, Solidity, Hardhat.

How hard is confidential-buybacks to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is confidential-buybacks for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.