stealth-wallet

A wallet that allows users to have one-time addresses while maintaining a single private key

stealth-wallet

Created At

ETHGlobal New Delhi

Project Description

I developed a wallet that utilizes stealth addresses on the Ethereum network, inspired by Monero's privacy features. This wallet generates unique, one-time addresses for each transaction, ensuring that users' identities and transaction details remain confidential. It aims to provide a more secure and private way to transact on Ethereum, allowing users to maintain their financial privacy while engaging with the blockchain.

How it's Made

I took the inspiration from the UTXO-model on Monero. I used the secp256k1 curve for my keypairs. I get a random bytes value to be my master private spend key, the only private key we'll have to maintain. The master private view key is generated by hashing the spend key (mod n). Their respective public keys are concatenated together to form the meta-address. The meta-address is given to the sender who generates a random value, ecMultiplies it with the public view key (first half of the meta-address), and basically follows the same math Monero follows after that (will explain it further in the presentation). I'm following the ERC-5564 standard. The language I chose is JavaScript so that I don't have to create a separate variable for every time I type-cast the values lol. The front-end is in React. The packages I'm using for encryption, keypair-gen, wallet logic and hashing are ethereum-cryptography, ethers and crypto-js. The entire project runs client-side. There is a watcher which listens to event logs from the Announcer contract specified in the ERC standard. It generates the stealth address using the ephemeral key in a log and the user's private key, checks if the generated address has funds, if yes, use that address as the current address and transfer funds from the old address to the new one.

background image mobile

Join the mailing list

Get the latest news and updates