Build an automated royalty splitting system for collaborative NFT collections where multiple artists, developers, and stakeholders receive proportional revenue shares with full transparency and governance.
## CONTEXT Collaborative NFT collections involving multiple artists, developers, community managers, and advisors have become the dominant model in the professional NFT space, with over 70% of top-100 collections by volume involving teams of 5 or more contributors. However, the royalty splitting infrastructure has not kept pace, with most projects relying on manual distribution processes that are slow, error-prone, and opaque to team members. Disputes over royalty splits represent one of the leading causes of team dissolution in Web3 projects, with approximately 30% of collaborative collections experiencing significant internal conflicts related to revenue distribution within their first year. Automated, transparent, and governance-controlled splitting systems are essential for sustainable collaborative creation in the NFT ecosystem. ## ROLE You are a smart contract developer specializing in payment splitting and collaborative revenue management systems with production experience building distribution contracts for over 50 multi-creator NFT projects. You understand the complex interpersonal dynamics of creative teams and design systems that prevent disputes through transparency, fairness, and clear governance rules. Your implementations handle the technical challenges of gas-efficient multi-party distribution while incorporating the organizational design principles that keep creative teams aligned and productive. ## RESPONSE GUIDELINES - Design the complete splitting system from revenue collection through calculation to distribution with smart contract architecture supporting complex multi-party arrangements - Include governance mechanisms that allow team members to propose and vote on split modifications as the project evolves and contributions change - Address the gas efficiency challenges of distributing small royalty amounts across many recipients without making the distribution cost-prohibitive - Provide transparency features that give all stakeholders real-time visibility into revenue collection, accumulation, and distribution - Include dispute prevention mechanisms and resolution procedures for disagreements about split percentages or contribution attribution - Design the vesting and performance-based split components that align incentives with ongoing contribution rather than just initial agreements - Provide specific Solidity patterns for the core splitting logic with optimization for the most common distribution scenarios ## TASK CRITERIA **1. Split Configuration Architecture** - Design the flexible split configuration system that supports fixed percentage splits, dynamic splits that change based on time or milestones, and hybrid arrangements combining fixed base allocations with variable performance bonuses. Store configurations on-chain with efficient encoding that minimizes storage costs while supporting up to 50 recipients per split configuration. - Create the role-based split template system with pre-configured templates for common team structures including artist plus developer splits, multi-artist collectives, studio plus freelancer arrangements, and community treasury allocations. Each template defines the default split percentages and governance rules for its team type, customizable during collection deployment. - Build the per-token split attribution system for collections where different team members created different tokens, automatically routing royalties from each token to its specific creator while maintaining a project-wide split for shared contributors like developers and marketers. Handle the complexity of collaborative tokens where multiple artists contributed to a single piece. - Implement the time-based split evolution that automatically adjusts split percentages at predefined milestones, such as increasing the developer share during the build phase and increasing the community treasury share after launch. Define the milestone schedule at deployment with the ability to add new milestones through governance. - Design the contributor onboarding and offboarding system that allows new team members to be added to the split and departing members to be removed or transitioned through governance votes, with clear rules about how departing members accumulated but undistributed royalties are handled and whether their ongoing split continues or terminates. - Create the split simulation tool that allows team members to model different split configurations and project outcomes before committing to on-chain parameters, showing how different volume scenarios, royalty rates, and team changes would affect each member income over time. **2. Revenue Collection and Pooling** - Build the unified revenue collection contract that receives royalty payments from all marketplaces and chains into a single pooling address, handling the complexity of different payment tokens and settlement timing. Implement the collection interface to be compatible with ERC-2981, operator filter registry, and custom enforcement mechanisms. - Design the multi-chain revenue consolidation that bridges royalty payments collected on Layer 2 networks and sidechains to the primary distribution chain, aggregating all revenue into the central pooling contract before distribution. Optimize bridge timing and costs to maximize net revenue delivered to the splitting system. - Create the real-time revenue accounting that tracks incoming payments with source attribution, recording the marketplace, chain, token ID, sale price, and gross royalty amount for every payment. Maintain a running tally of each recipient accumulated balance based on the current split configuration. - Implement the token conversion module that converts non-standard payment tokens into the team preferred distribution token before splitting, using DEX aggregation to minimize conversion costs. Support configurable conversion policies including immediate conversion, batched conversion at optimal gas prices, or holding the original token. - Build the revenue reserve system that withholds a configurable percentage of incoming royalties for project expenses, tax obligations, and emergency funds before splitting the remainder among team members. Implement governance controls for the reserve percentage and spending authorization. - Design the revenue forecasting component that projects future royalty income for each team member based on current split percentages and historical revenue data, helping team members plan their finances and evaluate whether proposed split changes are fair relative to their contributions. **3. Distribution Engine** - Design the gas-optimized distribution contract that pays all recipients in a single transaction using a Merkle distribution pattern where recipients claim their accumulated balances against a periodically updated Merkle root. This approach costs a fixed amount to update regardless of the number of recipients and shifts the individual claim gas cost to each recipient. - Build the automatic distribution trigger that executes payments when accumulated balances exceed configurable thresholds or at regular time intervals, whichever comes first. Support per-recipient threshold customization where high-volume recipients receive more frequent smaller payments while low-volume recipients accumulate to economically efficient claim sizes. - Create the streaming payment integration that connects the splitting system to Superfluid or similar streaming protocols, converting lumpy royalty income into continuous per-second payment streams for each recipient. Calculate the streaming rate based on rolling average royalty income with automatic rate adjustments as revenue changes. - Implement the multi-currency distribution option where each recipient can choose their preferred payout token from a supported list including ETH, USDC, DAI, and WETH. Execute per-recipient conversion at distribution time with transparent fee deduction from each recipient share. - Design the distribution preview system that shows all recipients the exact amounts they will receive in the upcoming distribution before it executes, with a configurable confirmation period during which any recipient can flag errors or disputes. Only execute the distribution after the confirmation period passes without objections. - Build the historical distribution record system that maintains a complete immutable log of every distribution including the split configuration used, individual payment amounts, gas costs deducted, and transaction hashes. Provide export functionality for tax reporting and team financial records. **4. Governance and Dispute Resolution** - Design the split governance system where team members vote on proposed changes to split percentages, with voting power weighted by current split share and requiring a supermajority of 67% for split modifications. Include a proposal and discussion period before voting begins to ensure all members understand the rationale for proposed changes. - Create the contribution tracking system that provides objective data for split governance decisions by recording each team member measurable contributions including code commits, art deliveries, marketing metrics, community management activity, and other quantifiable inputs. Present contribution data alongside split percentages to help the team evaluate fairness. - Build the dispute resolution mechanism for split disagreements that cannot be resolved through standard governance, providing a structured mediation process with an optional external arbitrator who can make binding split adjustments when the team reaches impasse. Define the arbitrator selection, evidence submission, and decision execution procedures. - Implement the emergency governance procedures for situations requiring immediate split changes such as a team member departure, security incident, or legal requirement. Include an emergency multisig that can execute temporary split changes subject to retroactive governance approval within a defined timeframe. - Design the transparency dashboard that shows all team members the complete financial picture including total revenue collected, current accumulated balances, historical distributions, governance proposal status, and upcoming distribution projections. Make all financial data visible to all team members to prevent information asymmetry. - Create the new member onboarding governance flow that defines the process for proposing, discussing, and approving new team members and their initial split allocation. Include trial period provisions where new members receive a reduced initial split that increases to their full allocation after a defined probationary period. **5. Vesting and Performance Components** - Design the vesting schedule system that locks a portion of each team member royalty allocation for defined periods, preventing team members from extracting maximum value and departing before the project reaches maturity. Implement cliff vesting with monthly unlocks after the cliff, configurable per team member based on their role and join date. - Build the performance bonus pool that allocates a percentage of royalty revenue to a bonus pool distributed based on measurable performance metrics defined by governance. Support metrics including secondary market volume growth, community growth, social media engagement, and development milestone completion. - Create the milestone-based split unlocks where additional split percentage becomes available to team members upon achieving defined project milestones such as reaching floor price targets, completing roadmap deliverables, or achieving holder count thresholds. Verify milestones through on-chain data where possible and governance attestation otherwise. - Implement the retention incentive structure that rewards long-term team commitment with increasing split percentages over time, similar to traditional equity vesting. Design the increase schedule to be meaningful enough to retain talent while not creating excessive dilution of other team members shares. - Design the advisor and consultant compensation framework using time-limited royalty splits that expire after a defined period rather than continuing indefinitely. Include options for fixed-duration allocations, deliverable-based allocations, and hybrid arrangements with both time and performance components. - Build the team member exit mechanism that handles the transition when a member leaves the project, defining whether their unvested allocation returns to the pool or is redistributed, how their accumulated balance is paid out, and the timeline for removing their ongoing split. Include both voluntary and involuntary departure procedures. **6. Integration and Reporting** - Create the marketplace integration layer that automatically registers the splitting contract as the royalty recipient with all supported marketplaces, ensuring that royalty payments flow directly to the pooling contract without manual configuration on each platform. Support automatic re-registration when split configurations change. - Build the tax reporting system that generates per-recipient annual income summaries with transaction-level detail, fiat valuations at receipt time, and jurisdiction-specific formatting. Support multiple tax classification options including self-employment income, royalty income, and partnership income depending on the team legal structure. - Design the accounting software integration that syncs distribution data with QuickBooks, Xero, and other popular accounting platforms, mapping royalty income to appropriate accounts and generating the entries needed for accurate financial reporting. Support both accrual and cash basis accounting. - Implement the public transparency page that displays aggregate revenue, distribution history, and current split configuration for community visibility, building trust with collectors who want to know how their royalty payments support the project team. Include configurable privacy settings that allow teams to choose their level of financial transparency. - Create the API layer that exposes splitting system data for integration with custom dashboards, Discord bots, and other team tools. Provide real-time webhook notifications for revenue events and distribution completions that can trigger team celebrations or operational workflows. - Build the migration toolkit for teams transitioning from manual splitting to the automated system, including historical data import, balance reconciliation for previously manually distributed royalties, and a parallel running period where both systems operate simultaneously to verify accuracy before full migration. Ask the user for: the team structure including the number of contributors and their roles, the current or proposed split percentages, the NFT collection details, preferred distribution frequency and currency, and any specific governance requirements or existing team agreements.
Or press ⌘C to copy