Learn about custom royalty policies that can be created for specific use cases
There can be many flavors and variations of royalty distribution rules as we observe in the real world. The same can be expected onchain. Whenever a use case requires unique and specific royalty rules, then those set of rules can be registered as an External Royalty Policy.
It is a smart contract that inherits a specific interface called IExternalRoyaltyPolicy
, which defines the view function below:
After developing your smart contract make sure it inherits the interface above and you can register your new External Royalty Policy by calling registerExternalRoyaltyPolicy
function in RoyaltyModule.sol.
Let’s follow an example of a new External Royalty Policy called “Policy X”.
An IPA owner decides the royalty policy he/she wants to allow the IP to be remixed with. There are multiple options of royalty rules that can be chosen such as LAP, LRP and other External Royalty Policies. Let’s say the user decides to mint a license token with “Policy X”. After that, IP2 remixes IP1 and IP3 remixes IP2 and we have the situation as the image below:
Every time there is a remix - the link between the parent and derivative has 2 data points associated:
Following the example, when each remix is made and during the onLinkToParents
function call in RoyaltyModule.sol, the function getPolicyRtsRequiredToLink
is called on the “Policy X” address.
It should return the % of derivative’s royalty tokens that the royalty policy demands for the link to happen. That share of royalty tokens are sent to the “Policy X” contract. In the example case:
There are two ways in which an External Royalty Policy can redistribute value back to its users:
Let’s explore both in the context of “Policy X”. Let’s say that from the 50% of RT3 token supply “Policy X” received - 40% are kept in the “Policy X” contract and 10% are sent to an ancestor royalty vault (IP1).
Now let’s imagine there is a 1M payment made to IP3 - an example of how the flow would be:
From the 1M WIP inflow to IP3 Royalty Vault:
claimByTokenBatchAsSelf
functionLearn about custom royalty policies that can be created for specific use cases
There can be many flavors and variations of royalty distribution rules as we observe in the real world. The same can be expected onchain. Whenever a use case requires unique and specific royalty rules, then those set of rules can be registered as an External Royalty Policy.
It is a smart contract that inherits a specific interface called IExternalRoyaltyPolicy
, which defines the view function below:
After developing your smart contract make sure it inherits the interface above and you can register your new External Royalty Policy by calling registerExternalRoyaltyPolicy
function in RoyaltyModule.sol.
Let’s follow an example of a new External Royalty Policy called “Policy X”.
An IPA owner decides the royalty policy he/she wants to allow the IP to be remixed with. There are multiple options of royalty rules that can be chosen such as LAP, LRP and other External Royalty Policies. Let’s say the user decides to mint a license token with “Policy X”. After that, IP2 remixes IP1 and IP3 remixes IP2 and we have the situation as the image below:
Every time there is a remix - the link between the parent and derivative has 2 data points associated:
Following the example, when each remix is made and during the onLinkToParents
function call in RoyaltyModule.sol, the function getPolicyRtsRequiredToLink
is called on the “Policy X” address.
It should return the % of derivative’s royalty tokens that the royalty policy demands for the link to happen. That share of royalty tokens are sent to the “Policy X” contract. In the example case:
There are two ways in which an External Royalty Policy can redistribute value back to its users:
Let’s explore both in the context of “Policy X”. Let’s say that from the 50% of RT3 token supply “Policy X” received - 40% are kept in the “Policy X” contract and 10% are sent to an ancestor royalty vault (IP1).
Now let’s imagine there is a 1M payment made to IP3 - an example of how the flow would be:
From the 1M WIP inflow to IP3 Royalty Vault:
claimByTokenBatchAsSelf
function