docs: add Exchange Rates event (NIP-33 kind 30078)#38
Merged
Conversation
Add documentation for the new exchange rates publishing feature via Nostr.
## Overview
Mostro instances can now publish Bitcoin/fiat exchange rates as NIP-33
addressable events (kind 30078) to provide censorship-resistant price
data for clients.
## Key Features
- **Event kind**: 30078 (NIP-33 addressable, replaceable)
- **d tag**: "mostro-rates" (unique identifier)
- **Content**: Full Yadio API format {\BTC\: {\USD\: 50000.0, ...}}
- **Expiration**: NIP-40 tag (min(interval × 2, 3600))
- **Configurable**: Update interval (default 300s, min 60s)
- **Optional**: Can be disabled via config
## Why Nostr?
In censored regions (Venezuela, Cuba, Iran), HTTP exchange rate APIs
are often blocked. Nostr's decentralized relay network provides:
- Censorship resistance
- Zero scaling cost
- Geographic distribution
- No single point of failure
## Security
Clients MUST:
- Verify event.pubkey matches expected Mostro instance
- Verify signature (NIP-01)
- Check expiration timestamp
- Fall back to HTTP API if Nostr fails
## Implementation
- Daemon PR: MostroP2P/mostro#685
- Client spec: MostroP2P/app#36
Related to the Venezuela censorship resistance use case discussed in:
MostroP2P/mostro#684
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add documentation for the new Exchange Rates publishing feature via Nostr.
Mostro instances can now publish Bitcoin/fiat exchange rates as NIP-33 addressable events (kind 30078) to provide censorship-resistant price data for clients.
What's New
Exchange Rates Event (Kind 30078)
"mostro-rates"(unique identifier){"BTC": {"USD": 50000.0, "EUR": 45000.0, ...}}published_at: Unix timestamp (daemon time)source: Rate source (e.g., "yadio")expiration: NIP-40 tag (prevents stale rates)Configuration
Why Nostr?
In censored regions (Venezuela, Cuba, Iran), HTTP exchange rate APIs are often blocked by governments.
Nostr's decentralized relay network provides:
This aligns with Mostro's mission to provide censorship-resistant peer-to-peer Bitcoin trading.
Security
Clients MUST:
event.pubkeymatches the expected Mostro instance pubkeyexpirationtimestamp to avoid stale ratesWithout pubkey verification, a malicious actor could publish fake rates to manipulate prices.
Implementation
Documentation Changes
src/other_events.mdTesting
Related
This feature was motivated by the Venezuela censorship use case where government blocks access to exchange rate APIs, making it impossible for users to see real-time BTC prices for trading.
With Nostr, price data flows freely, enabling peer-to-peer Bitcoin trading even under authoritarian regimes.
Ready for review! 📖