Nostr WoT

Understanding Web of Trust

A decentralized approach to reputation and spam filtering on Nostr, built on the principle of social distance.

The Problem

Nostr has no central authority to filter spam or verify identity. Traditional blocklists are centralized and don't scale. Web of Trust solves this by measuring social distance—how many hops separate you from someone in the follow graph.

You
Center
1
Following
2
Friends of Friends
3+
Likely Noise

Why Social Distance Works

1-Hop (Direct Follows)

People you explicitly chose to follow. High trust by definition—these are your curated connections.

2-Hop (Extended Network)

Friends of friends. Still likely to be real humans with shared interests. Good for content discovery.

3+ Hops (Unknown)

No meaningful connection. Could be anyone—legitimate users or spam bots. Filter or review carefully.

System Architecture

Your App / WebsiteNostr client, marketplace, social app
WoT Extensionwindow.nostr.wot API
Local IndexIndexedDB (privacy)
or
WoT OracleRemote API (speed)
Nostr RelaysFollow lists (Kind 3 events)

Use Cases

Web of Trust enables a wide range of applications that benefit from decentralized reputation.

Spam Filtering

Filter content by social distance without centralized blocklists. Only show content from people within 2-3 hops.

Trust Scores

Build reputation systems for marketplaces, reviews, and recommendations based on social proximity.

Smart Notifications

Prioritize notifications from close connections. Alert immediately for 1-hop, batch for 2-hop, mute beyond.

Content Discovery

Surface content from your extended network. Find interesting posts from friends-of-friends.

Code Examples

JavaScript (Browser)
// Check if someone is in your web of trust
if (window.nostr?.wot) {
  const distance = await window.nostr.wot.getDistance(pubkey);

  if (distance !== null && distance <= 2) {
    console.log("Trusted! " + distance + " hops away");
  }
}
REST API
# Query social distance between two users
curl "https://wot-oracle.example.com/distance?\
from=PUBKEY1&to=PUBKEY2"

# Response
{
  "distance": 2,
  "paths": 5,
  "mutual": false
}

Ready to Get Started?

Explore our documentation or dive straight into the code.