hackquest logo

Dpay

dPay - a non-custodial family budget management app powered by Metamask ERC-7715 delegation and Envio Indexer.

Videos

Description

dPay β€” Delegated Family Payments

Tagline: Your family's wallet, your keys, your control.

🎯 Problem

Managing family finances on-chain is broken. Today, if you want to give your spouse or kids spending money, you have two bad options:

1. Transfer funds to their wallet β€” You lose custody. Once sent, you can't control how it's spent or get it back.

2. Share your private keys β€” Terrible security. Full access means full risk.

Traditional apps like GPay solve this with custodial accounts, but that means trusting a centralized entity with your money. They can freeze accounts, impose limits, and you're locked into their ecosystem.

What if you could give your family spending power without giving up custody?


πŸ’‘ Solution

dPay is a non-custodial family budget management app powered by ERC-7715 delegation.

The family head (e.g., Dad) holds all funds in a single smart account. Family members receive spending permissions β€” not funds. They can spend up to their budget directly from the family vault, without Dad ever transferring tokens or sharing keys.

> Think of it like a corporate card: the company owns the money, employees can spend within limits, and access can be revoked instantly.

βš™οΈ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” ERC-7715 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Family Head β”‚ ──── Delegate Budget ───► β”‚ Family Member β”‚

β”‚ (Vault) β”‚ β”‚ (Mom/Son/etc) β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”‚ β”‚

β”‚ Funds stay here β”‚ Can spend up to limit

β–Ό β–Ό

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Smart Account β”‚ ◄── redeemDelegations ─── β”‚ Member's Wallet β”‚

β”‚ (Holds $$$) β”‚ β”‚ (No funds req) β”‚

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

β”‚

β–Ό

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

β”‚ Envio Indexer β”‚ ──► Real-time Dashboard

β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

1. Family head creates a vault β€” A smart account that holds all family funds

2. Delegates budgets to members β€” Using MetaMask's delegation framework (ERC-7715)

- Mom: $500/month

- Son: $50/week

- Daughter: $50/week

3. Members spend directly β€” When they need to pay, they call redeemDelegations() which executes a transfer from the vault

4. Real-time tracking β€” Envio indexes all spends, showing who spent what, when, and where

5. Instant revoke β€” One click to revoke any member's access


✨ Key Features

| Feature | Description |

|---------|-------------|

| Non-Custodial | Family head keeps full custody β€” only delegates spending capability, not funds |

| Granular Budgets | Set per-member limits: weekly, monthly, or custom periods |

| Hard Limits | Enforced on-chain by SpendingLimitEnforcer β€” can't be overridden |

| Instant Revoke | Remove access in one transaction β€” no support tickets |

| Real-Time Dashboard | Track all family spending with Envio-powered analytics |

| No Pre-Funding | Members don't need tokens in their wallets to spend |

| Multi-Token Support | Works with any ERC-20 token |

πŸ”§ Technical Architecture

Smart Contracts

- MetaMask DelegationManager β€” Core delegation framework

- SpendingLimitEnforcer β€” Enforces budget limits per period

- TimestampEnforcer β€” Handles permission expiry

Indexer (Envio)

- Indexes RedeemedDelegation events

- Decodes actual spend amounts from transaction calldata

- Tracks per-member spending against budgets

- Provides GraphQL API for dashboard

Backend (Supabase)

- Stores delegation metadata and permission contexts

- User authentication and family management

- Aggregates data from Envio for fast queries

Frontend

- Family dashboard with spending analytics

- Member view showing remaining budget

- One-click delegation and revocation

πŸ†š GPay vs dPay

| | GPay | dPay |

|---|---|---|

| Custody | Google holds your money | You hold your keys |

| Budget Control | Soft limits, can override | Hard on-chain limits |

| Revoke Access | Contact support, wait days | One click, instant |

| Censorship | Can be frozen | Permissionless |

🎯 Use Cases

1. Family Allowances β€” Give kids weekly spending money without transferring tokens

2. Household Budgets β€” Spouse can pay bills from shared vault

3. Elderly Care β€” Allow caretakers limited spending access for an elderly parent

4. Travel Budgets β€” Give family members travel spending limits that auto-expire

5. Shared Subscriptions β€” Delegate exact amounts for recurring payments


πŸ›  Tech Stack

- Blockchain: Base Sepolia, Sepolia

- Delegation: MetaMask Delegation Framework (ERC-7715)

- Indexing: Envio HyperIndex

- Backend: Supabase

- Frontend: Next.js, React, TailwindCSS

- Wallet: MetaMask, WalletConnect

πŸš€ What's Next

- [ ] Multi-sig family vaults (require 2 parents to approve large spends)

- [ ] Merchant whitelists (kids can only spend at approved stores)

- [ ] Spending notifications (real-time alerts when family members spend)

- [ ] Budget rollover (unused allowance carries to next period)

- [ ] Mobile app with push notifications

Progress During Hackathon

100

Tech Stack

React
Next
Web3
Ethers
Solidity

Fundraising Status

100

Team Leader
RRahul Shanmugam
Sector
DeFiSocialFiDAO