Overview
Co-produced beats need automatic on-chain revenue splitting. When a producer uploads a beat, they should be able to specify up to 3 collaborator addresses with associated basis point shares. The contract distributes earnings proportionally on every sale.
Acceptance Criteria
Example
// Beat uploaded with 60/40 split between two producers
upload_sample(
uploader, // gets 60% of producer cut (54% of sale)
...,
collaborators: vec![
Collaborator { address: collab, share_bps: 4000 }, // 40% of producer cut (36% of sale)
]
)
Storage Consideration
Store collaborators as part of SampleData or as a separate DataKey::Collaborators(sample_id) entry to keep the main struct lean.
Overview
Co-produced beats need automatic on-chain revenue splitting. When a producer uploads a beat, they should be able to specify up to 3 collaborator addresses with associated basis point shares. The contract distributes earnings proportionally on every sale.
Acceptance Criteria
Collaboratorstruct:{ address: Address, share_bps: u32 }upload_sampleaccepts optionalcollaborators: Vec<Collaborator>purchase_licensedistributes producer cut proportionally across all collaboratorswithdraw_earningsExample
Storage Consideration
Store collaborators as part of
SampleDataor as a separateDataKey::Collaborators(sample_id)entry to keep the main struct lean.