Chronos
ERC-20 PYUSD recurring payment dashboard powered by Next.js, Wagmi & MetaMask.
Problem Statement
Chronos is a non-custodial recurring payments scheduler for PYUSD (PayPal USD), built as a Next.js decentralized application with wagmi, viem, and MetaMask integration on the Sepolia testnet.At its core, Chronos enables a user to:Connect their wallet (via injected MetaMask + wagmi configuration pointed at Sepolia).Create a recurring payment plan by specifying recipient address, amount of PYUSD (ERC-20), recurrence period (daily/weekly/monthly/custom), and start time.Persist the plan locally in browser localStorage, ensuring no external backend custody or server dependencies.Track due payments with “Due Now” reminders, highlighting which transfers are ready for execution.Execute the transfer on-chain using a standard ERC-20 transfer() call via wagmi + viem. The execution remains manual by design to stay fully non-custodial and avoid introducing new smart contracts or approval risks.🛠 Technical StackFrontend: Next.js (App Router) + TypeScriptWallet Integration: wagmi + MetaMask (injected connector)Blockchain Calls: viem (ERC-20 ABI for decimals, symbol, and transfer)Persistence: localStorage for schedule metadata (plans, last-run timestamps)Chain: Sepolia testnetToken: PYUSD ERC-20 (0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9)⚙ Design DecisionsNon-custodial by default → no approvals, no extra contracts; transfers happen directly wallet → recipient.Local-first architecture → schedules are user-owned in browser storage; no dependency on centralized servers.Composable future → easy to extend with a backend for notifications, or integrate a relayer/cron job for full auto-execution.Human-centric UX → intuitive dashboard with wallet status, “Due” badges, plan history, and one-click execution.🌍 Real-World Use CasesParents → children: weekly allowance in PYUSD.Employers → workers: recurring payroll in stablecoins.Donors → NGOs: scheduled recurring donations, transparently verifiable.Consumers → services: subscription-style payments (Spotify, Netflix equivalents) directly on-chain.🚀 Why It MattersRecurring payments represent a huge share of financial activity (subscriptions, salaries, remittances). Stablecoins like PYUSD are primed to capture this market. Chronos demonstrates how to implement recurring flows safely, simply, and user-controlled on-chain. This approach grows both PYUSD usage (transaction volume) and market cap (balances held for schedules).By removing friction from stablecoin payments, Chronos shows the path for PYUSD adoption beyond trading — into everyday finance.
Solution
Chronos is built as a Next.js dApp using react with wallet integration via wagmi and on-chain contract calls via viem. We configured wagmi to point at the testnet with injected MetaMask support.For the token, we defined a minimal ERC-20 ABI (decimals, symbol, transfer) and hardcoded the PYUSD Sepolia address (0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9).The recurring scheduler is implemented entirely client-side:Plans (amount, recipient, frequency, start time) are stored in browser localStorage.A due-checking function determines if a plan requires execution based on last run + frequency.When the user clicks Execute, we call transfer(recipient, amount) through wagmi, triggering MetaMask to sign and broadcast.Styling is a custom dark theme with modern SaaS-inspired components. Plans display as interactive cards with “Due Now” badges, last-run timestamps, and one-click actions.We chose this design to stay fully non-custodial: no approvals, no custom smart contracts, no server reliance. The demo is self-contained, works in any browser, and can be extended with:Backend for notifications & historyRelayer/cron for true auto-executionIntegration with real-world PYUSD on mainnet
Hackathon
ETHGlobal New Delhi
2025
Contributors
- ayush585
3 contributions