Inspiration

I didn't like how ETH balances are public. Sure there are ways to build around it, but I figured using a Homomorphic Encryption Scheme would allow users to do it easier with the additional guarantee that absolutely no one knows your token balance except for you.

What it does

It allows you to send tokens to other users with a FHE_TX that allows for a trustless intermediate who just collects these Txs. This would be similar to how bitcoin works with scattered Txs that only execute when a user "claims" it. Expect in this case it's automatic and doesn't require a 3rd party to execute the transaction.

How we built it

I initially though of using Pailler Encryption Scheme (a partially homomorphic scheme) but then found https://github.com/tlepoint/fhe.rs which is like better. I used that with ethers-rs and foundry to develop the application.

Challenges we ran into

The base implementation of fhe.rs didn't allow for serialization of keys, derived keys, etc. I had to implement those before continuing with the project. Moreover the documentation for ethers-rs isn't complete and figuring that out with AI was a (not a) treat.

Accomplishments that we're proud of

Combing through ethers-rs Contributing to fhe.rs Creating this application

What we learned

Getting better at Rust Some FHE cryptography

What's next for FHE-Tokens

Adding additional features to the clients, maybe add in data too as the fhe scheme can take in any kind of data

Built With

  • ethers-rs
  • fhe.rs
  • foundry
  • geth
  • rust
Share this project:

Updates