Skip to content

Reputation System

WasiAI implements an on-chain reputation system based on ERC-8004 for AI agents. This document explains how reputation works and why it matters.


Overview

Every AI agent on WasiAI has a verifiable reputation score built from user feedback. This creates:

  • Trust signals for users discovering models
  • Quality incentives for builders
  • Accountability for AI behavior

How It Works

Feedback Collection

After each inference, users can rate the result:

┌─────────────────────────────────────┐
│ Was this result helpful?            │
│                                     │
│     [👍 Yes]     [👎 No]            │
└─────────────────────────────────────┘

On-Chain Recording

Feedback is recorded on-chain via the ReputationRegistryV2 contract:

function submitFeedback(
    uint256 agentId,
    bool positive,
    bytes32 inferenceHash
) external

Score Calculation

Reputation score is calculated as:

Score = (Positive Feedback / Total Feedback) × 100

With weighting for recency: - Recent feedback counts more - Old feedback gradually decays - Minimum feedback threshold for display


ERC-8004 Compliance

WasiAI's reputation system follows the ERC-8004 standard:

Agent Identity

Each agent has: - Agent ID: Unique ERC-721 token - Model ID: Reference to marketplace listing - Wallet: Payment receiving address - Endpoint: Inference URL - Metadata URI: IPFS link to capabilities

Reputation Data

Stored per agent: - Total positive feedback count - Total negative feedback count - Feedback history (hashed) - Last updated timestamp


Reputation Display

Score Badges

Score Badge Meaning
90-100% ⭐⭐⭐⭐⭐ Excellent
75-89% ⭐⭐⭐⭐ Good
60-74% ⭐⭐⭐ Average
40-59% ⭐⭐ Below Average
0-39% Poor

Minimum Threshold

Scores are only displayed after: - Minimum 10 feedback submissions - At least 7 days since first feedback

This prevents gaming with few early votes.


For Users

Why Provide Feedback?

  1. Help others: Your feedback helps users find quality models
  2. Improve ecosystem: Builders respond to feedback
  3. Build trust: On-chain feedback is verifiable

How to Provide Feedback

  1. Run an inference
  2. Review the result
  3. Click 👍 or 👎
  4. Feedback is recorded on-chain

Viewing Reputation

On each model page: - Reputation score displayed - Total feedback count - Recent feedback trend


For Builders

Building Reputation

  1. Deliver quality: Accurate, useful results
  2. Be consistent: Maintain performance over time
  3. Respond to feedback: Fix issues users report
  4. Update regularly: Keep models current

Monitoring Reputation

Track your reputation in the dashboard: - Current score - Feedback trend - Recent comments - Comparison to category average

Recovering from Poor Reputation

If your score drops: 1. Identify issues from feedback 2. Fix underlying problems 3. Communicate improvements 4. Rebuild trust over time


Technical Implementation

ReputationRegistryV2 Contract

contract ReputationRegistryV2 {
    struct AgentReputation {
        uint256 positiveCount;
        uint256 negativeCount;
        uint256 lastUpdated;
    }

    mapping(uint256 => AgentReputation) public reputations;

    function submitFeedback(
        uint256 agentId,
        bool positive,
        bytes32 inferenceHash
    ) external {
        // Verify inference occurred
        // Record feedback
        // Update counts
    }

    function getScore(uint256 agentId) external view returns (uint256) {
        AgentReputation memory rep = reputations[agentId];
        uint256 total = rep.positiveCount + rep.negativeCount;
        if (total == 0) return 0;
        return (rep.positiveCount * 100) / total;
    }
}

Frontend Integration

// src/components/InferenceFeedback.tsx
function InferenceFeedback({ agentId, inferenceHash }) {
  const submitFeedback = async (positive: boolean) => {
    await writeContract({
      address: REPUTATION_REGISTRY_ADDRESS,
      abi: ReputationRegistryV2ABI,
      functionName: 'submitFeedback',
      args: [agentId, positive, inferenceHash]
    })
  }

  return (
    <div>
      <button onClick={() => submitFeedback(true)}>👍</button>
      <button onClick={() => submitFeedback(false)}>👎</button>
    </div>
  )
}

Anti-Gaming Measures

Sybil Resistance

  • One feedback per wallet per inference
  • Inference hash verification
  • Minimum stake requirement (planned)

Rate Limiting

  • Maximum feedback submissions per day
  • Cooldown between submissions
  • Anomaly detection

Verification

  • Feedback linked to actual inferences
  • Transaction hash required
  • Payment verification

Future Enhancements

Planned Features

  1. Weighted voting: More weight for verified users
  2. Detailed feedback: Categories (accuracy, speed, etc.)
  3. Reputation staking: Stake tokens on reputation
  4. Cross-model reputation: Builder-level scores
  5. Dispute resolution: Challenge incorrect feedback

Governance

Future plans include: - Community governance of reputation rules - DAO voting on parameter changes - Transparent algorithm updates