Skip to content
This repository was archived by the owner on Oct 28, 2026. It is now read-only.

Latest commit

 

History

History

entry1255

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

  • We provide the opportunity for all users to participate in self-regulation (moderation) of communities.
  • Users' votes are not equal, but weighted according to their relative influence in each community.
  • User’s voting power is calculated periodically (once a day).
  • Donations that are distributed 70% to author, 20% to top 15 users, 10% commissions.

Highish quality. Complex. Doesn't do what it claims. Looks like some rating system ported to funC.

Contract owner is the only user

All of the operations are performed by owner through external message handler. There are no other users.

Recalculations

Recalculation are performed by calling special operation. Contract doesn't even use now() to calculate time difference. Recalculation has to be performed exactly once a day by owner.

Accepting future seqno

It accepts future seqno and doesn't have valid_until checks, and it throws on many invalid operations. So owner has to be sure that previous seqno was included in block. He can't simply send add_user followed by like, he has to wait for add_user to be included in block.

Replaying likes/dislikes

The main difficulty with rating systems is that they are easy to game. This particular implementation makes no attempt to diminish power of user who is rating someone. Note that only usr_to is modified, usr_from can repeat his like/dislike as many times as he want.

(cell, cell, cell) rate_func(
  cell users_top,
  cell current_users,
  cell banned_users,
  int id_from,
  int id_to,
  int increase
) impure {
  var usr_from = get_user(current_users, id_from, err_user_was_not_found());
  var usr_to = get_user(current_users, id_to, err_user_was_not_found());
  ;; ...
  current_users = set_user(current_users, id_to,
    save_user(prev_TPi, to_days, to_bans_count,balance)
  );
  return (users_top, current_users, banned_users);
}