StreamFi is a decentralized Web3 entertainment platform that transforms movies into financial assets.
Users do not only watch content. They can watch, invest, earn, and help promote titles, while payments and revenue sharing are executed on-chain.
Final one-line positioning:
"StreamFi is a PayFi-powered Web3 platform where users invest in movies, pay per watch, and earn from every view in real time."
Watch, Pay, Earn, and Invest in content.
Traditional streaming keeps users as consumers only. StreamFi turns users into:
- Viewers
- Investors
- Promoters
Every interaction can create measurable financial value.
Creator uploads -> Users invest -> Movie releases -> Viewers pay while watching -> Revenue auto-splits -> Investors earn
- Viewers do not need to pre-buy full movies.
- Charging is based on watch duration.
- Payment settlement can happen continuously or in short intervals.
Benefits:
- Lower upfront risk for users
- Real-time monetization for creators
Each payment is split by smart contract rules.
Current split in this repository:
- Creator: 60%
- Investors: 30%
- Platform: 10%
No manual payout process is required once payment is received.
- The product vision is to tokenize movies into earning assets.
- Investors can hold revenue-linked positions similar to a movie marketplace.
Status: Concept and product direction are defined. Full NFT revenue tokenization is roadmap work.
- Reward mechanics for watching, reviewing, and sharing are part of StreamFi strategy.
Status: Billing and watch tracking primitives exist; full token reward engine is roadmap work.
Target model:
- Encrypted playback
- Wallet verification
- Device-aware access control
Status: This repository contains payment-gated playback flows; full wallet+device cryptographic binding is roadmap work.
- Upcoming movie entries can be published before release.
- Users can invest on-chain and creators can raise pre-release capital.
- Revenue sharing after release aligns creators and investors.
- Solidity smart contract:
StreamFiPayment - Functions include:
- movie registration
- investment
- pay-per-view settlement
- stream start / settle / stop
- automated payout splitting
- Next.js frontend (App Router)
- Wallet connection via RainbowKit + Wagmi
- Ethers integration for contract interactions
- Creator upload and viewer watch flow
- MongoDB for metadata persistence
- MongoDB GridFS for media and thumbnail file storage/streaming
Note:
- Product vision targets decentralized storage (for example IPFS).
- Current codebase uses MongoDB/GridFS in this implementation.
- EVM-compatible flow
- Current dApp wallet and UI configuration targets HashKey Chain Testnet (chainId 133)
- Hardhat config also includes local simulated networks and Sepolia support
- Free movies
- Token rewards
- Free NFTs
- Referral incentives
Goal: onboard users with earn-first behavior.
- Discord/Telegram integration
- Community voting on movie decisions and alternate endings
Goal: build emotional + financial participation.
- Free content (ads/sponsors)
- Premium content (pay-per-second)
Goal: gradual transition to a balanced paid ecosystem.
- Investors promote movies they have exposure to
- More views can increase shared revenue
Goal: decentralized built-in marketing engine.
Three hooks:
- Earn while watching
- Free early access
- Be part of creation and upside
- Real-time micropayment streaming
- Instant automated royalty distribution
- Movies as financial assets
- Fans can become investors
- Viral growth incentives
- Strong anti-piracy direction with wallet-bound access model
- Not a Netflix clone
- Not only a piracy solution
- A platform where users do not only consume content, they can earn from it
This repository has two main parts:
- Root: smart contracts, Hardhat config, deployment scripts
frontend/: Next.js dApp, APIs, media upload/stream routes, UI
Important folders:
contracts/-> Solidity contracts (StreamFiPayment.sol)scripts/-> deploy scriptsignition/modules/-> Hardhat Ignition deployment modulesfrontend/app/-> pages + API routesfrontend/components/-> UI and player componentsfrontend/lib/-> MongoDB and billing helpersfrontend/prisma/-> Prisma schema (MongoDB)
- Node.js 18+
- npm
- MongoDB connection string
- Wallet browser extension (for example MetaMask)
At repo root:
npm installInside frontend:
cd frontend
npm installCreate .env in project root for Hardhat/network usage:
SEPOLIA_RPC_URL=
SEPOLIA_PRIVATE_KEY=
HASHKEY_RPC_URL=https://testnet.hsk.xyz
HASHKEY_PRIVATE_KEY=Create .env.local in frontend/:
NEXT_PUBLIC_STREAMFI_CONTRACT_ADDRESS=
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
DATABASE_URL=Example deploy using script:
npx hardhat run scripts/deploy.ts --network hashkeyTestnetOr with Ignition module:
npx hardhat ignition deploy --network hashkeyTestnet ignition/modules/StreamFiPayment.tsAfter deployment, copy the contract address into frontend/.env.local as NEXT_PUBLIC_STREAMFI_CONTRACT_ADDRESS.
cd frontend
npm run devOpen http://localhost:3000.
- Connect wallet
- Register movie on-chain
- Upload media + thumbnail
- Save metadata to database
- Invest in a movie by sending value on-chain
- Receive proportional share distribution from viewer payments
- Watch content in player
- Usage is tracked and due amount is enforced
- Pending due can trigger settlement before continued playback
Contract: contracts/StreamFiPayment.sol
Highlights:
- Revenue split constants: 60/30/10
- Investment tracking per movie
- Stream lifecycle:
startStream(movieId)settleStream(movieId)stopStream(movieId)
- Direct payment path via
pay(movieId)
This repository already demonstrates core PayFi mechanics, but some vision items are still roadmap-level:
- Full movie NFT/revenue token marketplace
- Tokenized watch-to-earn reward engine
- Wallet+device cryptographic playback binding
- Complete decentralized storage pipeline (IPFS-first)
- Full DAO/community governance modules
ISC