StreamVault

StreamVault: Pay artists instantly per play. Real-time settlements, zero middlemen.

StreamVault

Created At

ETHOnline 2025

Project Description

StreamVault: Decentralized Music Streaming with Instant Artist Payments

The Problem Spotify pays artists 3-6 months after streams, takes 30%+ fees, and offers zero transparency. Artists earn fractions of a penny per stream with no control over splits. Listeners have no direct connection to artists they support.

Our Solution StreamVault enables instant payments to artists for every play. Stream a song, artist gets paid immediately. No middlemen, no delays, complete transparency.

How It Works Artists: Upload tracks, set your price-per-play, configure revenue splits with collaborators, get paid instantly, withdraw anytime. Listeners: Connect wallet (email works), deposit funds, stream music, payments happen automatically.

Key Benefits Instant Payments - Seconds, not months Artist-Set Pricing - You decide what your music is worth Transparent Splits - Smart contracts auto-distribute to collaborators No Platform Fees - 100% goes to creators True Ownership - Censorship-resistant, permissionless

What Makes This Different vs Spotify: Instant payments, artist-set prices, no 30% platform cut, full transparency vs NFT Platforms: Pay-per-stream (not one-time sales), accessible to everyone, ongoing revenue vs Web2: Permissionless, censorship-resistant, no data surveillance

How it's Made

How StreamVault is Built StreamVault is a full-stack decentralized application built on Base Sepolia using Solidity smart contracts, Next.js, and decentralized storage. The core architecture consists of three main contracts: StETH (an ERC20 token representing streaming credits with 18 decimals), SimpleVault (handles ETH ↔ stETH conversion at 1:1 ratio for easy onboarding), and StreamPaymentV2 (the payment engine that manages song registration, user deposits, play settlements, and artist earnings).

We chose Base for its low transaction fees (critical for micropayments like 0.0001 stETH per stream) and fast finality, making instant artist payments economically viable. The smart contracts implement a dual payment model: users can either pre-deposit stETH into the contract or approve the contract to pull payments on-demand. When a song is played, the relayer backend (using the artist's private key) calls settlePlayFromWallet() which burns stETH from the listener and credits the artist's earnings mapping on-chain. Revenue splits are stored in Postgres and distributed automatically by the backend when settlements occur - we went with off-chain split storage to save gas costs while keeping song ownership and pricing immutably on-chain.

Artists can claim accumulated earnings anytime via claimEarnings() which mints fresh stETH to their wallet. The frontend uses Next.js 15 App Router with Privy for wallet abstraction, enabling email-based wallets so users don't need MetaMask or crypto knowledge. We integrated Wagmi and Viem for blockchain interactions and TailwindCSS + shadcn/ui for the interface. Music files and cover art are uploaded to Cloudflare R2 (S3-compatible object storage) which provides decentralized, permanent hosting with public URLs. The upload flow stores metadata in Postgres, uploads assets to R2, then calls registerSong() on the smart contract to create an immutable on-chain record linking the song ID to artist address and price.

One particularly hacky solution: we initially struggled with StETH ownership - SimpleVault needed it to mint tokens on deposits, but StreamPaymentV2 needed it to burn tokens on settlements. Rather than deploying a complex delegated mint/burn system, we simply made StreamPaymentV2 the owner and let it handle all minting/burning for both deposit and payment flows. The relayer private key is the same as the deployer, simplifying the architecture while maintaining security since all critical state (balances, earnings, song data) lives on-chain where it can't be tampered with.

The result is a seamless experience: artists upload once, listeners click play, payments happen instantly in the background, and everyone can verify the entire history on-chain. Gas costs are minimized by batching metadata off-chain while keeping financial state on-chain, and Base's low fees make per-stream micropayments actually viable. The entire stack - from wallet connection to revenue distribution - is designed for mainstream users who don't know or care about blockchain, they just want to stream music and support artists fairly.

background image mobile

Join the mailing list

Get the latest news and updates