A Solana-based platform for tokenizing music and media royalty revenue streams. Artists can tokenize their future royalty revenue, allowing fans and investors to buy tokens and receive proportional distributions from streaming income.
- ✅ Royalty Token Issuance: Artists create tokenized royalty projects
- ✅ Token Purchase: Fans/investors buy royalty tokens with SOL
- ✅ Automatic Distribution: Streaming income automatically distributed to token holders
- ✅ Oracle Integration: Spotify API integration for automated royalty tracking (nice to have)
- ✅ Claim System: Token holders can claim their proportional share of royalties
Telegram: https://t.me/vvizardev
- Smart Contract: Anchor framework on Solana (
programs/royalty-tokenization/) - Backend: Node.js Express server with Solana integration (
backend/) - Frontend: React + Vite with wallet connection (
frontend/)
.
├── smart-contract/ # Anchor smart contract
│ └── royalty-tokenization/
│ └── src/lib.rs # Main program logic
├── backend/ # Express API server
│ ├── src/
│ │ ├── index.js # Main server
│ │ ├── routes/ # API routes
│ │ └── services/ # Oracle service
│ └── package.json
├── frontend/ # React + Vite app
│ ├── src/
│ │ ├── App.jsx # Main component
│ │ └── main.jsx # Entry point
│ └── package.json
├── Anchor.toml # Anchor configuration
└── README.md
See SETUP.md for detailed setup instructions.
- Rust (latest stable)
- Anchor framework
- Node.js 18+
- Solana CLI
# 1. Build the Anchor program
anchor build
# 2. Start local validator (in separate terminal)
solana-test-validator
# 3. Deploy the program
anchor deploy
# 4. Setup and start backend
cd backend
npm install
npm run dev
# 5. Setup and start frontend (in new terminal)
cd frontend
npm install
npm run dev- SETUP.md - Detailed setup and installation guide
- ARCHITECTURE.md - System architecture and data flow
- backend/README.md - Backend API documentation
- frontend/README.md - Frontend documentation
Creates a new royalty token project with configurable royalty percentage.
Allows users to purchase royalty tokens. SOL is transferred to treasury, tokens are minted.
Distributes streaming income to the treasury. Can be called by artist or authorized oracle.
Token holders claim their proportional share based on their token holdings.
GET /health- Health checkGET /api/projects- List all projectsGET /api/projects/:address- Get project detailsGET /api/royalties/:projectAddress- Get distribution historyGET /api/royalties/claimable/:wallet/:project- Get claimable amountPOST /api/oracle/distribute- Trigger royalty distributionPOST /api/oracle/spotify/fetch- Fetch Spotify streaming data
- PDA-based treasury for secure fund management
- Oracle authorization for automated distributions
- Checked arithmetic to prevent overflow
- Input validation on all functions
- Wallet connection (Phantom, Solflare)
- Project browsing and selection
- Token purchase interface
- Royalty claiming interface
- Modern, responsive UI
The platform includes an Oracle service that can:
- Fetch streaming data from Spotify API
- Calculate royalty distributions
- Automatically trigger distributions via cron jobs
- Support multiple royalty sources (extensible)
MIT
Contributions welcome! Please open an issue or submit a pull request.