State Variables
RoyaltyPolicyLRPStorage
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 LRP
IP_GRAPH
ROYALTY_MODULE
ROYALTY_POLICY_LAP
IP_GRAPH_ACL
Functions
constructor
royaltyModule
: The RoyaltyModule addressroyaltyPolicyLAP
: The RoyaltyPolicyLAP addressipGraphAcl
: The IPGraphACL address
initialize
accessManager
: The address of the protocol admin roles contract.
onLicenseMinting
ipId
: The ipId whose license is being minted (licensor)licensePercent
: The license percentage of the license being minted
onLinkToParents
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 minted
newRoyaltyStackLRP
: The royalty stack of the child ipId for LRP royalty policy
transferToVault
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address to transfer
- The amount of revenue tokens transferred
getPolicyRtsRequiredToLink
ipId
: The ipId of the IP assetlicensePercent
: The percentage of the license
- The amount of royalty tokens required to link a child to a given IP asset (always 0 for LRP)
getPolicyRoyaltyStack
ipId
: The ipId to get the royalty stack for
- Sum of the royalty percentages to be paid to all ancestors for LRP royalty policy
getPolicyRoyalty
ipId
: The ipId to get the royalty forancestorIpId
: The ancestor ipId to get the royalty for
- The royalty percentage between an IP asset and its ancestors via LRP
getTransferredTokens
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address to transfer
- The total lifetime revenue tokens transferred to a vault from a descendant IP via LRP
isSupportGroup
- True (LRP royalty policy supports working with groups)
Internal Functions
_getRoyaltyStackLRP
ipId
: The ipId to get the royalty stack for
- The royalty stack for a given IP asset for LRP royalty policy
_setRoyaltyLRP
ipId
: The ipId to set the royalty forparentIpId
: The parent ipId to set the royalty forroyalty
: The LRP license royalty percentage
_getRoyaltyLRP
ipId
: The ipId to get the royalty forancestorIpId
: The ancestor ipId to get the royalty for
- The royalty percentage between an IP asset and its ancestor via royalty policy LRP
_getRoyaltyPolicyLRPStorage
- The storage structure for the RoyaltyPolicyLRP
_authorizeUpgrade
newImplementation
: The address of the new implementation
Events
RevenueTransferredToVault
ipId
: The ipId of the IP assetancestorIpId
: The ancestor ipId of the IP assettoken
: The token address transferredamount
: The amount of tokens transferred
Security Considerations
The RoyaltyPolicyLRP contract implements several security measures:-
Access Control: Functions like
onLicenseMinting
andonLinkToParents
can only be called by the Royalty Module through theonlyRoyaltyModule
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.
Royalty Dilution Considerations
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:- Creator 1 - Registers IP1, mints an LRP license of 10%, and sells the license to Creator 2.
- Creator 2 - Registers IP2 as a derivative of IP1 and mints an LRP license of 20% for himself/herself.
- Creator 2 - Registers IP3 as a derivative of IP2 and promotes IP3 commercially in the market.