πΈCreator Payouts
Scaleable governance powered creator payouts
Introduction
The council may find it appropriate to reward some channels based on various merits, such as most viewed content, etc... The payout functionality allows the channel owner (or a content actor with sufficient permission) to cash out a particular sum of JOY rewarded by the council to the channel. This document will discuss the runtime design of it. For how to steps please refer to gleev documentation
Concepts
Payout & Payouts Commitment
By payout amount we mean the amount of $JOY the council has decided to award to a particular channel at a particular point in time. New payouts will be added as time passes via council proposals. By cumulative payout earned, we will refer to the cumulative amount of payouts awarded by the council to a particular channel since the genesis block. Herein we will refer to as payment element the triple consisting of:
channel id
cumulative payout earned
human-readable reason for the latest payout added At any given time the set of payment elements (representing the channel awarded by the council with the respective payout amounts) is stored in the content pallet chain state as its Merkle proof root hash. This value is called payouts commitment
Claim
By claim we refer to the action of the channel owner (or a delegate) to claim and cash out the payout. The delegate can be whoever has sufficient permission to perform this action. From here on we'll say that a claim is made by the channel to avoid distinguishing between owner & non-owner. The channel can claim the amount via Merkle proof verification. In particular, the claiming at a particular block height is allowed if:
The payment element provided by the channel must be verified via Merkle proof verification against the payouts commitment value
The claiming channel must not have
CreatorCashoutamong its paused featuresThe payout amount must be in the range
[MinCashoutAllowed, MaxCashoutAllowed](see param section)The channel is not being transferred to another owner
The actor doing the claiming has sufficient permissions, as explained previously. Specific permission references are described in the next section
Parameters
The following are mutable parameters updated via council proposal
PayoutsCommitment
Hash
Payouts commitment hash value at any given time
MinCashoutAllowed
Balance
Minimum amount of JOY a channel is allowed to cash out at any given time
MaxCashoutAllowed
Balance
Maximum amount of JOY a channel is allowed to cash out at any given time
CashoutEnabled
boolean
Whether payout claiming is enabled or not
Constants
The following constants are hard coded into the system, and they can only be changed via runtime upgrade
MIN_CASHOUT_ALLOWED
minimum payout amount that a channel is allowed to cash out
fill-in
MAX_CASHOUT_ALLOWED
maximum payout amount that a channel is allowed to cash out
fill-in
CHANNEL_CASHOUTS_ENABLED
Whether payout claiming is enabled or not
TRUE
Extrinsics
Payout Parameters Update
Allows the council to update parameters that regulate the action of claiming a payout via a proposal. This also allows the council to set a new value for the payouts commitment, thus endowing new payouts to channels
Parameters
new_payout_commitment
hash for the merkle root (optional)
object_creation_list
list of (ipfs_id, object_mb_size) containing information about object size and creation
uploader_account
account from which all the expenses for the storage upload are charged to
expected_data_size_fee
expected price for mb, must match the storage-pallet::data_size_fee value
expected_data_object_state_bloat_bond
expected bloat bond for storage occupation. Must match the storage-pallet::data_object_state_bloat_bond value
new_min_cashout_allowed
minimum amount that a channel is allowed to cash out (optional)
new_max_cashout_allowed
maximum amount that a channel is allowed to cash out (optional)
channel_cashouts_enabled
whether or not to enable the channel payouts functionality (optional)
Condition
min_cashout_allowed <= new_max_cashout_allowedmust be respected ornew_min_cashout_allowed <= new_max_cashout_allowedif both are specifiednew_min_cashout_allowed <= max_cashout_allowedmust be respected ornew_min_cashout_allowed <= new_max_cashout_allowedif both are specifiednew_min_cashout_allowed <= MINIMUM_CASHOUT_ALLOWED_LIMITif specifiednew_max_cashout_allowed <= MAXIMUM_CASHOUT_ALLOWED_LIMITif specifiedoriginmust be root, i.e. the extrinsic must be dispatched via proposalstorage-pallet::upload_data_objectspreconditions must be verifieduploader_accountshould be some account i.e. council #out-of-process or the proposer member controller account
Effect
max_cashout_allowedset tonew_max_cashout_allowedif this last value is specifiedmin_cashout_allowedset tonew_min_cashout_allowedif this last value is specifiedchannel_cashouts_enabledupdated to the the new value (if specified)commitmentvalue updated tonew_commitmentif specifiedstorage-pallet::upload_parameters(params)effects are taken in place whereparamsis specified as follows:bag_idis the Council Static Bagobject_creation_listis thepayload_params.object_creation_listbloat_bond_source_account_idis thepayload_params.uploader_accountexpected_data_size_feeis thepayload_params.expected_data_size_feeexpected_data_object_state_bloat_bondis thepayload_params.expected_data_object_state_bloat_bon
Channel Reward Claim
Allow a channel to claim a payout and have the $JOYs deposited into its reward_account
Parameters
actor
either a member, lead or curator claiming the payout
proof
merkle proof used for verifying whether the payout the channel is claiming is legit or not
pull_payment_item
the information containing the payout plus some other data used in the validation process and also the channel_id for which the payout is destined to
Condition
channel_id: must refer to an existingchannelchannel: must not have theCreatorCashoutfeature pausedactor: must be endowed with aRewardChannelRewardpermissionchannel_cashout_enabled: must betruechannel_total_cashout + payoutamount of $JOY must be in the closed interval[min_cashout_allowed,max_cashout_allowed]channel_total_cashout + payoutamount of $JOY must be transferrable from the Council Budgetpull_payout_elementmust verify the merkle proof mechanism
Effect
payoutamount of $JOY is transferred from the Council Budget usable balance into thereward_accountusable balancecumulative_channel_rewardfor channelchannel_idis increased bypayout
Claim And Withdraw Channel Reward
Allow a channel to claim a payout and have the $JOYs deposited into the controller account if the channel is member-owned otherwise funds go into the Council Budget for non member-owned channels
Parameters
actor
either a member, lead or curator claiming the payout
proof
merkle proof used for verifying whether the payout the channel is claiming is legit or not
pull_payment_item
the information containing the payout plus some other data used in the validation process and also the channel_id for which the payout is destined to
Condition
channel_id: must refer to an existingchannelchannel: must not have the[CreatorCashout, ChannelFundTransfer]features pausedactor: must be endowed with[RewardChannelReward,WithDrawFromChannelBalance]permissionschannel_cashout_enabled: must betruechannel_total_cashout + payoutamount of $JOY must be in the closed interval[min_cashout_allowed,max_cashout_allowed]channel_total_cashout + payoutamount of $JOY must be transferrable from the Council Budgetpull_payout_elementmust verify the merkle proof mechanism
Effect
payoutamount of $JOY is transferred from the Council Budget usable balance into thereward_accountusable balance first. After that they are transferred from thereward_accountinto thedestination_accountin the following fashion:if channel is member-owned then the
payoutamount is transferred into the member controller account usable balanceif channel is curator/lead-owned the
payoutamount is burned from thereward_accountand minted into the Council budget Account
cumulative_channel_rewardfor channelchannel_idis increased bypayout
Last updated