StreamCompletion attestations from the Attestation Contract and computes a score that reflects your total verified work history — amounts paid, number of completed engagements, and the category of work. Because every input is an immutable on-chain record, the score cannot be fabricated and does not depend on Aven’s servers remaining online.
Purpose
The Reputation Contract provides a single, stable number — and a per-category breakdown — that any external party can query for any Stellar address. It is read-only and stateless: it holds no data of its own, only a pointer to the Attestation Contract. Scores update automatically as newStreamCompletion attestations accumulate without requiring any additional transaction.
Only
StreamCompletion attestations contribute to the reputation score. Individual WorkSession records do not directly affect the score — the score is updated once per fully-completed stream engagement. This prevents partially-completed streams from inflating or deflating scores.ScoreBreakdown
When you callget_score_breakdown, the contract returns a ScoreBreakdown struct with both a total score and per-category sub-scores:
How Scores Are Calculated
For eachStreamCompletion attestation, the contract computes a point value using the following logic:
- Base points: Every completed stream starts with 10 points.
-
Payment bonus:
(amount_paid / 10_000_000 / 10), clamped between 0 and 100. This awards up to 100 bonus points for larger payments (amounts are in Stellar’s 7-decimal fixed-point, so dividing by10_000_000converts to whole units). -
Category multiplier: Applied as a percentage multiplier to the raw score.
-
Confirmation multiplier:
100%if the employer explicitly confirmed the work (client_confirmed = true);50%if the payment was auto-released after the deadline. - Score cap: The total score across all attestations is capped at 10,000.
Score inputs are immutable attestation fields — there is no current-ledger multiplier or time decay. A completed project’s contribution to your score is fixed the moment the
StreamCompletion attestation is minted and will never drift.Public Entrypoints
compute_score
Returns the aggregated reputation score for a Stellar address.
StreamCompletion records. The result is capped at 10,000.
Example use cases:
- Display a score badge on a worker’s profile page.
- Screen candidates programmatically before assigning an
AgentTaskstream. - Verify a minimum score threshold before releasing a grant.
get_score_breakdown
Returns the full ScoreBreakdown struct with a total score and a score for each work category.
bounty or grant sub-scores, while a salary-track employer might focus on salary and freelance.
verify_claim
Returns true if the recipient’s current score meets or exceeds a minimum threshold.
false for any negative minimum_score.
Example: An automated agent task dispatcher calls verify_claim(worker_address, 50) before assigning high-value tasks. Workers with a score below 50 are not eligible.
How the Score Is Used in Aven
Score Limits and Constraints
The Reputation Contract reads at most 100 attestations percompute_score or get_score_breakdown call (MAX_HISTORY_READ = 100). If a worker has more than 100 attestations, only the first 100 (oldest) are included in the score calculation.
The maximum possible total score is 10,000 regardless of the number of completed streams.
Limitations and Notes
- The Reputation Contract holds no state of its own. It resolves everything by cross-contract calls to the Attestation Contract at query time. This means score reads incur the cost of multiple contract invocations, which is reflected in the transaction fee.
- Disputed work sessions do not produce attestations and do not affect the score.
- Auto-released sessions (employer did not respond within the timeout) do produce
WorkSessionattestations, but theclient_confirmedflag isfalse, which halves their contribution to the finalStreamCompletionscore. - Only
StreamCompletionattestations count toward the score. IndividualWorkSessionattestations within an incomplete stream do not contribute until the stream is fully paid out.
