SubsCrypt

SubsCrypt: Private, anonymous on-chain subscription payments via ZK-proofs and EIP-7702 automation.

SubsCrypt

Created At

ETHGlobal Prague

Winner of

Blockscout

Blockscout - Big Blockscout Explorer Pool Prize

Prize Pool

Project Description

SubsCrypt is an innovative platform that leverages EIP-7702 and Vlayer ZK-proofs to create an on-chain private subscription payment marketplace.

Leveraging advanced blockchain technologies, SubsCrypt combines Ethereum's EIP-7702 standard and Vlayer zero-knowledge (ZK) email proofs to achieve user privacy without sacrificing usability.

Name morphological analysis: * Subs: Short for “Subscription”, highlighting recurring payments. * Crypt: From the Greek “kryptós”, meaning “hidden” or “secret”, emphasizing user privacy.

In most Web2 SaaS applications, users' emails are used as the service consumer profiles, allowing users to authenticate themselves in web apps and consume the specific service. In the case of paid services, payments should be routed through a conventional payment gateway (PayPal, Stripe...) to which the identity of the user must be disclosed (email, payment information, service consumed, price paid) to a third-party payment gateway. The advantage is that for subscription payments, the user should only set up the payment method once, and the service provider will periodically pull the funds throw the payment gateway from the user's payment methods automatically without requiring any user interaction. We can now mimic that flow efficiently by implementing delegate logic to EOAs thanks to the EIP-7702 introduced in the Ethereum Pectra upgrade.

Once a user generates their dedicated "payment" EOA, it can be anonymously funded through privacy-preserving methods. Service providers utilize EIP-7702's delegation capabilities, enabling semi-automated, non-interactive recurring payments after a one-time authorization.

SubsCrypt thus ensures complete privacy, streamlined recurring payments, and enhanced interoperability for subscription services on the blockchain.

How it's Made

How it's Made

SubsCrypt is built specifically to tackle the privacy challenges in decentralized subscription payments.

Core Technology Stack

Frontend Architecture

Built on Next.js with TypeScript and Tailwind CSS v4.

The Web3 integration utilizes:

  • RainbowKit 2.2.5 for beautiful wallet connection UX
  • Wagmi 2.15.4 for React hooks and wallet management
  • Viem 2.30.5 for type-safe Ethereum interactions
  • TanStack Query for efficient data fetching and caching

Smart Contract Infrastructure

Developed using Solidity 0.8.28 with Hardhat as our development framework and OpenZeppelin contracts for security-audited base implementations. We deployed on Sepolia testnet with Anvil for local development and testing.

Our contract architecture consists of:

  • SubsCryptMarketplace.sol - Main marketplace and service registry
  • SubsCryptSmartAccountDelegate.sol - EIP-7702 delegation logic
  • Interface contracts for modularity and upgradability

Backend Services

Bun.js-based wallet services handling:

  • Email-to-blockchain bridge operations
  • Automated payment processing
  • Vlayer proof verification
  • Authorization tuple parsing from emails

App Flow

Service Provider

  1. Service providers can announce their services by submitting a transaction to SubsCryptMarketplace.registerService specifying all the properties of the service through ServiceOffer struct. This can be easily done through the service provider admin dashboard.

    struct ServiceOffer { address serviceProvider; address paymentRecipient; address paymentAsset; uint256 assetChainId; uint256 servicePrice; // in wei/seconds uint256 paymentInterval; // seconds }

User

  1. Users can visualize all offered services from different services providers in the same aggregated frontend.
  2. If an user is interested in a specific service, he can start the subscription initialization through cling a simple button in the frontend.
  3. Transparently to the user a "payment" EOA private key is randomly generated and is used to sign a delegation to the SubsCryptSmartAccountDelegate implementation.
  4. At the end of the button click handler action, an email window opens, indicating to the user that they need to send an email to the service provider with the delegation payload. The email is automatically generated following a template; the user only has to send it.

Email Reception Automation

  1. The email is received in the service provider inbox and is automatically processed by an email automation build with n8n.
  2. From the email content following data is parsed:
    • The service id that the user wants to subscribe to.
    • The email sender.
    • The email receiver.
    • The EIP-7702 authorization tuple.
  3. The service provider backend submits an Ethereum v4 transaction to the blockchain with the given authorization tuple, effectively setting up the SubsCryptSmartAccountDelegate to the "payment" EOA.

Vlayer Email Proofs

  1. The email's .eml file content is submitted to our custom prover and all private inputs constrains are checked. As output we obtain the address of the "payment" EOA and a hidden commitment of the user email.
  2. The proof is then passed on-chain to the verifier contract along with the public outputs.

On-Chain logic

  1. If the verification succeeds the verifier contract itself will call the access controlled SubsCryptMarketplace.initializeAccount to initialize the state of the EOA. The wallet is now ready to be funded.

Wallet Funding and Bots

  1. The users knows the address of the wallet and is its his duty to add funds to it in order to trigger the first payment of the subscription. Privacy preserving funding methods can be used to completely anonymize the payments of the subscription.

  2. After each period of paymentInterval the bots will be incentivized to trigger the payment transactions mimicking an automatic execution of the payments. The payments can be triggered selectively in batches through calling the SubsCryptMarketplace.batchExecutePayments.

Privacy-First Design Patterns

Ephemeral Payment EOAs

  • Users generate temporary private keys solely for subscription purposes
  • Once EIP-7702 delegation is active, the private key becomes unnecessary
  • Email authentication can recover funds, eliminating key management burden
  • Complete separation between user identity and payment addresses

Anonymous Funding

  • Payment EOAs are funded through privacy-preserving protocols
  • Funding source cannot be traced back to the user's main identity
  • Integration points designed for mixers and privacy pools

Zero-Knowledge Email Binding

  • Connection between email and payment address exists only as cryptographic proofs
  • Email addresses never exposed on-chain
  • Vlayer proofs provide authentication without revealing sensitive data

Development Challenges & Solutions

Email Integration Complexity

The biggest challenge has been parsing the email and passing its properties to the Vlayer prover. We innovated in email parsing and authorization tuple extraction.

Multi-Currency Payments via Atomic 1 Inch Unoswap Swaps

We leverage 1 Inch Unoswap swaps so users can pay in their preferred currency and the services providers got payed with their specified currency. The swap executes atomically in a same pulling transaction, converting the funds.

Privacy vs. Functionality Balance

Balancing complete privacy with necessary functionality required creative solutions:

  • Using email hashes as identifiers while maintaining anonymity
  • Designing recovery mechanisms that don't compromise privacy
  • Creating audit trails without exposing user information

Future Enhancements

Multi-Party Computation (MPC)

We've laid groundwork for family subscription features using MPC:

  • Shared payment accounts across multiple users
  • Threshold signatures for subscription management
  • Privacy-preserving family plan implementations cases

SubsCrypt represents a convergence of emerging blockchain standards (EIP-7702), zero-knowledge privacy (Vlayer), creating something that's never existed before: truly anonymous, automated, Web2-UX subscription payments on Web3 infrastructure.

background image mobile

Join the mailing list

Get the latest news and updates