atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Revenue Split Design

Open dmtrjsg opened this issue 2 years ago • 1 comments

Issue to encapsulate design work on Revenue Splits

dmtrjsg avatar Nov 22 '22 17:11 dmtrjsg

Hi @mrbovo.eth regarding Revenue splits:

  1. when Creator plans a revenue split to start in the future (so not immidiatelly but rather a few/many days later) - is the transaction for this "planning" action made at the time when Creator creates this plan?

  2. When the day of revenue split start comes do I have to manually start it as a creator or is it started automatically? Do I have to do another transaction here?

  3. When as a Creator I will receive my share of the revenue - at the time of setting the revenue split in the future? or on the day that it actually starts? MrKubu — Today at 7:22 PM

  4. As I understand when the revenue split ends Creator has to (still) end it manually with a transaction? mrbovo.eth — Today at 8:33 PM 1 - 2 : CC issues revenue split in one transaction, and it is started automatically the block is scheduled to start 3: The creator already has revenue to distribute: specifically this should come from the channel treasury account (for example). So as a creator I (having already JOY to distribute) issue a revenue split specifying its:

  • timeline
  • amount of JOY I want to distributed 4 Revenue split timeline: |- - - - - -|—————————————|- - - - > A. B. C

period A is idle time between the block the rev. split issued and the block it starts period B is when CRT holders can cash out dividends ( and stake CRT) period C (i.e basically after split is ended) is when CC can finalize (i.e. close) the split and stakers can unstake their amount MrKubu — Today at 9:11 PM Thank you for your answers 🙇 OK Maybe I wrongly asked the 3rd one. 3. I'm a creator. I have tokens in channel treasury account. I start the revenue split and set the timeline and the amount I want to distribute from the channel treasury - lets say its 1000 JOY. Then there is the split - lets say for the sake of this example 80% goes to me, and 20% goes to holders as those are the values I set when creating the token. So I as a creator am eligible to cash out 800JOY ( 80%) from this channel treasury to my wallet. 👆❓QUESTION: If the split start is set to a date in the future and I make only one transaction at the beginning of planning phase ("period A" in your graph) - do I receive the 800JOY immidiatelly after the transaction or do I receive it at the beginning of "period B" ? mrbovo.eth — Today at 9:56 PM You will receive the 800 JOY immediately mrbovo.eth — Today at 9:57 PM before the split starts

dmtrjsg avatar Nov 22 '22 17:11 dmtrjsg

The video update overview of the final hi-fi work for revenue shares is here 👇 The video has 3 parts:

  1. Overview of page, user stories and RWD
  2. Outcomes from asking users about their expectations
  3. More detailed explanation about components for Developers 🔴 If you are not a developer you don't have to watch the whole update just the first two parts 🙌

🎥 Loom video: https://www.loom.com/share/ddbcab78b88b4370a46902c1411379e1 📄 Figma changelog: https://www.figma.com/file/OuywwClsegx2eotkii4ea4/CRT-Creator?node-id=670%3A98986&t=iGMASyNB4Vo8K9YB-4

KubaMikolajczyk avatar Nov 28 '22 11:11 KubaMikolajczyk

Nice work, @KubaMikolajczyk a few follow up comments:

Disclaimer: Overall it was hard for me to review it as I didn't have a way to gauge the nuances of this module from the design chat, and the info in the CRT tracker issue was not covering Rev Splits. I'm also not 100% sure how the revenue split is calculated for holders.

Few questions to @ignazio-bovo

  1. How is it calculated per holder?
  2. Is there a 100% distribution or is it somehow proportionate to tokens in circulation/ staked. Since this part did not include the holder side hard to guess. Can you pls share the formula in this issue and share a link here.
  3. Also can there be multiple revenue splits concurrently? If we have some holders not unstaked/ claimed revenue, can a new "round" be started?
  4. Can rev split be closed even tho some holders have not unstaked their tokens/ claimed their earnings? Can revenue earned be claimed by token holders after rev split is closed?

@KubaMikolajczyk

Dashboard widget:

  1. Seems like it will need to have 4 separate views reflecting 4 separate states. Inactive, Planned /Due To Start in the Future, Active/Staking In Progress, Ended/Unstaking.
  2. I would focus this widget only on high level stats, like ratio of staked/ eligible (unstaked/ remain to unstake) and ETA till stage completion for active split.
  3. Not sure if we need to surface individual holders to the top level, as I cannot see how this may lead to any actions to be done by the creator. So suggest to remove this to trim extra scope.

Tab content:

  1. Widget: ~For rev share split it would be sufficient to only show how much holders get, so we don't need to show 2 figures. In your example it can be "Holders get 20%" (or up to.. if allocation is not fully distributed, tbc). Same applies to top level widget shown on the main dashboard.~ on a second thought I think showing both figures is good.
  2. Progress widget is a powerful visualisation ~I wonder if that would not be better to have it show three progress bars: Staked / Earned/ Withdrawn. Then a single glance on it would answer everything creator would be interested in on a single view. I am not pushing for this but just a thought..~ good to have it display total earnings out of possible.
  3. I actually wonder if we need to have the list of stakers on an individual level.. Probably could drop that for the first version Do we envision token creators communicating individually with each token holder and enticing them to partake in splits one-by-one? if yes, then we need a way to show the ones that have not staked but elegible/ or have not unstaked but earned. As these are the ones creator would want to reach out to so they do an action if they are active with their community.

dmtrjsg avatar Nov 28 '22 17:11 dmtrjsg

This looks really nice, coming together well, I don't really have anything to add here in terms of problems or improvements, just to remind us all to actively work to restrict scope as much as possible 🙏 .

bedeho avatar Nov 28 '22 21:11 bedeho

Revenue split

Description

Allows the Content Creator to redistributed channel profits to himself and to shareholders (CRT holders) via a dividends (revenue split) distribution process

Actors

  • CC : content creator (aka Token owner) (exactly one per token)
  • CRT Member : Joystream Member who has a valid CRT account (zero or more per token)

Timeline

  1. CC issue revenue split by calling the issue_revenue_split extrinsic
  2. CRT Member can stake some of his CRTs and claim dividends by means of the participate_in_revenue_split extrinsic
  3. After the staking period is over, the CRT member can unstake his CRTs
  4. CC finalizes (i.e. closes) the revenue split
sequenceDiagram
    CC->>+RevenueSplit: issue revenue split 
	RevenueSplit-->>CC: creator revenue amount
	CRTMember-->+RevenueSplit: revenue split has started
	CRTMember->>RevenueSplit: participate in revenue split 
	RevenueSplit-->>CRTMember: Dividends
	RevenueSplit-->-CRTMember: staking period has ended 
	RevenueSplit->>CRTMember: leave revenue split
    RevenueSplit->>-CC: finalize revenue split 

Details

Issue Revenue Split

The CC can issue a revenue split (provided that there are no other Revenue splits ACTIVE) by specifying the following setup:

  • start: at which block (in the future) the revenue split should be started
  • duration: the duration for the staking period
  • revenue_source_account: the account holding the JOY allocation for the split (Channel treasury account)
  • revenue_amount: how much JOY for the allocation (revenue from the channel usually) The split_staking_period is the period from [start, start + duration], and it specifies from when to when Members are allowed to stake their CRT. The revenue split datum itself (stored on chain) keeps tracks also of a revenue_split_rate that represents how much of the specified allocation should be devoted to the revenue split and how much should just be devoted to the CC itself, hence:
  • allocation_amount is the amount obtained from $\text{revenue allocation} \times \text{revenue allocation}$
  • creator_allocation_amount is the amount the CC reserves from itself through the revenue_split_rate. It is equal to $\text{revenue amount} - \text{allocation amount}$ creator_allocation_amount is gifted immediately to the CC account while allocation_amount is transferred to the CRT treasury account. At this point the revenue split is marked as ACTIVE and it is identified by a unique revenue_split_id. The respective staking period might or might not be started at this point.

Participate in Revenue Split

Any CRT Member is allowed to participate in an ACTIVE split as long as he is willing to stake a non-zero CRT amount. Once the current block is in between start and start + duration timeline (provided by the ACTIVE split) the member species the amount he wants to stake and a JOY dividend is computed as follows: $\text{dividend} = \frac{\text{amount}}{\text{CRT supply}} \times \text{allocation amount}$ The dividend amount is then transferred from the CRT treasury account to the CRT member controller account and amount of CRT is automatically staked in the member account, together with a split_id for bookkeeping. In particular a member can stake CRT that he's being vested with (from a sale).

Leave Revenue Split

Allows the CRT member to unstake their previously staked amount provided that the current block number is past the start + duration block.

Finalize Revenue Split

Allows the CC to effectively close an ACTIVE revenue split which is then marked as INACTIVE. CC must specify an account_id (the Channel Treasury account usually) for any sending back possible leftover from allocation_amount from the CRT Treasury account.

Caveat: this might get updated according to Design team feedback

ignazio-bovo avatar Nov 29 '22 11:11 ignazio-bovo

@ignazio-bovo few q:

  1. Can you confirm that sellers (CCs) can stake their own tokens in the revenue splits that they create?
  2. Do CRT holders need to unstake their CRTs via calling extrinsic one by one? If some CRTS are remain staked, can the revenue split be Closed? And new one started? If so then all staked ones need to unstake before they can partake in the new one?

dmtrjsg avatar Nov 30 '22 11:11 dmtrjsg

  1. Any CRT holder can stake their token
  2. The staking is done on the account. The revenue split can be closed by the CC anytime after the staking period is over

ignazio-bovo avatar Dec 01 '22 07:12 ignazio-bovo

✅ Revenue share can now be displayed during active Market or sale The work is tackled in this issue: https://github.com/joystream/atlas/issues/3633

KubaMikolajczyk avatar Jan 31 '23 08:01 KubaMikolajczyk

🟢 Update after feedback for CRT Creator & Viewer | Removing sections, Sale & Market, Revenue share 🎥 Loom video: https://www.loom.com/share/3a441d4c7bba4f0b99d8531da984ac8b 📄 Channel page changelog: https://www.figma.com/file/POw4j95jszfIP5bGfas2IC/Channel-page?node-id=1624%3A85414&t=9LSU5rQo1PxdSNma-4 📄 My token changelog: https://www.figma.com/file/OuywwClsegx2eotkii4ea4/My-token?node-id=925%3A139042&t=Jen95QDQKLIYpAWi-4

KubaMikolajczyk avatar Jan 31 '23 14:01 KubaMikolajczyk

Great work! I suggest we capitalize market in the one button, so Start Sale or Market. Everything looks solid :)

bedeho avatar Jan 31 '23 16:01 bedeho