« All posts

ERC-8004 trust scores: the naive average crowns the wrong agent

How ERC-8004 reputation should be computed: why naive averaging fails, and how Beta-distribution witness capping fixes it in viem, web3.py, and alloy.

ERC-8004 gives AI agents on-chain identity and reputation registries across more than 20 EVM chains, but deliberately leaves scoring to the application layer. Analyzing 245 feedback entries for the first ten agents registered on Base mainnet, a straightforward average ranked one agent well above another — until the source of that evidence was examined.

The top-ranked agent's high average came from just eight client addresses, one of which alone filed nearly a third of its entries; the lower-ranked agent's score came from twenty independent clients. This is the classic reputation-system failure mode: averaging conflates volume of correlated feedback with breadth of independent evidence.

The fix borrows from early-2000s Beta Reputation System research and subjective logic: track evidence as Beta-distribution pseudo-counts, report an uncertainty value alongside the expectation, and cap each witness's contribution to one unit before fusing, so a single address can't flood the score. Applying this correction, the top agent's confidence collapsed while the broad agent barely moved.

The approach ships as agent-reputation-sdk, adding typed registry reads and the calculation as native extensions to viem, web3.py, and alloy across seven chains, with policy-echoing, uncertainty-bearing results verified by cross-language golden test vectors against live chain data.