This project combines two complementary privacy technologies:
- Stealth Addresses: We can generate virtually unlimited addresses where users can receive funds.
- We do not need the collaboration of the user to generate a new address, we can derive as much as we want from a single stealth address published on ENS.
- They provide a convenient way to receive funds offering privacy to the sender.
- Zero Knowledge Proofs: We can prove to a smart contract pool that we own a specific address without revealing our identity.
- They allow us to combine the funds received from a stealth address into a single address.
- Hence, they provide a private way to receive funds.
The technologies used in this project are:
- FluidKey, a tool to generate stealth addresses that received a prize in the EthRome Hackathon 2023. We use their
@fluidkey/stealth-account-kit
to generate and manage stealth addresses. - zkBob, a tool to manage zk-SNARK proofs of deposits on privacy pools, very impressive and neeeded evolution of privacy wallets within Ethereum. We use their
zkbob-client-js
to generate and manage zkAccounts.
Clone the repository and install dependencies:
git clone https://github.com/sembrestels/zkStealth.git
cd zkStealth
bun install
bun dev
You can also build the app in production mode:
bun run build
- Enter in http://localhost:3000 and connect your wallet.
- Insert a pin of 4 digits. If it is the same you used at the fluidKey app, the addresses will be generated.
- Sign the message popup to login to fluidkey.
- Sign the message popup to login to zkBob.
- You will see the first 30 stealth addresses generated from fluidKey. You can generate as much as you want using the "Load more" button.
- Send ETH to any of the stealth addresses generated (only on Optimism for now). You should see the balance updated in fluidKey.
- If you update the page you will see the balance updated in the table as well. A new button will appear to send the ETH to the zkBob address.
- Click on "Send {amount} ETH to zkBob" and accept the Metamask transaction to deploy a 1-of-1 Safe Multisig in this address.
NOTE: Ideally this should be done using a relayer, but for this proof-of-concept we are doing it directly.
- Once the first transaction is confirmed, you will have to accept a second transaction in order to send ETH to the multisig owner.
NOTE: Again, this should be done using a relayer, but for this proof-of-concept we using a workaround.
- After the second transaction is confirmed, the UI will perform a third transaction behind the scenes to send ETH to the zkBob account.
- You should be able to see now your balance updated in the zkBob app and in the table.