brejc8 / dealferret

MIT License
2 stars 1 forks source link

Karma Code #3

Closed OscarVanL closed 4 years ago

OscarVanL commented 6 years ago

Hi,

I'm a little intrigued as to how the Karma system works - it says on my profile (oscarandjo) that it takes 4 hours before new deals show up, but this is slowly decreasing. However, I could not find the code on here.

There is an explanation on the website but thought it was a bit vague.

Could you please explain the system and how I make more karma, other than referring people?

Thanks.

brejc8 commented 6 years ago

Hi

I updated the code so you should be able to see how it works. By visiting pages you get 10% of your page_karma_quota moved to your karma. You get a default karma of 5. Every night the following get executed on the system: cursor.execute("UPDATE users SET page_karma_quota = '1'") cursor.execute("UPDATE users SET karma = karma * 0.99") cursor.execute("UPDATE users SET karma = 5 WHERE karma < 5") This resets your quota to 1 and you decay 1% of your karma which saturates at 5. The delay you have is 60 hours / karma. Doubling karma halves your delay. When you refer others, you get 50% of any karma they get.

OscarVanL commented 6 years ago

That's helpful :) Is there a maximum amount of karma you can earn in one day from browsing the site?

brejc8 commented 6 years ago

Yeah, 1. So even if you max that every day, once you reach 100 karma, you will decay as much as you receive. To give you perspective, each day there are on average 18 active users each day.

jeremymccauley commented 6 years ago

Thanks for the helpful explanation. Is there a limit of 15 somewhere in the code? I can't seem to get my karma above 15 but I see no limit of this in the code.

brejc8 commented 6 years ago

There is no limit at 15. It looks like you had 14 yesterday, so it will not reach more than 15 in a day, and you will lose 0.15 tonight and be able to get up to nearly 15.85 tomorrow.

brejc8 commented 6 years ago

Hi all. Just realized that the daily maintenance scripts have not been running because of a typo in the cron. This explains why your karma was stuck and unable to go up. Sorry about that.

jeremymccauley commented 6 years ago

Thanks for figuring this out. Thought I was going crazy. Keep up the good work!

On Tue, 11 Sep 2018 at 20:38, brejc8 notifications@github.com wrote:

Hi all. Just realized that the daily maintenance scripts have not been running because of a typo in the cron. This explains why your karma was stuck and unable to go up. Sorry about that.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brejc8/dealferret/issues/3#issuecomment-420397526, or mute the thread https://github.com/notifications/unsubscribe-auth/Amtkl94EWWh1yqcgS6jRARf_rGpEcoYFks5uaBEhgaJpZM4Vnj0J .

--

Jeremy McCauley Research Associate Department of Economics University College London Gower Street London, WC1E 6BT

email: uctpjem@ucl.ac.uk website: https://sites.google.com/site/jeremymccauley