Autiv
Autiv is an onchain subscription service built on Monad tesnet, powered by Metamask Smart Account and Metamask Delegation Toolkit
Videos
Description
Autiv is an on-chain subscription platform built for the MetaMask Smart Accounts x Monad Dev Cook Off. Autiv lets creators launch recurring payment plans and normal users can manage their subscriptions on Monad testnet while abstracting away contract complexity. Subscribers approve once through MetaMask Smart Accounts, delegate renewal permissions, and the system handles everything else.
What I Built
MetaMask Smart Accounts + Delegation: Customers sign delegations that let the Autiv manager trigger future renewals without custodial control.
Realtime Verification via HyperSync RPC: Every payment the worker receives is verified against Envio’s HyperSync RPC before updating off-chain state so we never double-charge or miss events.
Cloudflare Worker API: (
worker/autiv/) serves as the gateway for subscription lifecycle: creating plans, processing payments, cancelling, and listening to blockchain events.Frontend Dashboard (
app/frontend/): Vite + React UI where developers configure plans, monitor subscribers, and manage webhooks.Payment Widget (
app/payment-site/): A lightweight checkout experience embeddable in any product site.Subscription Manager Contract and Subscription Manager Factory (
/contracts): Core contract of subscription flows and a factory to easily deploy the manager.Payment collector (
contracts/payment-processor): Collect due subscription ontime
Why It Matters
Recurring revenue on Monad: Autiv makes subscription billing a first-class citizen for Monad-native apps.
Security-first: Delegations are scoped to each plan, and on-chain verification guarantees state consistency.
Composable: The payment widget and Cloudflare APIs allow projects to integrate Autiv subscription flows within minutes.
Progress During Hackathon
Core architecture Designed and implemented the Autiv monorepo with 5 workspaces: app/frontend/, app/payment-site/, worker/autiv/, supportive database scripts and contracts/payment_processor. Established smart account flows, delegation handling, and subscription lifecycle management. Smart-account integration Built useSmartAccountContractWriter.ts and related hooks to interact with MetaMask Smart Accounts, including delegated approvals, recurring payment processing, and cancellation logic read from the Monad SubscriptionManager contract. Dynamic contract config Reworked frontend and worker APIs to fetch contract addresses per project (/api/get-project-details), eliminating hardcoded addresses and enabling per-project deployments. WebSocket & realtime updates Implemented monadWebSocket service and useSubscriptionWebSocket() hook to listen for PaymentProcessed, SubscriptionCreated, and SubscriptionCancelled events, ensuring the dashboard reflects blockchain state instantly. Backend APIs Expanded worker/autiv/src/index.js to handle user auth, developer workflows, subscription CRUD, delegation storage, and HyperSync RPC verification before persisting payments. Developer UX Delivered dashboards for managing projects, API keys, and subscriptions; added caching in AuthContext.tsx and useUserSubscriptions() for faster page loads. Created a background worker that collect due subscriptions.
Tech Stack
Fundraising Status
None