You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
x% out of reputation and tokens awarded to referral in time frame y from registration on top of ...
x = 10%, y = 1 month.
In a further version x can depend inversely on some measure of engagement such as the amount of reputation/tokens created via contributions.
Todo for this:
extend User model with a "referrer" - which is the id of the user that has given the referral
create_user should get an optional referrer argument
need to check that the referrer is an existing user in the DB, upon creation of the new user and in every action involving the referrer.
(the API should be correspondingly extended)
add contract parameters:
referral_reward_fraction - this is the fraction of the referred user's gained reputation or tokens that should be rewarded to the referrer.
referral_timeframe - this is the time frame in which after a new user has been created following a referral the referrer will be rewarded for the referred user's consensused contributions.
caclulate payout to referrer when user is awarded tokens and reputation following a consensused contribution.
if time_since_referred_user_created <= referral_timeframe
referrer_reputation_reward = referral_reward_fraction * earned_reputation
referrer_token_reward = referral_reward_fraction * earned_tokens
it should be noted that what the referrer gets is not at the expense of the referred, i.e. the referred does not need to pay the referrer.
neet to update pseudocode:
In pseudocode:
def create_evaluation(...):
...
reward_previous_evaluations
reward_contributor
for user in previous_evaluators + [contributor]:
user_rep_reward_delta = soething # the rewards the user has gotten as a contributor or prev evaluator
if datetime.now() - user.creation_time <= self.REFERAL_TIMEFRAME:
if user.referrer:
user.referrer += self.REFERAL_REWARD * user_rep_reward_delta
# and hte same for evaluation
The text was updated successfully, but these errors were encountered:
question: when does the payout happen? proposal: on any call to create_evaluation, also these payouts are calculated an assigned (up to Y days after the referred user was created)
answer in the first version, we want the inviters to get x% only out of rewards for consensused contirbutions and not from earned reputation during evaluations.
question: how are the payout calculated? Is it: referrer gets 10% of all payouts of the referral? And which payouts count?
answer so only payouts for consensused contributions count.
question: we have one value for X, or we want to have an "x" for tokens and one for rep?
answer: for the first working version we can leave it at a uniform 10% for both token and rep and afterwards refine it.
https://trello.com/c/XvBbXnjS/1-specify-referral-logic
Todo for this:
extend User model with a "referrer" - which is the id of the user that has given the referralcreate_user should get an optionalreferrer
argumentreferral_reward_fraction - this is the fraction of the referred user's gained reputation or tokens that should be rewarded to the referrer.referral_timeframe - this is the time frame in which after a new user has been created following a referral the referrer will be rewarded for the referred user's consensused contributions.if time_since_referred_user_created <= referral_timeframe
referrer_reputation_reward = referral_reward_fraction * earned_reputation
referrer_token_reward = referral_reward_fraction * earned_tokens
neet to update pseudocode:
In pseudocode:
The text was updated successfully, but these errors were encountered: