About
## Wave 4 submission
🚀 ShadowStream is a Web3 payments layer for private, gasless USDC/USDT micropayments on Polygon. We let users and teams create “Policy Vaults” that fund AI agents and backend services with strict, on‑chain spending limits, so bots can pay merchants without ever holding the user’s main wallet keys.
💡 Idea: recurring micropayments and machine‑to‑machine payments are painful today (gas, UX, security). ShadowStream turns this into a safe, programmable flow. Users deposit into a Policy Vault, define a daily limit and max per transaction, assign a trusted executor, and then AI agents can spend from that vault to registered merchants while the system enforces limits and logs everything. ⚙️ What we built in this wave • Deployed and verified core contracts on Polygon mainnet • Integrated a gasless relayer backend so users only sign messages while our service pays gas • Built a full dashboard for users, merchants, and agents with real‑time analytics • Implemented x402‑style “pay‑per‑API‑call” flows where an HTTP request is cryptographically linked to an on‑chain payment
🔗 On‑chain contracts (Polygon mainnet)
• PolicyVaultFactory – 0x8704E52Db0a84CA2b9951e23104d01F9F0deFe0E Creates Policy Vaults with owner, token (USDC/USDT), dailyLimit, maxPerTx and trustedExecutor. • MerchantRegistry – 0x4B493f254a2Bd1FbBf66B5AfA4d02eAe208872b7 Registers merchants, their payout addresses and active status. • PolicyVault (per user) Holds funds and enforces policy: deposit/withdraw by owner, executePayment only by trustedExecutor, tracking spentToday with automatic reset.
🧠 Backend, database and agent layer
• Backend: Node.js + Express relayer, connected to Polygon through POLYGON_MAINNET_RPC_URL, signing transactions with DEPLOYER_PRIVATE_KEY as trusted executor. • Database: PostgreSQL + Prisma, storing vault activity, merchants, APIs, and agent keys. This powers our analytics dashboards (spend over time, top merchants, per‑API revenue, etc.). • Agent model: each agent gets a scoped key mapped to specific vaults and merchant APIs; every call checks policies, then sends an on‑chain payment and forwards the HTTP request.
🖥️ Frontend and live URLs
• Frontend: React + Vite + Tailwind, deployed at https://shadow-stream-three.vercel.app/ • Backend API and relayer: https://shadow-stream-backend.onrender.com/ 🌌 Vision: ShadowStream is building the payments substrate for autonomous agents on Polygon—safe, policy‑guarded vaults, gasless UX, and auditable, privacy‑preserving stablecoin streams for the next generation of AI‑native apps.
## Wave 5 submission
🌘 ShadowStream Private, gasless USDC/USDT micropayments on Polygon via policy-controlled vaults
ShadowStream is a Web3 payments layer on Polygon that enables private, gasless micropayments using stablecoins. Users and organizations create Policy Vaults that fund AI agents and backend services with strict on-chain spending rules, allowing agents to pay merchants safely without ever holding a user’s main wallet keys.
🔑 The problem we solve
🧾 Recurring micropayments are painful due to gas costs, poor UX, and security risks. 🤖 AI agents need wallets, but giving bots private keys is unsafe. 🕵️ Users don’t want their primary wallet exposed to every merchant or API.
ShadowStream solves this by introducing Policy Vaults: smart contract wallets governed by programmable rules, gasless execution, and a trusted relayer that enforces spending policies on-chain.
🧩 How ShadowStream works
Users deposit USDC or USDT into a Policy Vault controlled by rules, not by their EOA. Each vault enforces a maximum spend per transaction, a daily spending limit, and a trusted executor address. Merchants register once, receive a payout address and merchant ID, and can attach APIs with pricing such as price-per-call.
AI agents interact using scoped agent keys. The backend verifies vault rules, relays executePayment from the vault to the merchant on Polygon, pays gas via a relayer, and logs activity for analytics. Users sign once to configure the vault, after which payments feel automated and gasless.
🏗️ On-chain contracts (Polygon mainnet) PolicyVaultFactory – deploys and tracks policy vaults https://polygonscan.com/address/0x8704E52Db0a84CA2b9951e23104d01F9F0deFe0E
MerchantRegistry – manages merchant identities and payout addresses https://polygonscan.com/address/0x4B493f254a2Bd1FbBf66B5AfA4d02eAe208872b7
PolicyVault (per user or organization)
Holds a single ERC-20 token, allows owner deposits and withdrawals, enforces spend limits, restricts payments to a trusted executor, and tracks daily usage with automatic resets.
🧠 Backend, agents, and analytics
Backend built with Node.js, Express, Ethers, and Prisma. Connected to Polygon via mainnet RPC and operating a relayer wallet as the trusted executor. PostgreSQL stores vault activity, merchants, APIs, and agent credentials, powering dashboards for spend, revenue, and per-API performance.
🖥️ Frontend dashboard
React, Vite, and Tailwind frontend with wallet-aware UI. Users can create and manage Policy Vaults, view balances and limits, register merchant APIs, issue agent keys, and inspect real-time payment analytics.
🔗 Live URLs
App: https://shadow-stream-three.vercel.app/
Backend: https://shadow-stream-backend.onrender.com/
🌌 Vision
ShadowStream is building the payments substrate for AI and machine-to-machine commerce on Polygon: policy-guarded vaults, invisible gasless UX, and auditable yet privacy-preserving stablecoin payments for the next generation of autonomous applications.
Prizes
- Wave 4 grant · 108.43 USDC
From the public Akindo product page. Votes, swipes and the judge score are hackfeed's own.





