colonyNetwork
colonyNetwork copied to clipboard
Introduce ReputationBootstrapper
Closes #1069
Add ReputationBootstrapper
, which allows for setting & claiming of reputation+token grants.
- Grants can be set in bulk
- Grants can be claimed as soon as they are set
- If tokens are sent to the extension, then tokens will be paid out along with reputation
- The reputation grant begins decaying when it is set, at the same rate as reputation in general
Currently there are relatively few controls on the extension, e.g. no locking of grants or restrictions on being able to claim. Further, the logic around generating pins and sending them to user emails is not addressed here. It is recommended that when using the extension, tokens be transferred prior to grants being uploaded (as if done in the reverse, a user could theoretically claim the grant and not receive the tokens).
Looking at the gas costs, the naive implementation of reputation decay has the following gas profile (was called with no decay and with 90 days of hourly decay, e.g. 2,160 decay calculations).
Min: 237,437 Avg: 450,450 Max: 876,477
I was a bit surprised by this figure as a single decay calculation involves 3 arithmetic operations at 5 gas a pop, plus putting a variable on the stack. Even at 50 gas per loop, it should only have moved the needle by 100k gas. Perhaps something else is going on.