StanfordHCI / bang

💥 Helping people meet for the first time, more than once 💥
MIT License
2 stars 1 forks source link

Calculate Time and Payment Based on User Time, not Batch Settings #537

Open xehu opened 4 years ago

xehu commented 4 years ago

Currently, the way that time (and payment) is calculated under the hood is based on the "batchTime," which is a constant value calculated from the parameters that define the round (defined in utils.ts): https://github.com/StanfordHCI/bang/blob/8fef82a7ba08a8a66b3fd736123b32755fbde15b/server/controllers/utils.ts

That amount is then converted to a fixed wage for users who complete the task in batches.ts: https://github.com/StanfordHCI/bang/blob/8fef82a7ba08a8a66b3fd736123b32755fbde15b/server/controllers/batches.ts

Crucially, this design means that workers who do not complete the whole task are not paid. In batches.ts, the payBonus() call happens in receiveSurvey(), which means that we only pay users after we receive their final survey.

A better design might require some more substantial rearchitecting of how this would work.