Skip to main content
The reputation contract reads all attestations for a Stellar address and computes a weighted score broken down by work category. Scores are computed on-chain and are publicly verifiable by anyone with access to a Stellar RPC endpoint. Because the contract holds no state of its own — it reads directly from the attestation contract on every invocation — your score is always current and automatically reflects every attestation ever minted for your address.

Contract Address

Testnet: CANK4E7GOFZT4D3U57RNT7QLQTNFGY7QNL6TQTWWKYBNHX7J6U54HO7E

Key Functions

compute_score
function → i128
Returns the total aggregated reputation score for a recipient address, capped at 10,000. This is a convenience wrapper around get_score_breakdown that returns only the total field.Parameters:
  • attestation_contract — Address of the attestation contract to read from
  • recipient — Worker’s Stellar address to score
get_score_breakdown
function → ScoreBreakdown
Returns the full ScoreBreakdown struct with the total score and a per-category breakdown. Use this when you want to display or compare scores across different types of work.Parameters:
  • attestation_contract — Address of the attestation contract to read from
  • recipient — Worker’s Stellar address to score
verify_claim
function → bool
Returns true if the recipient’s total reputation score is greater than or equal to minimum_score. Useful for on-chain access control or eligibility checks.Parameters:
  • attestation_contract — Address of the attestation contract to read from
  • recipient — Worker’s Stellar address to check
  • minimum_score — Minimum score threshold (negative values always return false)

ScoreBreakdown Fields

total
i128
Aggregate score across all attestation categories, capped at 10,000. This is the primary reputation score you would display to end users.
freelance
i128
Score contribution from all Freelance-category attestations.
salary
i128
Score contribution from all Salary-category attestations.
bounty
i128
Score contribution from all Bounty-category attestations.
grant
i128
Score contribution from all Grant-category attestations.
agent_task
i128
Score contribution from all AgentTask-category attestations.
subscription
i128
Score contribution from all Subscription-category attestations.

Scoring Formula

Each attestation contributes a base score of 10 points, plus a payment bonus of up to 100 points proportional to the amount paid. That raw score is then multiplied by three independent weighting factors before being added to the breakdown. Per-attestation score:

Recency Weighting

Attestations from recent ledgers are worth more than older ones, incentivising sustained activity.

Category Weighting

Client Confirmation Weighting

Score Cap

The total field in ScoreBreakdown is capped at 10,000 regardless of how many attestations a worker accumulates. Individual category sub-scores are not capped and can exceed 10,000. The reputation contract processes up to the 100 most recent attestation IDs per call.

How to Query Reputation

Using the Stellar CLI

Using the TypeScript Bindings

Checking a Minimum Score Threshold

The reputation contract is stateless — it reads from the attestation contract on every call. There is no separate storage to update or synchronise. Your score automatically reflects all attestations whenever it is queried, and it decays naturally over time as older attestations move from the Hot window to the Warm and Cold windows.