Skip to content

tosirano/SplitWav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🎡 SplitWav

Your music. Your splits. No middlemen.

SplitWav is a decentralized royalty distribution engine for independent musicians and producers. Upload your split sheet, deploy it as a smart contract, and every time money hits the contract β€” producers, songwriters, featured artists, and engineers get paid automatically. No labels skimming off the top. No "we'll sort it out later." Just math.


πŸ’‘ The Story

Every day, independent artists release music and shake hands on splits:

"60/40, right?" "Yeah bro, I got you."

Then the money comes in. And the calls stop getting answered.

In the Nigerian music industry alone, split disputes kill more collaborations than bad beats ever could. Producers wait months for their cut. Songwriters get forgotten. Featured artists get promises instead of payments.

SplitWav makes splits enforceable. Not by lawyers β€” by code.


How It Works

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Revenue Source     β”‚
                    β”‚  (DSP, Sync, Shows)  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚
                          USDC deposit
                               β”‚
                               β–Ό
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚                     β”‚
                    β”‚   SplitWav Contract  β”‚
                    β”‚                     β”‚
                    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
                    β”‚  β”‚  Split Sheet   β”‚  β”‚
                    β”‚  β”‚               β”‚  β”‚
                    β”‚  β”‚ Artist:  50%  β”‚  β”‚
                    β”‚  β”‚ Producer: 30% β”‚  β”‚
                    β”‚  β”‚ Writer:  15%  β”‚  β”‚
                    β”‚  β”‚ Engineer: 5%  β”‚  β”‚
                    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
                    β”‚                     β”‚
                    β””β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                       β”‚   β”‚   β”‚   β”‚
                       β–Ό   β–Ό   β–Ό   β–Ό
                    Auto-distributed to
                    each collaborator's
                    wallet instantly

Step 1 β€” The lead artist creates a SplitWav contract for a track or project, adding collaborators and their percentage splits.

Step 2 β€” All collaborators sign the contract on-chain, locking in the agreement. No one can change splits after everyone signs.

Step 3 β€” Revenue from any source (streaming payouts, sync licenses, merch, show fees) is sent to the contract address.

Step 4 β€” The contract automatically distributes funds to each collaborator based on their agreed percentage. No delays, no disputes, no "I forgot."


Contract Design

// ── Track Split Agreement ────────────────────────

TrackSplit {
    track_id: String,              // unique identifier for the track
    title: String,                 // "OBT (One Big Transaction)"
    lead_artist: Address,          // who created the split
    collaborators: Vec<Collaborator>,
    status: SplitStatus,           // Draft | PendingSigs | Active | Frozen
    total_distributed: i128,       // lifetime earnings distributed
    created_at: u64,
}

Collaborator {
    wallet: Address,
    role: String,                  // "Producer", "Songwriter", "Featured Artist"
    split_bps: u32,                // basis points (3000 = 30%)
    has_signed: bool,              // on-chain signature confirmation
    total_received: i128,          // lifetime earnings received
}

// ── Split Rules ──────────────────────────────────

// β€’ All splits must total exactly 10,000 bps (100%)
// β€’ Minimum split: 100 bps (1%)
// β€’ Maximum collaborators per track: 10
// β€’ Once all parties sign, splits are immutable
// β€’ Lead artist can void a draft before all signatures

Contract Functions

// ── Artist Functions ─────────────────────────────

fn create_split(title: String, collaborators: Vec<CollaboratorInput>) -> u32;
fn void_draft(split_id: u32);                    // only before all sign

// ── Collaborator Functions ───────────────────────

fn sign_split(split_id: u32);                    // confirm agreement
fn reject_split(split_id: u32);                  // decline and void

// ── Revenue Functions ────────────────────────────

fn deposit(split_id: u32, amount: i128);         // send revenue to split
fn distribute(split_id: u32);                    // trigger payout
fn auto_distribute(split_id: u32);               // deposit + distribute

// ── View Functions ───────────────────────────────

fn get_split(split_id: u32) -> TrackSplit;
fn get_my_splits(wallet: Address) -> Vec<TrackSplit>;
fn get_earnings(split_id: u32, wallet: Address) -> i128;
fn get_pending_balance(split_id: u32) -> i128;

The Platform

SplitWav isn't just a contract β€” it's a full platform for managing music money.

For Artists:

  • Create split agreements for individual tracks, EPs, or albums
  • Invite collaborators via wallet address or shareable link
  • Track lifetime earnings per track in a clean dashboard
  • Export payment history for tax and accounting

For Producers & Writers:

  • See all your active splits in one place
  • Get notified when revenue is deposited
  • Verify you're getting the right percentage β€” it's all on-chain
  • Build a verifiable track record of collaborations

For Labels & Distributors:

  • Integrate SplitWav via API to auto-route royalty payments
  • Reduce payment disputes and support tickets
  • Offer transparent splits as a feature to your roster

Tech Stack

Layer Technology
Smart Contracts Rust, Soroban SDK
Frontend Next.js 14, TypeScript, Tailwind CSS
Backend NestJS, PostgreSQL, TypeORM
Payments USDC on the network
Auth Wallet connect + email-based onboarding
Notifications Email + in-app (webhook support for labels)

Project Structure

splitwav/
β”‚
β”œβ”€β”€ contracts/
β”‚   β”œβ”€β”€ split-core/              # Main royalty split contract
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ lib.rs
β”‚   β”‚   β”‚   β”œβ”€β”€ split.rs         # Split creation & management
β”‚   β”‚   β”‚   β”œβ”€β”€ distribution.rs  # Revenue distribution logic
β”‚   β”‚   β”‚   β”œβ”€β”€ signing.rs       # Multi-party signature flow
β”‚   β”‚   β”‚   └── storage.rs       # On-chain state
β”‚   β”‚   └── Cargo.toml
β”‚   β”‚
β”‚   └── split-registry/          # Index of all splits (discovery)
β”‚
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ app/                     # Next.js app router
β”‚   β”‚   β”œβ”€β”€ dashboard/           # Artist dashboard
β”‚   β”‚   β”œβ”€β”€ splits/              # Split management pages
β”‚   β”‚   β”œβ”€β”€ track/[id]/          # Individual track view
β”‚   β”‚   └── api/                 # API routes
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ SplitCreator.tsx     # Split sheet builder UI
β”‚   β”‚   β”œβ”€β”€ CollaboratorList.tsx
β”‚   β”‚   β”œβ”€β”€ EarningsChart.tsx
β”‚   β”‚   └── SignatureFlow.tsx
β”‚   └── lib/
β”‚       β”œβ”€β”€ contract.ts          # Soroban contract client
β”‚       └── wallet.ts            # Wallet connection utils
β”‚
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ modules/
β”‚   β”‚   β”‚   β”œβ”€β”€ tracks/          # Track metadata
β”‚   β”‚   β”‚   β”œβ”€β”€ notifications/   # Email & webhook alerts
β”‚   β”‚   β”‚   └── analytics/       # Earnings analytics
β”‚   β”‚   └── services/
β”‚   └── migrations/
β”‚
└── docs/
    β”œβ”€β”€ for-artists.md
    β”œβ”€β”€ for-producers.md
    β”œβ”€β”€ api-reference.md
    └── label-integration.md

Getting Started

# Clone
git clone https://github.com/your-org/splitwav.git && cd splitwav

# Build contracts
cd contracts && cargo build --target wasm32-unknown-unknown --release

# Run frontend
cd ../app && npm install && npm run dev

# Run backend
cd ../backend && npm install && npm run start:dev

Quick Deploy (Testnet)

soroban contract deploy \
  --wasm target/wasm32-unknown-unknown/release/split_core.wasm \
  --source artist-wallet \
  --rpc-url https://soroban-testnet.stellar.org \
  --network-passphrase "Test SDF Network ; September 2015"

Roadmap

  • Split contract architecture & design
  • Multi-party signature flow
  • Revenue distribution engine
  • Frontend split builder UI
  • Artist dashboard with earnings analytics
  • Email notifications for deposits & signatures
  • Label/distributor API integration
  • Album-level splits (parent-child contracts)
  • ISRC metadata linking
  • Mobile app
  • Mainnet launch

Contributing

Music people and code people β€” we need both.

  1. Fork it
  2. Branch it (git checkout -b feat/your-thing)
  3. Build it
  4. Test it (cargo test)
  5. PR it

Read CONTRIBUTING.md for the full rundown.


License

MIT β€” See LICENSE


SplitWav β€” Split fair. Get paid. Keep making music.

About

Decentralized royalty distribution engine for independent musicians and producers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages