reward more of the post/comment tail

This commit is contained in:
keyan 2023-09-13 18:36:42 -05:00
parent 2d0f21fb20
commit 25d2c58559
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,7 @@ const { ANON_USER_ID } = require('../lib/constants')
// const ITEM_EACH_REWARD = 3.0
// const UPVOTE_EACH_REWARD = 6.0
const TOP_PERCENTILE = 21
const TOP_PERCENTILE = 33
const TOTAL_UPPER_BOUND_MSATS = 1000000000
const REDUCE_REWARDS = [616, 6030, 946, 4502]
@ -18,7 +18,8 @@ function earn ({ models }) {
(SELECT ("ItemAct".msats - COALESCE("ReferralAct".msats, 0)) as msats
FROM "ItemAct"
LEFT JOIN "ReferralAct" ON "ReferralAct"."itemActId" = "ItemAct".id
WHERE date_trunc('day', "ItemAct".created_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Chicago') = date_trunc('day', (now() - interval '1 day') AT TIME ZONE 'America/Chicago') AND "ItemAct".act <> 'TIP')
WHERE date_trunc('day', "ItemAct".created_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Chicago') = date_trunc('day', (now() - interval '1 day') AT TIME ZONE 'America/Chicago')
AND "ItemAct".act <> 'TIP')
UNION ALL
(SELECT sats * 1000 as msats
FROM "Donation"