← all projects

StreamGate

@0xUstaz·Ustaz·added 2026-07-19
1
stars
1.1k
lines
14
files
0
forks
0
followers
languages
Python 72%JavaScript 17%Shell 11%

StreamGate meters live-stream viewing by the second. A Python sidecar receives signature-verified Owncast webhooks in sidecar/main.py, opening a session on USER_JOINED and closing it on USER_PARTED. sidecar/session_tracker.py adds autonomous behavior: a drop-detection loop force-closes and settles sessions when a viewer vanishes without a part event, and surge pricing multiplies the per-second rate when concurrent viewers cross a threshold. On session close, sidecar/payment.py computes duration times rate and signs a direct USDC ERC-20 transfer on Arc testnet, returning a receipt with the transaction hash. A Node payment-bridge (settle.js, balance.js), viewer UI, and Vercel-hosted watch pages complete the pipeline.

events
tags
circle components
builder bio

Web3 Developer | trader | Love AI agent Passionate about blockchain, smart contracts, DeFi, and building tools for the crypto ecosystem

team · solo

1 (Solo) — Ustaz

on xx/0xUstaz
last pushed 2026-07-06