-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve rewards #1731
improve rewards #1731
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The charts would have helped more if the axis were labeled 👀 But I got the idea.
Found a bug if we sort stackers by anything other than value.
Unrelated to the changes here but I think in the switch at api/resolvers/user.js:69, we should add a case for value
so it's clearer when the proportion
column is needed:
diff --git a/api/resolvers/user.js b/api/resolvers/user.js
index ef53de63..cec3fc49 100644
--- a/api/resolvers/user.js
+++ b/api/resolvers/user.js
@@ -66,11 +66,12 @@ export async function topUsers (parent, { cursor, when, by, from, to, limit = LI
case 'comments': column = 'ncomments'; break
case 'referrals': column = 'referrals'; break
case 'stacking': column = 'stacked'; break
+ case 'value':
default: column = 'proportion'; break
}
I'll take a closer look at the postgres function now.
Co-authored-by: ekzyis <[email protected]>
Co-authored-by: ekzyis <[email protected]>
1.0/LN(ROW_NUMBER() OVER (partition by upvoters.id order by acted_at asc) + EXP(1.0) - 1) AS early_multiplier, | ||
tipped::float/(sum(tipped) OVER (partition by upvoters.id)) tipped_ratio | ||
FROM upvoters | ||
WHERE tipped > 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this changed from > 0
to > 2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enforces a minimum zap to be considered for zapping rewards. Because we use the quad root of the zap amount, this means the minimum zap for consideration is 2 = x^0.25
or x = 16 sats
.
It's arbitrary.
I thought about increasing it more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should increase it more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to setting this limit would to weight zap order by the zap amount.
Rather than 1/ln(zap_number) + zap_size_relative
, do zap_size_relative*(1/ln(zap_number) + 1)
.
Conceptually this would mean that by being first, all things being equal, you could double the "value" of your zap. And if your zap is really small relative to other zaps, doubling its "value" wouldn't amount to much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should increase it more.
Sounds good, I would rather make it too large than too small
An alternative to setting this limit would to weight zap order by the zap amount.
This would mean that zap amount now becomes more important than zap order, no?
|
It occurred to me too late, but this factor, We shouldn't need it because zaps are rewarded relative to an item's zaprank, which effectively means we're weighting a zap's value by the square of a stacker's trust, which makes valuing overly reliant on trust. When I was backtesting variations, some variations weren't behaving as expected, and this is likely the culprit. This factor can basically lead to very small zaps from highly trusted stackers capturing more rewards than they deserve. |
@ekzyis this just needs a quick sanity check. I backtested it and it looks good.
The goal here is to better reward desirable behavior. This PR:
1
The main improvement this makes is allowing early zapping contribute independently of zap amount to the score of zapping "value".
Before this change, we scored zapping like
zap_size_relative/ln(zap_number)
. Conceptually, this meant that if you didn't zap early, zapping a lot wouldn't be scored as very valuable. Visually:After this change, we score zapping like
1/ln(zap_number) + zap_size_relative
. Conceptually, this means that zapping a lot contributes to your score independently of zapping early. Visually:other stuff in value function
diff of plpgsql function
TODO: