gitwtfhub

wtf is streamgate?

0xustaz/streamgate — explained in plain English

Analysis updated 2026-05-18

1PythonAudience · developerComplexity · 4/5Setup · hard

TL;DR

A hackathon project that charges live-stream viewers by the second in USDC cryptocurrency, settled automatically on the Arc blockchain testnet.

Mindmap

mindmap
  root((StreamGate))
    What it does
      Pay-per-second streaming
      USDC settlement
      Automatic session billing
    Tech stack
      Python FastAPI
      web3.py
      Owncast
      Arc Testnet
    Use cases
      Micropayment streaming
      Webhook-driven billing
      Crypto payment prototyping
    Audience
      Hackathon builders
      Web3 developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Prototype pay-per-second billing for a live video stream instead of subscriptions.

REASON 2

Automatically settle crypto micropayments when a viewer session ends.

REASON 3

Study how to combine webhook events with on-chain USDC transfers.

REASON 4

Learn from documented real bugs when integrating web3.py and Circle's payment tooling.

What's in the stack?

PythonFastAPIweb3.pySQLiteOwncastVercelArc Testnet

How it stacks up

0xustaz/streamgatea-bissell/unleash-litea1cst/genreg-radial
Stars111
LanguagePythonPythonPython
Setup difficultyhardhardeasy
Complexity4/54/53/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Needs an Arc testnet wallet, RPC access, an Owncast streaming server, and a Vercel frontend deploy.

Wtf does this do

StreamGate is a hackathon project that lets viewers pay for a live video stream by the second, instead of buying a monthly subscription or the platform taking a cut. Payments are made in USDC, a dollar pegged cryptocurrency, and settled automatically on a blockchain called Arc, without a person approving each transaction. Here is how a viewer's session works. They open the demo website, type in a crypto wallet address, and pick a price per second, for example a tenth of a cent. When they click watch, the video loads directly and a small background service on the streamer's server starts a timer for that viewer. When the viewer leaves, the service multiplies how long they watched by the rate, and sends that exact amount of USDC to the streamer's wallet. A receipt with a link to the blockchain transaction is then shown to the viewer. The project's background service also makes a few automatic decisions on its own, which the author calls its agentic layer. If a viewer's browser crashes or their connection drops without a proper goodbye signal, the service waits 30 seconds of silence and then closes and settles that session anyway. If many viewers are watching at once, past a set threshold, the price per second automatically goes up by one and a half times. Sessions shorter than five seconds are not billed at all, to avoid charging for accidental page loads. The backend is written in Python with FastAPI, uses the web3.py library to send USDC transfers, and stores a log of sessions in SQLite. The live video itself is served by an open source tool called Owncast, which notifies the backend through webhooks when a viewer joins or leaves. The frontend is a simple HTML and JavaScript page hosted on Vercel. The README documents nine specific bugs the author hit while building this, including library version conflicts and a note that direct USDC transfers, rather than a newer payment protocol, turned out to be the reliable way to settle payments on this testnet. This was built for a hackathon focused on streaming and continuous payments, and the code runs against a test network rather than real money.

Yoink these prompts

Prompt 1
Explain how the drop detection and surge pricing logic in session_tracker.py works.
Prompt 2
Walk me through setting up the FastAPI sidecar and connecting it to Owncast webhooks.
Prompt 3
Why did the author choose direct ERC-20 transfers over the Circle Gateway settle endpoint?
Prompt 4
Help me adapt this pay-per-second model to a different streaming platform.

Frequently asked questions

wtf is streamgate?

A hackathon project that charges live-stream viewers by the second in USDC cryptocurrency, settled automatically on the Arc blockchain testnet.

What language is streamgate written in?

Mainly Python. The stack also includes Python, FastAPI, web3.py.

How hard is streamgate to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is streamgate for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.