I believe that for your calculations you only consider the karma of the item that you consider karma, whose voters were previously during the vote, and not their current karma (which may have changed since), since this will lead to a recursive function that probably will include all elements and all users.
Another assumption is that karma is indeed absolute, but recounted when a new vote is cast, because votes are less frequent than opinions.
I would keep all the votes of all users, their karma during the voting and the direction of voting for each item.
The final assumption: you add karma to the submitter not immediately after the vote, but after a certain period of time. If you add it right away, senders' careers will often grow up or down and cause a lot of jitter in your system. If you get a new vote, I would first calculate the new karma of the item, and then add karma to the user, depending on the absolute karma-change of the element:
The karma of an item is the sum of the karma of all voters: for example, you have three voices: one with 50 karma, one with 150 karma, one with 30 karma. This will result in total karma of 170. Thus, the item has karma of +170.
As soon as a new user votes, you recalculate the karma of the item with a new vote, taking into account: (previous example) new users vote for 10 karma. The item's new karma is +180. The difference in the old and new karma is the karma that the user receives: (previous example), the user's vote changed the karma of the item to +10, so the user receives +10 karma (for future votes). The disadvantage of this idea is that users with high karma get new karma very quickly, so you probably need to add some limiting factors here (like the logarithm) in order to scale it correctly. Since you also want to take into account the age of the item, you can multiply the received karma points by a factor depending on the age (for example, if the item is older than 5 days, the user does not receive any karma at all: 5 days - voting time multiplied by the changed cost of karma )
This, of course, is a very vague project of the system that you want to implement, and I do not know if it matches your idea. It can probably be modified to add other factors:
You can determine% relevance with: (absolute posting karma / absolute negative karma): values ββless than 1 have more negative karma and then postile karma and vice versa. But for a reliable% value, you need some kind of value to compare in my oppinion too (whether it's constant or calculated otherwise).
source share