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?
Re: Author's payment
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.
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
A view is a consume operation.
"`v` consuming requests for a content" is the correct one.
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.
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).
So, if I understood correctly, the workflow should be:
- In the catalog there's a function collectPayment that the content management contract can call to obtain its revenue (if V views are achieved)
- the author (as an external entity) listens for events of type "payment available" for their contents
- when a content C reaches V views, the Catalog emits the event "payment available for content C"
- the author's callback calls the Catalog's collectPayment function.
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.