๐ธ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
CreatorCashout
among 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
Constants
The following constants are hard coded into the system, and they can only be changed via runtime upgrade
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
Condition
min_cashout_allowed <= new_max_cashout_allowed
must be respected ornew_min_cashout_allowed <= new_max_cashout_allowed
if both are specifiednew_min_cashout_allowed <= max_cashout_allowed
must be respected ornew_min_cashout_allowed <= new_max_cashout_allowed
if both are specifiednew_min_cashout_allowed <= MINIMUM_CASHOUT_ALLOWED_LIMIT
if specifiednew_max_cashout_allowed <= MAXIMUM_CASHOUT_ALLOWED_LIMIT
if specifiedorigin
must be root, i.e. the extrinsic must be dispatched via proposalstorage-pallet::upload_data_objects
preconditions must be verifieduploader_account
should be some account i.e. council #out-of-process or the proposer member controller account
Effect
max_cashout_allowed
set tonew_max_cashout_allowed
if this last value is specifiedmin_cashout_allowed
set tonew_min_cashout_allowed
if this last value is specifiedchannel_cashouts_enabled
updated to the the new value (if specified)commitment
value updated tonew_commitment
if specifiedstorage-pallet::upload_parameters(params)
effects are taken in place whereparams
is specified as follows:bag_id
is the Council Static Bagobject_creation_list
is thepayload_params.object_creation_list
bloat_bond_source_account_id
is thepayload_params.uploader_account
expected_data_size_fee
is thepayload_params.expected_data_size_fee
expected_data_object_state_bloat_bond
is 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
Condition
channel_id
: must refer to an existingchannel
channel
: must not have theCreatorCashout
feature pausedactor
: must be endowed with aRewardChannelReward
permissionchannel_cashout_enabled
: must betrue
channel_total_cashout + payout
amount of $JOY must be in the closed interval[min_cashout_allowed,max_cashout_allowed]
channel_total_cashout + payout
amount of $JOY must be transferrable from the Council Budgetpull_payout_element
must verify the merkle proof mechanism
Effect
payout
amount of $JOY is transferred from the Council Budget usable balance into thereward_account
usable balancecumulative_channel_reward
for channelchannel_id
is 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
Condition
channel_id
: must refer to an existingchannel
channel
: must not have the[CreatorCashout, ChannelFundTransfer]
features pausedactor
: must be endowed with[RewardChannelReward,WithDrawFromChannelBalance]
permissionschannel_cashout_enabled
: must betrue
channel_total_cashout + payout
amount of $JOY must be in the closed interval[min_cashout_allowed,max_cashout_allowed]
channel_total_cashout + payout
amount of $JOY must be transferrable from the Council Budgetpull_payout_element
must verify the merkle proof mechanism
Effect
payout
amount of $JOY is transferred from the Council Budget usable balance into thereward_account
usable balance first. After that they are transferred from thereward_account
into thedestination_account
in the following fashion:if channel is member-owned then the
payout
amount is transferred into the member controller account usable balanceif channel is curator/lead-owned the
payout
amount is burned from thereward_account
and minted into the Council budget Account
cumulative_channel_reward
for channelchannel_id
is increased bypayout
Last updated