ZK-AfterLife
ZK-powered private crypto inheritance system using Aztec Network with ZKPDF will verification
Problem Statement
ZK-AfterLife: Private Crypto Inheritance System with PDF IntegrationZK-AfterLife is a comprehensive zero-knowledge proof-based digital inheritance platform that enables private and automated distribution of crypto assets upon user inactivity. Built on Aztec Network using Noir programming language, the system leverages PLONK-based zk-SNARKs to maintain complete privacy while ensuring verifiable execution of digital wills.Core FeaturesZero-Knowledge PrivacyUses Poseidon hashing for commitment schemesWill details remain completely private until executionZK proofs verify validity without revealing beneficiary information or asset amountsMerkle tree structures hide beneficiary listsNoir circuits for efficient zero-knowledge proof generationAutomated ExecutionHeartbeat monitoring system with configurable check-in intervals (default: 12 months)30-day grace period with multisig veto capabilitiesAutomatic asset distribution upon confirmed inactivityNo middleman required - fully decentralized executionAdvanced Verification SystemsSelf Protocol Integration: Human verification through government ID verification (passport, driver's license, Aadhaar) for identity confirmationAge Verification: ZK-based age checks for beneficiaries (ensuring children are over 18)ZK-PDF Integration: Upload signed PDF wills with zero-knowledge verification of document authenticity and beneficiary extractionMulti-signature Veto: Trusted parties can pause execution during grace periodsTechnical ArchitectureFrontend: Next.js with TypeScript, wallet integration (MetaMask, WalletConnect)Smart Contracts: Solidity contracts for will registration, execution, and verificationZK Circuits: Noir-based circuits for proof generation and verificationBackend: Rust-based PDF processing service with SP1 circuitsCross-chain: Ethereum L1 for heartbeat monitoring, Aztec L2 for private executionAsset ManagementSupports ETH, USDC, NFTs, and traditional financial assetsPrivate UTXO-based asset storage on Aztec NetworkConfigurable beneficiary allocations with validationPDF-based will creation with automatic beneficiary extractionError handling for invalid addresses (assets go to executor)Strategic PartnershipsSelf Protocol: Identity verification and age validation without exposing personal dataEthereum Foundation (ZK-PDF): Zero-knowledge proof verification of PDF documents and signature validationAztec Network: Private execution layer for confidential asset distributionThe system represents a significant advancement in crypto estate planning, combining privacy-preserving technology with practical inheritance management while maintaining the security and transparency benefits of blockchain technology.
Solution
Architecture Overview ZK-AfterLife is a multi-layered, cross-chain system that combines zero-knowledge cryptography with practical estate planning. The architecture follows a modular design pattern with clear separation of concerns.Core Technology StackSmart Contracts (Solidity)Foundry for development, testing, and deploymentOpenZeppelin contracts for security patternsBN254 elliptic curve for ZK proof verificationCustom UltraHonk proof structure for efficient verificationZero-Knowledge Layer (Noir)Noir programming language for ZK circuit developmentPoseidon hashing for commitment schemes and Merkle treesAztec Network integration for private executionUltraHonk backend for proof generation and verificationFrontend (Next.js + TypeScript)Next.js 14 with App Router for modern React developmentViem for Ethereum interactionTailwind CSS for stylingFramer Motion for animationsZod for runtime type validationBackend (Rust + SP1)Rust-based PDF processing service using Axum web frameworkSP1 circuits for zero-knowledge PDF verificationPDF text extraction and beneficiary parsingMock ZK proof generation for demonstration purposesKey Technical InnovationsZero-Knowledge Proof System The heart of the system is a sophisticated ZK circuit that uses Poseidon hashing instead of SHA-256 for better performance. The circuit validates will commitments, builds Merkle trees for beneficiaries, and ensures allocation sums match declared totals - all while keeping beneficiary details completely private.PDF Integration with ZK Verification The system integrates ZK-PDF technology to allow users to upload signed PDF wills. The Rust backend extracts beneficiary information from PDFs and generates zero-knowledge proofs that verify the document's authenticity without revealing its contents. This enables traditional legal documents to work seamlessly with the crypto inheritance system.Smart Contract Architecture The system uses interconnected contracts with specific responsibilities:WillVerifier handles ZK proof verificationWillExecutor manages asset distributionL1Heartbeat tracks user inactivityAztecExecutor coordinates private executionL1AztecBridge enables cross-chain communicationNoirIntegration manages proof coordinationFrontend Service Architecture The frontend uses a service-oriented architecture with clear separation:NoirService manages ZK proof generation and verificationZKPDFService handles PDF upload and verificationBlockchainService manages wallet connections and contract callsWalletContext provides global state managementPartner Technology IntegrationEthereum Foundation (ZK-PDF) The system integrates ZK-PDF technology for PDF document verification, enabling users to upload traditional legal wills and have them verified through zero-knowledge proofs. The Rust backend processes PDFs, extracts beneficiary information, and generates proofs that verify document authenticity without revealing sensitive content.Self Protocol Integration The system integrates Self Protocol for human verification during will setup, identity confirmation for beneficiaries, age verification using ZK proofs, and biometric authentication for sensitive operations.Aztec Network Integration Leverages Aztec's private execution environment for confidential asset distribution, ensuring beneficiary details and asset amounts remain private during execution.Notable Technical InnovationsDynamic Circuit Loading The system gracefully degrades from full ZK mode to mock mode if dependencies aren't available, making development and testing much easier.Flexible String-to-BigInt Conversion Handles any input format (hex addresses, decimal numbers, text) and converts them to the field elements needed for ZK circuits.PDF-to-Blockchain Bridge The system automatically extracts beneficiary information from uploaded PDF wills and converts them into blockchain-compatible format, bridging traditional legal documents with crypto inheritance.Poseidon-Based Merkle Trees Using Poseidon instead of SHA-256 makes the ZK circuit much more efficient, reducing proof generation time and gas costs.Cross-Chain PDF Verification The Rust backend processes PDFs off-chain and generates proofs that can be verified on-chain, enabling efficient PDF verification without storing large documents on-chain.How Everything Pieces TogetherUser creates will (manual or PDF upload) → Frontend generates ZK proof using Noir circuit PDF processing → Rust backend extracts beneficiaries and verifies document authenticity Will registered → Commitment stored on Ethereum L1 Heartbeat monitoring → L1Heartbeat tracks user activity Inactivity detected → Grace period begins with veto options Execution triggered → AztecExecutor distributes assets privately ZK verification → WillVerifier ensures valid execution Asset distribution → Beneficiaries receive private UTXOsThe system elegantly combines privacy (ZK proofs), security (multi-sig veto), automation (heartbeat monitoring), flexibility (configurable parameters), and traditional document integration (PDF wills) into a cohesive digital inheritance solution.
Hackathon
ETHGlobal New Delhi
2025
Contributors
- AshiqAhamed17
52 contributions
- mayank-006
1 contributions