Inspiration
Streaming platforms charge flat monthly subscriptions whether you watch 2 hours or 200. Creators get paid through opaque algorithms with no direct link to actual viewer engagement. We kept asking: why should you pay the same amount whether you watched 10 seconds or the full video? What if you only paid for exactly what you watched, down to the second — and that payment went directly to the creator, instantly, on a public ledger?
What it does
PayPerPlay is a Chrome extension + Node.js backend that introduces per-second streaming payments for video content using USDC on Solana.
When you open a YouTube or Prime Video video, a pricing gate appears over the player showing the total estimated cost and the per-second rate. Click Start Watching and USDC micropayments automatically stream from the viewer's wallet to the creator's wallet every 5 seconds on Solana devnet. Stop watching and payments stop immediately. You only pay for what you actually watch.
The price is community-driven — if most viewers only finish 40% of a video, the price adjusts downward automatically. Content people actually finish costs more. Content people abandon costs less. The formula is:
totalPrice = (0.2 cents/second × duration) × (avgWatchRatio / 100)
How we built it
PayPerPlay is a full-stack TypeScript monorepo with three layers:
Chrome Extension (Manifest V3) A content script detects videos on YouTube and Prime Video, renders a pricing gate overlay using Shadow DOM, and runs a per-second watch time meter. A service worker handles CORS proxying and Phantom wallet storage. The onboarding page connects to Phantom wallet for user identity.
Node.js Backend (Express) Handles pricing calculations using the community watch-ratio formula, manages session lifecycle, and orchestrates Solana payments. A SQLite database stores videos, sessions, watch events, and a full payment ledger with every Solana transaction signature.
Solana Devnet
The payment provider uses @solana/web3.js and @solana/spl-token to send USDC SPL token transfers between wallets. Every 5 seconds, a heartbeat from the extension triggers a payment. Each transaction is confirmed on-chain and logged with its Solana Explorer URL.
Challenges we ran into
Phantom doesn't inject into extension pages. Phantom wallet only injects window.solana into regular http/https pages, not into chrome-extension:// pages. We solved this by polling for injection with a timeout and adding a manual public key paste fallback so onboarding works regardless of the page context.
Solana devnet rate limiting. The RPC airdrop endpoint returns 429 errors constantly. We redesigned the setup script to write wallet credentials immediately on keypair generation, check balances instead of blindly airdropping, and provide clear instructions to use the web faucet instead.
Micropayment precision. USDC has 6 decimal places on Solana. Keeping payment math correct required using BigInt for all on-chain amounts to avoid floating point errors. The conversion: 1 cent = 10,000 micro-USDC.
Accomplishments that we're proud of
A fully working end-to-end micropayment system — from video detection in a browser extension to a confirmed Solana transaction viewable on-chain — built entirely during the hackathon. The pricing gate appears on real YouTube and Prime Video videos, real USDC moves between real devnet wallets every 5 seconds, and every single payment has a permanent transaction signature verifiable on Solana Explorer.
What we learned
How Solana's SPL token standard works — Associated Token Accounts, mint authorities, and transfer instructions using @solana/spl-token. How Chrome Manifest V3 service workers differ from background pages and the constraints around CORS, storage, and wallet injection. How to design a payment provider as a lazy-connecting singleton that handles network failures and devnet rate limits gracefully without crashing the server.
What's next for PayPerPlay
- Direct Phantom signing — payments come from the viewer's own Phantom wallet rather than a backend keypair, making it truly self-custodial
- Mainnet deployment with real USDC
- Creator dashboard showing real-time earnings and viewer analytics
- Additional platforms — Twitch, Vimeo, Netflix
- Payment channels for batching micropayments to reduce on-chain fees at scale
Built With
- chrome
- express.js
- node.js
- phantom
- solana
- sqlite
- typescript
- usdc
Log in or sign up for Devpost to join the conversation.