Requirements:
- Rust
- Foundry https://book.getfoundry.sh/getting-started/installation
forge install transmissions11/solmate
Setup (FHE_NODE):
- Get the forked fhe.rs library at
git clone https://github.com/shankars99/fhe.rs.git
- Spin up your own node
cargo run
- KEYS
- Create you own accounts
OR - Move your
fhe_private_key
to/keys
- Create you own accounts
- Run the front-end program
npm run dev
This is a warped privacy token that uses fully homomorphic encryption scheme (based on RING-LWE).
This project contains 2 parts:
- The Rust crypto engine
- The frontend javascript
- REMIX for the batching precompile on moonbase alpha
The protocol contains 3 main parts:
- Creating an account and registering yourself with the network, this makes your fhe_public_key public so that others can send you tokens.
- Now you can send and receive transactions that you collect to prove you own the amount of tokens that you claim you have
- Transactions here are quite different from what you'd expect on an EVM network. It's similar to how bitcoin works with a sender and receiver tx, one pointing to the address you want to send the tokens to and the other pointing to your own fhe account.
- The transactions are all encrypted under the receiver and sender public keys. So now no one can trace or figure out your Tx as they're all encrypted.
- When you want to withdraw tokens you end up creating a transaction that exposes your fhe_sk for a subset of the tokens. The network verifies it and sends it back.