Keyless, Secure Wallet via Email & ZK Proofs
The Email2Ether Wallet Connector is an innovative solution designed for the Ethereum ecosystem, offering a seamless and secure way for users to connect to their wallets using just their email addresses. Developed during a vibrant hackathon at an Ethereum conference, this project introduces a groundbreaking approach to wallet authentication and ownership management, eliminating the need for users to remember or manage private keys.
- Email-Based Authentication: Users can easily authenticate and access their wallet using their email address, simplifying the login process.
- Temporary Key Pair Generation: For each session, a temporary key pair is generated, corresponding to a session-specific wallet. This enhances security by ensuring that each session is isolated and protected.
- DKIM Signature Verification: Utilizing zero-knowledge (zk) proofs and the verification of DKIM signatures in email headers, we ensure a secure and private authentication process.
- ERC-4337 Contract Wallet Integration: Ownership of the ERC-4337 contract wallet can be transferred to the temporary wallet address, streamlining the user experience without compromising on security.
- Cross-Chain Compatibility: The ERC-4337 smart contract wallet address corresponding to the email remains constant across all EVM-compatible chains, ensuring a unified wallet experience regardless of the blockchain network.
- No Need for Private Key Management: Users are relieved from the hassle of remembering and managing private keys, as each session generates a new, temporary wallet address and private key.
- Email Provider Support: For demonstration purposes, we currently support authentication via Gmail only. However, expanding support to include additional email providers is planned for future development and requires minimal effort.
- Expiration Time: Incorporating expiration times in the emails sent by users, alongside mechanisms like passkeys, to secure sessions on-chain within the designated expiration timeframe.
- Enterprise Paymaster: Enabling enterprise email domains to act as Paymasters, covering gas fees for their employees through verifiable zk proofs on the blockchain.
This section provides a comprehensive guide to setting up the Ethereum Email Wallet Connector on your local machine for development and testing purposes.
Before you begin, ensure you have the following tools and accounts set up:
- Node.js: A JavaScript runtime built on Chrome's V8 JavaScript engine.
- Pnpm or any other package manager like npm: For managing project dependencies.
- Bun: Utilized for enhanced frontend development experience due to its speed.
- Foundry: A smart contract development toolkit.
- Circom: For developing and compiling zero-knowledge circuits.
- An email service with DKIM signature support: Currently, for demonstration purposes, Gmail is the supported email service.
Start by cloning the project repository:
git clone https://github.com/a00012025/email2ether.git
-
Install Smart Contract Dependencies:
Navigate to the
contracts
directory and install the necessary dependencies:cd contracts && pnpm install
-
Configure Environment Variables:
Set up your environment variables for deployment:
export PRIVATE_KEY=<YOUR_PRIVATE_KEY> export RPC_URL=<RPC_URL>
-
Deploy the Email Account Factory:
Deploy your smart contract with the provided script:
./script/deploy-contract.sh # Verify the contract if you want # Caution: You should modify the variables inside the shell script to the deployment address before running the script ./script/verify-contract.sh
-
Install Circom Dependencies:
Move to the
circuits
directory and install dependencies: developmentcd ../circuits && pnpm install
-
Build the Circuits:
Compile your zero-knowledge circuits:
pnpm run build
-
Trusted Setup:
Perform the trusted setup for the circuits:
pnpm run trusted-setup
-
Generate and Verify Proofs (Optional):
Test proof generation and verification:
pnpm run gen-proof && pnpm run verify-proof
-
Install Backend Dependencies:
Prepare your backend environment:
cd ../backend && pnpm install # Establish a soft link to your rapidsnark binary ls -s <YOUR_RAPIDSNARK_BINARY> ./rapidsnark
-
Update Smart Contract Address:
In
./src/wallet.ts
, update the address with the one from your deployed Email Account Factory. -
Launch the Backend Service:
Begin listening for requests:
pnpm run listen
-
Prepare Frontend Environment:
Install frontend dependencies:
cd ../frontend && bun install
-
Start the Development Server:
Launch your frontend application:
bun run dev
Our project is brought to life by a dedicated team of professionals. Get to know the individuals behind this innovative project:
Harry Chen is a Full Stack Developer with a strong focus on integrating zero-knowledge proofs to enhance the project's functionality. As the Lead Developer, his extensive knowledge ensures the project's workflow is seamless and efficient, underpinning the technical architecture with advanced solutions. Profile
Kuan is a key developer focusing on smart contract development for decentralized applications, complementing his expertise with frontend development to enhance user interfaces. Profile
Sterling Cobb leverages his sharp design instincts and creativity to elevate the project's aesthetics and user experience. His commitment to intuitive design and user-centric development ensures the application is not only visually captivating but also offers an unparalleled user experience. Profile
MIT License - Email2Ether