const MaxBps
MaxBps is the basis-point denominator used for trust and shares.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package trust implements the scoring rules behind Guildhall reputation.
Package trust implements the scoring rules behind Guildhall reputation.
Reputation is earned one record at a time. When a piece of work is paid out, the realm that recorded it asks this package how many points the work is worth. The answer depends on who vouched for it: every approving reviewer contributes their current trust, and the record is worth Base points scaled by the average trust of its reviewers.
Trust is expressed in basis points (0..10000):
With the default TrustFloorBps of 0, work vouched for only by strangers is still recorded but earns nothing. This is what makes the score resistant to sybils: a ring of fresh addresses reviewing each other stays at zero until someone already trusted vouches for one of them. Trust flows outward from the seeds, EigenTrust-style, one paid record at a time.
Scores are computed incrementally at record time, never retroactively, so every point on a profile can be traced to one record and the trust its reviewers held when they approved it.
Level names a score band. Levels are cosmetic; realms that gate on reputation should compare scores directly.
TrustOf returns the trust, in basis points, carried by a reviewer.
DefaultParams returns the parameters Guildhall launches with.
Evaluate scores a paid piece of work.
Input describes a paid piece of work.
1type Params struct {
2 // Base is the number of points a record earns when every reviewer
3 // carries full trust and the worker received the full payout.
4 Base int64
5 // TrustThreshold is the score at which a non-seed reviewer reaches
6 // full trust.
7 TrustThreshold int64
8 // TrustFloorBps is the minimum trust any eligible reviewer carries.
9 TrustFloorBps int64
10 // SelfFundedFactorBps scales the points of work funded by the worker
11 // themselves. Zero means self-funded work earns nothing.
12 SelfFundedFactorBps int64
13}Params tunes the scoring rules.
Result is the scoring outcome for one record.
Reviewer describes a reviewer at the moment they vouched for a record.