Skip to content

Issue 10: Reputation Contract - Client & Freelancer Rating Logic #21

@soomtochukwu

Description

@soomtochukwu

Description:
Reputation points are generated exclusively upon the successful completion of a job or a finalized dispute resolution. This issue tracks implementing the submit_rating logic, ensuring that ratings are mathematically bound to specific interactions to prevent spamming or sybil attacks. Because the blockchain is public, anyone could theoretically attempt to rate a user; thus, the reputation contract must interface directly with the Escrow or Job Registry contracts to verify that the person submitting the rating actually engaged in a verified contract with the target. The rating (e.g., 1 to 5 stars) is then mathematically aggregated into the target's total score. The integrity of this logic prevents score manipulation and ensures the Agent Judge has access to accurate historical behavior during dispute analysis.
Requirements:

  • Implement a submit_rating function accepting a Job ID, Target Address, and Score (1-5).
  • Include verification logic ensuring the function is invoked by an authorized party connected to the Job ID.
  • Update the target address's Profile by incrementing the review count and adding to the total points.
  • Ensure an individual cannot submit multiple reviews for the identical Job ID.
    Acceptance Criteria:
  • Authorized users successfully submit ratings that alter the target's cumulative score correctly.
  • Sybil attacks or random rating submissions by unconnected addresses are categorically rejected by the contract.
  • Average rating floating-point logic is correctly simulated or handled off-chain via the raw aggregates.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions