Forum for discussion of mid, final term and final project

Author's payment

Author's payment

by MARCO DEGL' INNOCENTI DETTO LUCCHESI -
Number of replies: 7

When the system have to pay the authors? For each content access it's inefficent cause of generating lot of transaction, instead if the system pay the authors every hour/day, it's more efficent cause the system do less transaction but it has to mantain a log of numbers of access to their content to transfer the right amount. Which is the best solution?

In reply to MARCO DEGL' INNOCENTI DETTO LUCCHESI

Re: Author's payment

by DAMIANO DI FRANCESCO MAESA -

In the assignment text, substitute the paragraph:


The Catalog contract collects all the payments from the users and redistribute payouts among authors, granting a fixed payout for every content access. The Content Management Contract must be written to prevent views tampering. For the sake of simplicity, we do not consider Premium Account content fruitions in the view count.


With:


The Catalog contract collects all the payments from the users and redistribute payouts among authors, granting a fixed payout for every v content views (the payout is triggered each time v new views are reached). The Content Management Contract must be written to prevent views tampering. For the sake of simplicity, we do not consider Premium Account content fruitions in the view count.




In reply to DAMIANO DI FRANCESCO MAESA

Re: Author's payment

by ANDREA MANTOVANI -

Hi all,

actually it's not clear for me what is a `view`: is it an access operation or a consuming operation? So do the payouts have to be redistributed among the authors after `v` access  requests or `v` consuming requests for a content? Thanks in advance.

Best Regards,

Andrea Mantovani

In reply to DAMIANO DI FRANCESCO MAESA

Re: Author's payment

by ALDO D'AQUINO -

Referring to:

the payout is triggered each time v new views are reached

When the v-th user consume the content the transaction starts and it cost to that user 21000 gas and 0 to the other users.

There is a way to make it fair?

An option could be to let the author ask for the transfer (which will take place only if there are at least v views), so that he will pay the cost of the gas. However, this goes against the above statement of the assignment.

In reply to ALDO D'AQUINO

Re: Author's payment

by DAMIANO DI FRANCESCO MAESA -

You are right, it is not fair.

Your suggestion is sound, but, to better integrate it with the current assignment, I would suggest to do something cheap to notify the author/catalog once the v view is reached, toasynchronously trigger the author payment request, such as an event that the author/catalog is listening for. This said about the final project, during the final term, since you only have contracts, you assume it happens without actually having to do it. Feel free to implement your approach even if the assignment text is different (a long as you comment it properly).

In reply to DAMIANO DI FRANCESCO MAESA

Re: Author's payment

by ORLANDO LEOMBRUNI -

So, if I understood correctly, the workflow should be:

  1. In the catalog there's a function collectPayment that the content management contract can call to obtain its revenue (if V views are achieved)
  2. the author (as an external entity) listens for events of type "payment available" for their contents
  3. when a content C reaches V views, the Catalog emits the event "payment available for content C"
  4. the author's callback calls the Catalog's collectPayment function.
In the final term we should only implement points 1 and 3 (and perhaps simulate 4 manually), right?
In reply to ORLANDO LEOMBRUNI

Re: Author's payment

by DAMIANO DI FRANCESCO MAESA -

Depends on your impelemntation, but seems reasonable.

Yes on the final term you only have smart contracts and can simulate all the rest manually for the tests.