EthVaultPQ

A quantum safe vesting vault that allows time based payments. Ideal for Vesting and Unlocking.

EthVaultPQ

Created At

ETHOnline 2025

Winner of

ETHGlobal

ETHGlobal - 🏆 ETHOnline 2025 Finalist

Project Description

This project implement a quantum safe vesting vault using dilithium keys to allow you to place an amount of money into a vault and distribute it to its recipients over time. It builds a time locked contract that distributes TO a quantum safe recipient. We implement a general purpose post-quantum MetaMask plugin (snap) that can receive and sent to normal addresses but must have a Dilithium signature to send. The Dilithium signature and a ZK proof are composed off chain (due to gas limits) and the ZK proof is performed on chain. Although the Dilithium infrastructure is not onchain it can be widely distributed by using Oracles to find available helpers. This is a way to implement ppst-quantum safety using current technology for long lived contracts such as vesting which might overlap Q-Day (the day on which quantum computers break ECC).

How it's Made

EthVaultPQ combines ERC-4337 account abstraction with ERC-4626 tokenized vaults and post-quantum cryptography, built on Solidity 0.8.28 using Foundry for the smart contract layer and a React/TypeScript dashboard with wagmi + viem for the frontend. The architecture flows from user → React dashboard → MetaMask signing → ERC-4337 bundler → EntryPoint contract → our PQWallet contract → PQValidator for signature verification, with OpenZeppelin providing battle-tested ERC-4626 vault implementations that we extended with linear vesting schedules using packed struct storage optimization (saving 50% on gas). We deployed on Base (Optimism stack) to keep costs reasonable since post-quantum signatures are large (Dilithium: 3.3KB signatures, 387k gas to verify vs ECDSA's 3k gas), and used CREATE2 in our factory pattern for counterfactual address generation. The particularly hacky part: our Dilithium verifier is a partial implementation—we built the full parameter framework and verification structure (~387k gas measured), but the actual cryptographic operations like SHAKE-128 expansion and NTT polynomial multiplication are simplified because implementing them fully in Solidity would cost 2-5M gas per verification, so the real production path is either ZK-SNARK wrappers (verify off-chain, prove on-chain for ~200k gas) or waiting for EVM precompiles via future EIPs—essentially, we proved the architecture works and is affordable on Base ($0.003/verification) while acknowledging the crypto layer needs optimization before production use. Partner technologies like OpenZeppelin saved months of development on vault math, Base reduced our gas costs 100x vs mainnet, and Foundry's gas reporting was crucial for measuring that our simplified Dilithium implementation uses comparable gas to complex DeFi operations, making post-quantum wallets practical today even without full cryptographic implementation. Metamask snaps and flask dev system.

background image mobile

Join the mailing list

Get the latest news and updates