Skip to content

Feature: Add wallet reputation scoring for DeFi agent risk assessment #1

@jacobsd32-cpu

Description

@jacobsd32-cpu

Problem

DeFi agents making automated trades, lending decisions, or liquidity provision need to assess counterparty risk. Right now, agent definitions include strategy logic but no reputation or trust signals about the wallets they interact with.

A lending agent shouldn't extend the same credit to a wallet with 3 days of history and one with 2 years of consistent on-chain activity.

Proposal

Integrate DJD Agent Score as a reputation data source for DeFi agent risk assessment.

The API scores wallets 0–100 across 5 dimensions from on-chain behavioral patterns on Base:

  • Identity — Multi-chain attestations (ENS, stETH, governance tokens)
  • Behavior — Transaction frequency, diversity, gas efficiency
  • Reliability — Balance stability, payment consistency
  • Viability — Balance trajectory, longevity
  • Capability — Contract interactions, DeFi protocol usage

Example integration with agent definitions

// Add reputation check to any DeFi agent's risk assessment
const reputationCheck = {
  name: "check-wallet-reputation",
  description: "Score a wallet's on-chain reputation before executing DeFi operations",
  endpoint: "https://djd-agent-score.fly.dev/score/basic/{wallet}",
  method: "GET",
  response: {
    composite_score: "number (0-100)",
    classification: "string (Excellent/Strong/Established/Emerging/New)",
    confidence: "number (0-1)",
    dimensions: {
      identity: "number",
      behavior: "number", 
      reliability: "number",
      viability: "number",
      capability: "number"
    }
  }
};

// Risk threshold examples:
// - Lending: require score >= 50 for unsecured loans
// - DEX routing: prefer counterparties with score >= 30
// - Liquidity provision: flag wallets scoring < 20 for review

Key features

  • Free tier: 3 scores/day, no API key needed
  • x402 micropayments: Pay-per-request via USDC on Base for higher volume
  • TypeScript SDK: npm install djd-agent-score-client
  • ERC-8004: Scores published on-chain for trustless verification

This could be a useful building block for risk-aware DeFi agents. Happy to help with integration if there's interest!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions