How a review earns its weight
The public rules behind every TrustRate score.
The life of a review
01
Work together
A bounty, milestone or invoice is paid on-chain.
02
Write
Rating, tags and a comment, tied to that work.
03
Sign
The reviewer's wallet signs it.
04
Seal
Written into a block. No edits, no deletes.
05
Count
The score moves by the review's weight.
What makes a review count
Weight = interaction × standing. Hidden reviews weigh nothing.
| Factor | When | Value |
|---|---|---|
| Interaction | Linked to a real on-chain interaction | × 1.0 |
| Interaction | No linked interaction | × 0.4 |
| Standing | Reviewer has 2+ verified interactions | × 1.0 |
| Standing | New wallet | × 0.6 |
The score
score = (Σ weight × stars + 2 × 3.0) ÷ (Σ weight + 2)
The "+ 2 × 3.0" counts as two average reviews, so one kind word can't make a 5.0.
Worked example
- 5 stars, verified, established reviewer: 1.0
- 4 stars, verified, established reviewer: 1.0
- 5 stars from a fresh second wallet, no interaction: 0.24
(5 + 4 + 1.2 + 6) ÷ (2.24 + 2) = 3.8. Plain average: 4.7.
Confidence
Early below a total weight of 3, Growing below 7, Solid from 7.
When the community steps in
Anyone can flag. Five elected moderators decide in the open.
01
Flag
Spam, harassment, off-topic or conflict of interest.
02
Case
The review stays visible meanwhile.
03
Vote
Three matching votes decide.
04
Outcome
Hidden reviews stop counting but stay on-chain.
Replies, votes and tone
The reviewed person can reply once. Helpful votes sort reviews, and a tone check warns when words contradict the stars. Neither changes the score.
For developers
The demo's data layer (src/lib/demo) mirrors this interface, so wagmi/viem and an indexer can replace it without touching the UI.
Show the contract interface
interface ITrustRate {
event ReviewSealed(
uint256 indexed id,
address indexed reviewer,
address indexed subject,
uint8 rating, // 1–5
bytes32 interaction, // 0x0 when unverified
string uri // comment + tags
);
event ReplySealed(uint256 indexed reviewId, string uri);
event Flagged(uint256 indexed reviewId, uint8 reason);
event ModVote(uint256 indexed reviewId, address moderator, bool hide);
event Resolved(uint256 indexed reviewId, bool hidden);
function review(address subject, uint8 rating, bytes32 interaction, string calldata uri) external returns (uint256);
function reply(uint256 reviewId, string calldata uri) external;
function flag(uint256 reviewId, uint8 reason) external;
function vote(uint256 reviewId, bool hide) external; // moderators only
}- A profile is a view over indexed review events.
- Helpful votes are EIP-712 messages, kept off-chain.
- Hiding sets a flag. Nothing is deleted.