StreamPay — Real-time USDC Streaming on Arc
StreamPay is a real-time USDC payment streaming protocol built natively on Arc. Instead of sending lump-sum payments, USDC flows continuously to recipients second by second. Features instant withdrawals, fair refunds on cancellation, and sub-second deterministic finality powered by Arc's infrastructure.
What is StreamPay?
StreamPay revolutionizes how payments are made by enabling continuous money streams. Instead of sending a one-time payment, a sender deposits USDC into a stream — and it flows continuously to the recipient, second by second, until the stream ends or is cancelled.
Why Arc?
- Sub-second deterministic finality — Payments settle the moment you click, no waiting for confirmations
- $0.01/tx gas in USDC — Makes per-second micropayment streams economically viable, impossible on chains with volatile gas
- ERC-20 USDC as native token — No currency conversion, no volatility exposure
Live Contracts (Arc Testnet)
Network Details
- Network: Arc Testnet
- Chain ID: 5042002
- RPC: https://rpc.testnet.arc.network
How It Works
StreamPay operates through four onchain actions that enable continuous payment flows:
1. Create Stream
Sender approves USDC and creates a stream with a specified rate per second
2. Continuous Flow
USDC flows automatically from sender to recipient every second
3. Withdraw Anytime
Recipient can withdraw earned USDC at any time with no gas cost (view function)
4. Cancel for Refund
Sender can cancel stream anytime — earned USDC goes to recipient, unspent returns to sender
Technical Design
USDC Decimal Safety
StreamPay handles USDC's 6 decimal precision correctly, ensuring accurate rate calculations and preventing precision loss in streaming payments.
Rate Precision
The protocol uses high-precision rate calculations to ensure that per-second flows are accurate and predictable, even for very small payment amounts.
Withdrawable Calculation (View, No Gas)
Recipients can check their withdrawable balance at any time through a view function that requires no gas, enabling real-time balance tracking without transaction costs.
Use Cases
Freelancer Payments
- Get paid continuously while working
- Withdraw earnings as you go
- No waiting for payment cycles
Salary Streaming
- Continuous salary payments throughout the month
- Instant access to earned wages
- Transparent payment tracking
Service Subscriptions
- Pay for services by the second
- Stop payments instantly when service ends
- Fair refunds for unused time
DAO Bounties
- Stream payments for ongoing contributions
- Adjust rates based on performance
- Transparent treasury management
Quickstart
1. Add Arc Testnet to MetaMask
Network Name: Arc Testnet
RPC URL: https://rpc.testnet.arc.network
Chain ID: 5042002
Currency Symbol: USDC
2. Install & Build
npm install
npm run build
3. Deploy Contracts
npx hardhat run scripts/deploy.js --network arcTestnet
4. Configure & Run Web UI
cd web
npm install
npm run dev
Web UI Features
- Create and manage payment streams
- Real-time balance tracking
- Instant withdrawal interface
- Stream cancellation with refund preview
- CSV export for payment history
Built on Arc
StreamPay leverages Arc Network's unique capabilities to enable real-time payment streaming that's economically viable and user-friendly. Arc's stablecoin-native infrastructure and sub-second finality make it the perfect foundation for continuous payment protocols.
Built by dhozil for Arc Network Testnet 🚀