Uniswap V2 like Confidential AMM

Hey everyone,

I’ve been working the past few weeks on a project I’d love people to test: a fully working Confidential AMM called CAMM.

It’s basically a Uniswap V2-style protocol, but running on Zama’s FHE and using the ERC-7984 confidential token standard. The logic is the same as Uniswap V2, with a few tweaks to preserve confidentiality (trades are slower due to CAMM being highly relying on decryption).
Every amount sent to or received from the pool stays encrypted. That means balances, swaps, liquidity… it’s all confidential !
Trading price is derived from “obfuscated reserves” and is randomely approximative, to not reveal the actual reserves value and to tacle the confidentiality leak caused by price impact.
When a division is needed, CAMM is using decryption, in a non information leaking form.
If you’re curious and wanna learn more on how it works, everything is explained in my CAMM repo:

I’ll also be presenting CAMM at this month’s dev contest!

I just updated it to fhevm 0.8.0. Since OpenZeppelin hasn’t updated their ERC-7984 contracts yet, I use a local fork that matches this PR.

There’s also a small web app to interact with the contracts:

Default pair comes with liquidity and deployed tokens have an airdrop function you can claim.
You’ll only need Metamask and some Sepolia ETH.
You can also deploy your own tokens and pairs via the “Launch” tab.

The contracts are documented, and I’d be happy to have feedbacks on bugs, improvements, or just impressions. The web app isn’t perfect, but it’s working for now.

Known issues :

  • swap fails when one of the two token balances is 0.

Hey there, 6yp,

This project looks really good!
Could you register to our developer program, link: https://guild.xyz/zama and submit your project there?
It will be much easier for us to support you going forward, plus there are monthly prizes for the top 5 winners :blush:.

Also if you manage to add a mini video of what you did that would be great!

Thanks !
I’m already registered in the dev program, and I’m currently working on the video.

Update : Project submitted to developper program’s Builder Track Submission - September

1 Like

Amazing thanks!!!