Papers
Topics
Authors
Recent
Search
2000 character limit reached

TraceRank: Reputation-Weighted Service Discovery

Updated 9 January 2026
  • TraceRank is a reputation-weighted ranking algorithm that models payment interactions as a directed weighted graph to prioritize high-quality service providers.
  • It employs off-chain seed reputations alongside logarithmic flow normalization and exponential decay to mitigate the influence of low-reputation, Sybil actors.
  • The iterative PageRank-style propagation method enhances precision and correlates well with human-evaluated reputations in large, real-world payment graphs.

TraceRank is a reputation-weighted ranking algorithm for service discovery in agent economies, introduced in the context of the x402 protocol. It constructs a Sybil-resistant ranking of on-chain HTTP service providers, using payment relationships as endorsements, and propagates initial reputation based on off-chain signals such as social verifications and registry attestations. The algorithm processes the network of cryptocurrency payments as a weighted, directed graph, seeding addresses with reputational mass, and iteratively propagating this mass along recent, high-value payment flows. By explicitly discounting the influence of low-seed, potentially Sybil actors and emphasizing the input of reputable entities, TraceRank surfaces services preferred by high-reputation users while suppressing those with merely high transaction volume (Shi et al., 31 Oct 2025).

1. Graph Model and Problem Definition

TraceRank models the payment universe as a directed, weighted multigraph G=(V,E)G = (V, E), where VV indexes on-chain addresses (including both payers and service endpoints), and EV×VE \subseteq V \times V represents individual payment transactions. Each edge e=(ji)e = (j \to i) encodes a payment with attributes:

  • vji(e)v_{ji}(e): transaction value in USD (e.g., stablecoin such as USDC).
  • t(e)t(e): timestamp of the transaction.

Over a specified temporal window (typically the most recent 90 days), all transactions from jj to ii are aggregated into an endorsed flow FjiF_{j \to i}. This consolidation reflects real-world usage patterns and mitigates spam or outlier events. The explicit payment graph provides an objective substrate for flows of trust and reputation.

2. Reputation Seeding and Initialization

Each address iVi \in V receives an initial "seed" reputation si[0,1]s_i \in [0, 1] reflecting its trustworthiness, as derived from off-chain signals. These may include: trading performance metrics (e.g., low slippage, on-chain profit/loss), decentralized social signals (social following relationships, DAO memberships, protocol-linked verifications), and entries in labeled entity registries (attestations for identity, compliance, audit through ERC-8004, etc.).

Addresses lacking public or credible signals are assigned si=0s_i = 0. The complete seed vector s=(s1,,sV)s = (s_1, \ldots, s_{|V|})^\top is computed prior to propagation and remains static throughout the iterative process.

3. Edge Weighting and Flow Normalization

For each pair (j,i)(j, i), the aggregate endorsed flow is computed as:

Fji=eEjilog(1+vji(e))exp(λΔt(e))F_{j \to i} = \sum_{e \in E_{j \to i}} \log(1 + v_{ji}(e)) \cdot \exp\big(-\lambda \cdot \Delta t(e)\big)

where Δt(e)\Delta t(e) is the age in days and λ>0\lambda > 0 is a temporal-decay rate. This formula log-scales each payment to limit the effect of outliers and whale flows, and applies exponential decay to emphasize recent behavior.

For each service ii:

Si=kVFkiS_i = \sum_{k \in V} F_{k \to i}

is the total inbound flow. The column-stochastic weight matrix WRV×VW \in \mathbb{R}^{|V| \times |V|} is then defined by:

wji={Fji/Siif Si>0 0if Si=0w_{ji} = \begin{cases} F_{j \to i}/S_i & \text{if } S_i > 0 \ 0 & \text{if } S_i = 0 \end{cases}

ensuring each column of WW sums to 1 (for Si>0S_i > 0), as required for stability in the propagation stage.

4. Iterative Reputation Propagation

TraceRank employs a PageRank-style power iteration to propagate reputation:

r(t+1)=(1α)s+αWr(t)r^{(t+1)} = (1 - \alpha)\, s + \alpha\, W^\top r^{(t)}

where r(t)r^{(t)} is the reputation vector at iteration tt, ss is the fixed seed vector, and α(0,1)\alpha \in (0, 1) is the damping factor (commonly α=0.85\alpha = 0.85). The seed-reinjection term (1α)s(1-\alpha)s ensures that only externally sourced reputation mass enters the system, while Wr(t)W^\top r^{(t)} transmits reputation along incoming flows.

At convergence, the scheme solves the fixed-point equation:

r=(IαW)1(1α)sr = (I - \alpha W^\top)^{-1} (1 - \alpha) s

Uniqueness and convergence are guaranteed due to the spectral properties of WW^\top (column-stochastic with spectral radius 1\leq 1) and α<1\alpha < 1.

Convergence is assessed when the L1L_1 norm r(t+1)r(t)1\|r^{(t+1)} - r^{(t)}\|_1 falls below a tolerance ϵ\epsilon (e.g., 10610^{-6} to 10810^{-8}). For million-edge graphs, 20–50 iterations are typically sufficient.

5. Sybil Resistance and Attack Mitigation

TraceRank's design yields robust Sybil resistance properties. When a service ii receives payments from NN new wallets lacking seed reputation (sj0s_j \approx 0), the incoming reputation mass from these sources remains negligible, regardless of their flow FjiF_{j \to i}; thus, their repeated use cannot meaningfully boost ii's ranking.

A single high-seed payer, however, introduces significant mass, making it expensive for adversaries to simulate legitimate reputation. The logarithmic scaling of flows and the exponential decay further restrict attempts by adversaries to amplify their standing through either large or temporally clustered payments (e.g., typical wash trading). All reputable mass must originate from verifiable, off-chain seeded addresses, as the propagation mechanism is mass-conserving for α<1\alpha < 1. No combination of "circular" payment patterns between Sybil addresses creates misattributed mass.

6. Algorithmic Summary and Implementation Considerations

The algorithm proceeds as follows:

  1. Input: transaction list EE, seed vector ss, decay factor λ\lambda, damping α\alpha, tolerance ϵ\epsilon.
  2. Aggregate edges forming FjiF_{j \to i} for each address pair and compute SiS_i.
  3. Construct the sparse weight matrix WW.
  4. Initialize rsr \leftarrow s.
  5. Iterate: rnew(1α)s+αWrr_\text{new} \leftarrow (1-\alpha)s + \alpha W^\top r, updating rr until rnewr1<ϵ\|r_\text{new} - r\|_1 < \epsilon.

The dominant computational cost is in power iteration, each step requiring O(E)O(|E|) time for sparse multiplication and O(V)O(|V|) for the teleport term. Space requirements are O(E+V)O(|E| + |V|), using compressed column (CSC/CSR) formats for WW and dense arrays for ss and rr. With efficient C++ or CUDA (cuSPARSE/OpenMP) implementations, TraceRank computes on graphs with millions of edges in seconds to tens of seconds per propagation cycle.

Practical deployment stores per-service TraceRank vectors in a PostgreSQL database alongside semantic embeddings, enabling joint queries via vector indexes (pgvector) and btree on the TraceRank field. Data ingestion pipelines may compute log-scaling and decay as part of ETL.

7. Empirical Evaluation and Performance

Deployment on the x402 payment graph (hundreds of thousands of addresses, millions of payments) confirms TraceRank's effectiveness. The algorithm inverts the ranking of spam services (those paid by many low-seed wallets) versus legitimate services favored by high-reputation payers. Compared to unseeded PageRank and raw transaction volume, TraceRank substantially increases precision@K (fraction of reliable services among the top KK). At K=10K=10, the margin is reported as greater than 2×2\times. Spearman correlation with human-labeled service reputations is consistently higher for TraceRank.

Multiplicative fusion of TraceRank with semantic retrieval (e.g., cosine similarity between query and service embedding, scaled by TraceRank) yields high-quality, contextually relevant discovery results. Dynamic updating is facilitated by re-aggregation of recent edges, allowing adaptation to underlying payment trends without recomputing on the full historic graph (Shi et al., 31 Oct 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TraceRank Algorithm.