The RoyaltyPolicyLRP (Liquid Relative Percentage) contract defines the logic for splitting royalties for a given IP asset using a liquid relative percentage mechanism. It manages the royalty relationships between IP assets and their ancestors, allowing for the transfer of revenue tokens to the appropriate royalty vaults.
Storage structure for the RoyaltyPolicyLRP containing:
royaltyStackLRP
: Sum of the royalty percentages to be paid to all ancestors for LRP royalty policyancestorPercentLRP
: The royalty percentage between an IP asset and a given ancestor for LRP royalty policytransferredTokenLRP
: Total lifetime revenue tokens transferred to a vault from a descendant IP via LRPThe address of the IP Graph precompile contract that tracks relationships between IPs.
The address of the Royalty Module contract.
The address of the RoyaltyPolicyLAP contract.
The address of the IP Graph Access Control List contract.
Constructor for the RoyaltyPolicyLRP contract.
Parameters:
royaltyModule
: The RoyaltyModule addressroyaltyPolicyLAP
: The RoyaltyPolicyLAP addressipGraphAcl
: The IPGraphACL addressInitializer for this implementation contract.
Parameters:
accessManager
: The address of the protocol admin roles contract.Executes royalty related logic on minting a license.
Parameters:
ipId
: The ipId whose license is being minted (licensor)licensePercent
: The license percentage of the license being mintedExecutes royalty related logic on linking to parents.
Parameters:
ipId
: The children ipId that is being linked to parentsparentIpIds
: The parent ipIds that the children ipId is being linked tolicenseRoyaltyPolicies
: The royalty policies of the licenseslicensesPercent
: The license percentage of the licenses being mintedReturns:
newRoyaltyStackLRP
: The royalty stack of the child ipId for LRP royalty policyTransfers to vault an amount of revenue tokens claimable via LRP royalty policy.
Parameters:
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address to transferReturns:
Returns the amount of royalty tokens required to link a child to a given IP asset.
Parameters:
ipId
: The ipId of the IP assetlicensePercent
: The percentage of the licenseReturns:
Returns the LRP royalty stack for a given IP asset.
Parameters:
ipId
: The ipId to get the royalty stack forReturns:
Returns the royalty percentage between an IP asset and its ancestors via LRP.
Parameters:
ipId
: The ipId to get the royalty forancestorIpId
: The ancestor ipId to get the royalty forReturns:
Returns the total lifetime revenue tokens transferred to a vault from a descendant IP via LRP.
Parameters:
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address to transferReturns:
Returns whether the royalty policy supports working with groups.
Returns:
Returns the royalty stack for a given IP asset for LRP royalty policy.
Parameters:
ipId
: The ipId to get the royalty stack forReturns:
Sets the LRP royalty for a given link between an IP asset and its ancestor.
Parameters:
ipId
: The ipId to set the royalty forparentIpId
: The parent ipId to set the royalty forroyalty
: The LRP license royalty percentageReturns the royalty percentage between an IP asset and its ancestor via royalty policy LRP.
Parameters:
ipId
: The ipId to get the royalty forancestorIpId
: The ancestor ipId to get the royalty forReturns:
Returns the storage struct of RoyaltyPolicyLRP.
Returns:
Hook to authorize the upgrade according to UUPSUpgradeable.
Parameters:
newImplementation
: The address of the new implementationEmitted when revenue tokens are transferred to a vault.
Parameters:
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address transferredamount
: The amount of tokens transferredThe RoyaltyPolicyLRP contract implements several security measures:
Access Control: Functions like onLicenseMinting
and onLinkToParents
can only be called by the Royalty Module through the onlyRoyaltyModule
modifier.
Reentrancy Protection: The nonReentrant
modifier is used on functions that handle token transfers to prevent reentrancy attacks.
Pausability: The contract can be paused in emergency situations using the whenNotPaused
modifier.
Safe Token Transfers: The contract uses OpenZeppelin’s SafeERC20 library to ensure safe token transfers.
Upgradability: The contract is upgradable using the UUPS pattern, with upgrade authorization restricted to the protocol admin.
Input Validation: The contract validates inputs and checks for edge cases, such as preventing transfers between the same IP.
The LRP (Liquid Relative Percentage) royalty policy allows each remixed IP to receive a percentage of the revenue generated by its direct derivatives. However, it’s important to understand the potential dilution of royalties as more derivatives are created between two IPs.
This dilution can reduce the earnings of the original IP creator as more layers of derivatives are added. For example:
The earnings for Creator 1 are diluted because they will only receive 10% of the 20% royalties from IP3, resulting in an effective royalty of 2%. If Creator 2 had chosen to promote IP2 instead, Creator 1 would have earned 10% directly, avoiding this dilution.
In contrast, the LAP (Liquid Absolute Percentage) royalty policy enforces a fixed percentage on every descendant IP, protecting the original creator from dilution.