Skip to content
NostrPulse

NostrPulse

Nostr Reputation Engine & Cashu eCash NutZaps

Created on 7th September 2026

•

NostrPulse

NostrPulse

Nostr Reputation Engine & Cashu eCash NutZaps

The problem NostrPulse solves

Decentralized protocols like Nostr eliminate corporate deplatforming, but introduce three critical structural bottlenecks:

  1. Identity is Computationally Free (The Sybil Flood): Anyone can spin up 10,000 Nostr keypairs (npub) in seconds for zero sats. Scammers clone creator bios, scrape avatars, and spam open relays with synthetic identities. Centralized KYC destroys privacy, while running naive multi-hop graph crawlers client-side freezes mobile browsers.
  2. Lightning Tipping is Synchronous and Fragile: Standard Zaps (NIP-57) require real-time peer coordination. If a creator's phone goes to sleep, their node loses power, or routing channels lack inbound liquidity, payments fail immediately. Furthermore, public zap receipts leak financial transaction graphs on relays.
  3. Autonomous Agents Lack Sovereign Rails & Risk Radar (Machine Money): AI agents have no legal identity to open bank accounts or credit cards. Conversely, giving autonomous software raw wallets exposes them to catastrophic runaway spending loops, hallucinated invoices, or prompt injection attacks without verifiable reputation and hard spending guardrails.

How NostrPulse Solves It (Freedom Stack + Machine Money Crossover)

NostrPulse unites deterministic graph verification, sats-weighted economic stake, asynchronous Chaumian eCash, and the Model Context Protocol (MCP) into a unified sovereign operating system:

  • 4-Tier Web-of-Trust Engine (sub-3ms lookup): Scores cryptographic identity depth across 5 pillars using proximity to 21 curated ecosystem Root Anchors (fiatjaf, jb55, jack, cameri). Hop 1 evaluates an in-memory snapshot of 5,544 Ring-1 nodes for instantaneous O(1) RAM lookups (< 2.8ms), while Hop 2 leverages transitive gossip without freezing the browser.
  • Sats-Weighted In-Degree (Economic Stake): Analyzes Kind 9735 Zap receipts with strict anti-wash trading (self-zaps 100% discarded) and Sybil sender filtering (zaps originating from isolated bots with WoT = 0 are discounted to weight 0). Points scale logarithmically with a baseline for verified NIP-05 DNS handles.
  • Strict 25-Point Gatekeeper (Anti-Sybil Ceiling): Identities with zero graph connection and zero verified WoT sats are mathematically hard-clamped at <= 25/100 (Unverified / Potential Bot), neutralizing profile metadata gaming with a 100% automated interception rate.
  • Full-Cycle Chaumian eCash (NIP-61 NutZaps & NIP-57): Value travels asynchronously as encrypted bearer proofs (Kind 9321) with zero routing fees. Features a handcrafted, zero-dependency RFC 8949 binary CBOR decoder (cashuB), automated 16-hex to 66-hex keyset ID expansion, NIP-44 v2 E2E encryption to prevent relay front-running, and fail-closed NUT-07 double-spend verification.
  • Autonomous Machine Money & MCP Server (nostrpulse-mcp): Published npm package exposing 10 Stdio JSON-RPC tools for Claude Desktop, Cursor, and LangChain agents. Enforces autonomous runtime spending guardrails (rolling 24h budget limits and 50-sat per-tx caps) and blocks agent payments to counterparties with Trust Scores < 40.
  • NIP-90 Decentralized Compute Marketplace: Directly addresses Bitshala Problem Board Statement 1 (Democratizing AI Usage) by allowing agents and users to dispatch Kind 5000 compute requests and settle open-source LLM inference via Chaumian eCash with bilateral privacy.
  • Open Ecosystem Adoption: Ships a zero-dependency standalone embeddable NutZap widget (public/widget.js, <nutzap-me>) for any external creator blog and a public CORS-enabled REST API (/api/v1/trust-score/[pubkey]).

Challenges I ran into

The hardest challenges came from protocol boundary mismatches between Nostr relays, Cashu mints, browser runtimes, and autonomous AI agents:

  1. 16-Hex vs 66-Hex Keyset ID Mismatch (Inputs: 0 Bug): Cashu V4 CBOR tokens (cashuB) truncate keyset IDs to 16 hex characters, causing mint SDKs to drop valid proofs with empty inputs. Resolved by implementing an auto-expansion pipeline in claimNutZapToken() that queries /v1/keysets to match prefixes and normalize proofs to 66-hex IDs, settling swaps in under 800ms.
  2. Zero-Dependency RFC 8949 CBOR Decoder: Standard npm CBOR parsers pulled bloated Node.js Buffer polyfills that crashed inside browser Web Workers. Solved by writing an ~80-line binary CBOR decoder from scratch in pure TypeScript using native Uint8Array bitwise shifts, eliminating supply-chain risks with zero npm dependencies.
  3. Eliminating Relay Front-Running via NIP-44 v2: Cashu proofs are bearer assets; broadcasting them in plaintext over open relays allows malicious operators to steal sats. Enforced mandatory NIP-44 v2 ChaCha20-Poly1305 encryption via ephemeral ECDH keys so proofs never touch relay memory in plaintext.
  4. Solving Client-Side Graph Freezes (Sub-3ms WoT): Live-crawling contact lists for 21 root anchors spawned 50+ concurrent WebSockets, freezing mobile browsers. Built an offline crawler (build-ring1-cache.mjs) pre-computing 5,544 Ring-1 nodes, slashing lookup latency from ~5,000ms down to < 3ms in RAM.
  5. Fail-Closed NUT-07 Double-Spend Defense: Replaying spent tokens previously confused optimistic UI states. Re-architected verifyTokenWithMint() to query mint spend-states first, cleanly intercepting spent proofs with an educational NUT-07 SPENT indicator without corrupting wallet state.
  6. Autonomous Agent Guardrails (Machine Money): Equipping LLMs with financial tools over MCP Stdio created risks of prompt injection and runaway spending loops. Built a runtime policy engine (spending-guardrails.ts) enforcing rolling 24-hour budgets (500 sats), per-tx caps (50 sats), and hard-blocking payments to counterparties with Trust Scores < 40.

Tracks Applied (2)

Machine Money

NostrPulse serves as the autonomous financial operating system ("Stripe + Stripe Radar") for AI agents, resolving the fu...Read More

Bitshala

Freedom Stack

NostrPulse is built ground-up to materialize the core thesis of the Freedom Stack: pairing decentralized identity (Nostr...Read More

Bitshala

Discussion

Builders also viewed

See more projects on Devfolio