Skip to content

A reputation management system where participants can: Register evaluation requests for entities, Submit scored assessments during evaluation periods, Finalize reputation scores based on weighted assessments, and Access historical trust metrics.

Notifications You must be signed in to change notification settings

tundekomolafe/TrustScore

Repository files navigation

TrustScore Protocol

Overview

TrustScore Protocol is a decentralized reputation management system built on the Stacks blockchain. It enables transparent, on-chain evaluation of entities through a competitive scoring mechanism where evaluators can submit assessments during defined evaluation periods.

Features

  • Decentralized Reputation Tracking: Register entities for evaluation with customizable parameters
  • Competitive Scoring: Evaluators compete to submit the highest quality scores
  • Transparent Metrics: All evaluations and scores are permanently recorded on-chain
  • Flexible Timeframes: Entity owners control evaluation period duration
  • Protocol Governance: Admin-controlled fee structure with hard caps

How It Works

1. Register an Evaluation

Entity owners can register their entity for evaluation by calling register-evaluation with:

  • Entity name and description
  • Metadata link (e.g., documentation, website)
  • Evaluation timeframe (in blocks)
  • Minimum score threshold

2. Submit Scores

During the evaluation period, evaluators can submit scores. Each new submission must exceed the current aggregate score (or meet the minimum threshold for the first submission).

3. Finalize Results

Evaluation periods can be:

  • Naturally concluded when the timeframe expires
  • Terminated early by the entity owner
  • Cancelled if no scores were submitted

Smart Contract Functions

Public Functions

  • register-evaluation: Create a new evaluation request
  • submit-score: Submit an assessment score for an evaluation
  • terminate-evaluation: Close an evaluation early (entity owner only)
  • cancel-evaluation: Cancel an evaluation with no submissions

Read-Only Functions

  • fetch-evaluation: Get evaluation details
  • fetch-evaluator-score: Get a specific evaluator's submission
  • is-evaluation-active: Check if evaluation is currently accepting scores
  • evaluation-complete: Check if evaluation period has ended
  • compute-protocol-fee: Calculate protocol fee for a given amount

Protocol Economics

The protocol charges a 3% fee (300 basis points) on evaluation settlements. This fee is configurable by the protocol admin but capped at 10% maximum.

Security Features

  • Owner-only controls for evaluation management
  • Input validation on all parameters
  • Status checks to prevent invalid state transitions
  • Admin controls with hard-coded limits

Development

Prerequisites

  • Clarinet CLI
  • Stacks blockchain knowledge

Testing

clarinet test

Deployment

clarinet deploy

Use Cases

  • Corporate Reputation: Track company trust scores
  • Service Provider Ratings: Evaluate service quality
  • Credit Scoring: Decentralized creditworthiness assessment
  • Vendor Evaluation: Supply chain partner assessments

About

A reputation management system where participants can: Register evaluation requests for entities, Submit scored assessments during evaluation periods, Finalize reputation scores based on weighted assessments, and Access historical trust metrics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published