Interval-based payment streaming on Bitcoin via Stacks. Payments unlock at fixed intervals, withdraw anytime, settle instantly.
Traditional payments are discrete and inflexible:
- 💼 Employees wait weeks for paychecks → cash flow problems
- 🎨 Freelancers invoice monthly → delayed payment, uncertainty
- 📺 Subscriptions charge upfront → paying for unused time
- 🤝 Grant recipients get lump sums → no accountability, misaligned incentives
Result: Inefficient capital allocation, trust issues, and financial stress.
StreamPay enables continuous, interval-based payment streams on Stacks using SIP-010 tokens (USDCx, STX, sBTC).
- ⚡ Flexible Intervals: Per block, hourly, daily, or custom
- 💰 Anytime Withdrawals: Recipients access earned funds 24/7
- ⏸️ Pause / Resume: Senders can pause streams (settles owed amount first)
- 🔝 Top-up: Extend stream duration by adding more funds
- 🔒 Bitcoin-Secured: Built on Stacks L2, inheriting Bitcoin security
- 🌐 Multi-Token: Any SIP-010 fungible token
- 📊 Event Logging: All actions emit indexable on-chain events
- 🎯 Lazy Accounting: Gas-efficient on-demand calculations
- 🛡️ Safety Limits: Rate, interval, and deposit caps
- 🔄 BNS Integration: Human-readable
.btcaddresses - ✅ Instant Settlement: Cancel streams with automatic prorated refunds
- 📱 Real-Time Updates: Frontend refreshes every 30 seconds
Try it now (no installation required):
- 🌐 Live App: https://streampay-9ui8.vercel.app/
- 📜 Testnet Contract:
ST30J9EZKY44SS1EBT8XNKJFA77Z4TSDBEMZ55MEJ.precious-white-sparrow - 🔍 Block Explorer: https://explorer.hiro.so/txid/ST30J9EZKY44SS1EBT8XNKJFA77Z4TSDBEMZ55MEJ.precious-white-sparrow?chain=testnet
- 🎥 Demo Video: https://www.youtube.com/watch?v=WNxcNMz-GNA
- Visit the live app
- Connect Hiro or Leather wallet (testnet)
- Mint test USDCx
- Create a stream
- Withdraw in real time
Supports custom payment intervals, not only per-block:
- Hourly (~720 blocks)
- Daily (~17,280 blocks)
- Custom (1 to 100M blocks)
This aligns payments with real-world billing cycles while remaining gas-efficient.
Pausing a stream:
- Settles all owed funds
- Freezes accrual
- Can resume at any time
No funds are lost.
Extend streams by adding funds mid-stream:
// 100 USDCx for 100 days
// +50 USDCx top-up
// → Stream now lasts 150 days(define-public (create-stream
(recipient principal)
(rate uint)
(deposit uint)
(interval uint)
(token <ft-trait>)
))Works with any present or future SIP-010 token.
Sender ── Create Stream ──► Contract ──► Recipient
Deposit Funds Withdraw Anytime
intervals = (current-block - last-withdraw-block) / interval
ewarned = intervals * rate
owed = min(earned, remaining-deposit)- Language: Clarity 2.0
- Network: Stacks Testnet
- Standard: SIP-010
- Tooling: Clarinet
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Wallets: Hiro, Leather
- Styling: Tailwind CSS
- Deployment: Vercel
# Clone repository
git clone https://github.com/Ghislo749/streampay
cd streampay/frontend
npm install
npm run dev- Integer overflow protection (Clarity-native)
- Strict sender / recipient authorization
- Reentrancy-safe execution model
- Idempotent withdrawals
- Input safety limits
| Scenario | Safe |
|---|---|
| Same-block withdraw | ✅ |
| Pause without owed | ✅ |
| Interval = 0 | ❌ Rejected |
- Core streaming
- Pause / Resume
- Top-ups
- Multi-token support
- Testnet deployment
- Batch operations
- Stream templates
- Scheduled streams
- Analytics dashboard
- STX402 API (micropayment-based)
- DAO & bounty streaming
- Cross-chain support
MIT — see LICENSE
YOUR NAME
- GitHub: https://github.com/Ghislo749
- Twitter: https://x.com/Ghislo749_
Built on Stacks · Secured by Bitcoin · Powered by USDCx
Making payments flow like time itself ⏰