Dstream
A decentralized peer streaming platform with granular incentivazation and censorship resistance!
Problem Statement
There is still much uncertainty about how streaming platforms are used and how creators are rewarded. Crypto offers a way to have precise control over streaming revenue and the costs paid by consumers. Another major problem with current streaming services is the restriction of content based on location and censorship.DStream is a decentralized platform for streaming and the creator economy. It combines real-time media synchronization, Web3 payments, and on-chain analytics into one smooth experience. It allows creators and audiences to host, join, and monetize live streaming sessions like music jam rooms, movie screenings, and collaborative listening parties without relying on centralized servers or middlemen. At its core, DStream changes traditional streaming by mixing real-time peer synchronization through WebSockets with blockchain transparency via Ethereum and Blockscout. This creates a clear, open, and fair system where creators are paid directly and users can check every transaction on-chain.Key Features:Decentralized Streaming Rooms Users can quickly create, join, and share streaming rooms. Playback controls such as play, pause, seek, and volume stay in sync for all participants using WebSocket channels. Rooms are saved on the backend and can be accessed through unique shareable URLs.Creator Monetization with PayPal USD (PYUSD) DStream uses PayPal USD (PYUSD), a stablecoin on the Ethereum Sepolia network. Viewers can tip creators directly from their wallets. Payments happen on-chain, are stable because they are tied to USD, and avoid traditional payment processing fees.On-Chain Transparency with Blockscout Every PYUSD transaction is tracked with the Blockscout API and SDK. The integrated dashboard shows total tips, a real-time transaction feed, and links to verified Blockscout pages. This replaces central analytics with verifiable on-chain data.Playlist and Media Management Users can build and save playlists for each room. Tracks can be added manually or imported from services like YouTube Music or Spotify. Playback can be controlled together or limited to the creator for one-way syncing.Web3 User Authentication DStream uses MetaMask for identity and wallet connections. The app automatically switches to the Ethereum Sepolia network to work with tipping. Room ownership and track uploads are linked to wallet addresses.Real-Time Collaboration A Node.js WebSocket server enables synchronized streaming. Everyone in the room experiences media changes instantly. Playback progress, current tracks, and seek positions stay synced between hosts and participants.Why Choose DStream? DStream addresses the growing disconnect between content creation and monetization. Unlike centralized platforms such as YouTube or Twitch, which control algorithms, ads, and payouts, DStream gives creators full ownership of their content and earnings. It brings together real-time streaming, blockchain payments, and transparent analytics into one platform.
Solution
DStream is a fully decentralized, full-stack Web3 streaming platform built to give creators total control over their streams, audience, and revenue - without relying on any centralized data stores or payment gateways. It merges real-time media synchronization with on-chain tipping and transparent analytics, creating a seamless blockchain-powered streaming experience. Tech Stack Overview Frontend: Next.js (App Router) + TypeScript Backend: Node.js + Express + WebSocket Blockchain: Ethereum Sepolia + Ethers.js Analytics: Blockscout SDK + REST API Database: MongoDB (metadata only) Dev Tools: Hardhat + FoundryFrontend — Next.js + TypeScript The frontend, built with Next.js and TypeScript, delivers a fast, reactive, and type-safe interface. Key Features: Room creation, joining, and routing Real-time media synchronization with ReactPlayer and WebSocket Wallet connection and blockchain interactions via Ethers.js On-chain tipping dashboard powered by Blockscout SDK Dynamic routing (/jam/[roomId]) for live sessions Cinematic UI using Framer Motion and TailwindCSS with a cyberpunk gradient theme Each room is a lightweight, serverless space for synchronized streaming and tipping.Backend — Node.js + Express + WebSocket The backend handles real-time communication and state management using Express and ws. Responsibilities: Maintain room states (connections, participants, metadata) Broadcast playback actions (play, pause, seek, volume) Persist playlists and room data in MongoDB Auto-sync playback for new joiners Lightweight, stateless WebSocket logic with no WebRTC overhead This ensures low-latency, real-time synchronization without complex signaling layers.Web3 Layer — Ethereum Sepolia + Ethers.js The Web3 integration enables instant, on-chain tipping using PayPal USD (PYUSD), an ERC-20 stablecoin on Sepolia. Payment Flow: User connects MetaMask via Ethers.js Network auto-switches to Sepolia PYUSD is transferred from viewer to creator The transaction hash is displayed live via Blockscout SDK Creators receive USD-equivalent tips instantly, all verifiable on-chain.Analytics and Transparency — Blockscout SDK + API Instead of traditional analytics, DStream uses Blockscout for full transparency. Capabilities: Real-time transaction popups via useNotification() and useTransactionPopup() hooks Live tipping dashboard fetching on-chain PYUSD transfers Links every transaction to Blockscout Explorer for public verification No centralized analytics - all creator earnings are transparently traceable on-chain.Development and Testing — Hardhat + Foundry Used for local simulation, contract debugging, and Sepolia deployment validation. Setup Highlights: Mock PYUSD transfers for testing Ethers.js and contract ABI compatibility checks Local EVM debugging with Foundry End-to-end frontend and blockchain transaction testing This ensured smooth integration before going live on Sepolia network.Notable Engineering Decisions WebSocket room persistence: In-memory Maps for instant sync without heavy signaling On-chain analytics only: Dropped custom analytics in favor of Blockscout APIs Auto network switching: Seamless MetaMask setup on Sepolia Stablecoin-only payments: PYUSD ensures predictable, fiat-equivalent tips Lightweight backend: Core logic offloaded to Web3 and transient WebSocketsPartner Role - How It Helped Blockscout - SDK + API - Real-time transaction notifications, tipping dashboard, and explorer integration PayPal USD (PYUSD) - Stablecoin - Enabled secure, USD-backed tipping without volatility Hardhat - Dev Framework - Simulated contract interactions and Sepolia deployment testingIn Summary DStream is more than a streaming app - it’s a prototype for the future of decentralized entertainment. It combines real-time interaction, on-chain payments, and transparent analytics into one experience. The stack is simple, scalable, and hackathon-friendly, yet powerful enough to evolve into a Web3-native creator economy platform.
Hackathon
ETHOnline 2025
2025
Contributors
- jjhbk
14 contributions