1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
[]
# path to tls.cert file
= '/home/user/.polar/networks/1/volumes/lnd/alice/tls.cert'
# path to macaroon file
= '/home/user/.polar/networks/1/volumes/lnd/alice/data/chain/bitcoin/regtest/admin.macaroon'
# lnd grpc host and port
= 'https://127.0.0.1:10001'
# lightning invoices sent by the buyer to Mostro should have at least
# this expiration time in seconds
= 3600
# Hold invoice cltv delta (expiration time in blocks)
= 144
# This is the time that a taker has to pay the invoice (seller) or
# to add a new invoice (buyer), in seconds
= 300
# Retries for failed payments
= 3
# Retries interval for failed payments
= 60
[]
= 'nsec1...'
= ['ws://localhost:7000']
[]
# NIP-01 Kind 0 Metadata (optional)
# Human-readable name for this Mostro instance
# name = "Mostro"
# Short description of this Mostro instance
# about = "A peer-to-peer Bitcoin trading daemon over the Lightning Network"
# URL to avatar image (recommended: square, max 128x128px)
# picture = "https://mostro.network/mostro-avatar.png"
# Operator website URL
# website = "https://mostro.network"
# Mostro Fee
= 0
# Max routing fee that we want to pay to the network, 0.002 = 0.2%
= 0.002
# Max order amount (sats)
= 1000000
# Minimum amount for a payment in satoshis
= 100
# Expiration order hours
= 24
# Max expiration days for an order
= 15
# Expiration of pending orders
= 900
# User rate events scheduled time interval
= 3600
# Relay list event time interval
= 60
# Requested POW
= 0
# Wire transport for protocol messages. A node speaks exactly one:
# "gift-wrap" - protocol v1, NIP-59 gift wraps (kind 1059). DEPRECATED,
# will be removed in v0.19.0 — mostrod will then run protocol
# v2 only and this setting disappears. See
# https://github.com/MostroP2P/mostro/issues/786
# "nip44" - protocol v2, signed kind-14 events with NIP-44 encrypted
# content. Rate-limitable by relays; switch once the clients
# your community uses support protocol v2.
# See docs/TRANSPORT_V2_SPEC.md
= "gift-wrap"
# Anti-spam gate for the "nip44" transport (docs/TRANSPORT_V2_SPEC.md §6
# Phase 2). Proof-of-work (leading-zero bits) demanded of a *first-contact*
# event — one whose visible sender (trade key) is not part of an active
# order/dispute — checked BEFORE decryption. Ongoing trades (known keys) need
# only `pow`; brand-new orders/takes from unseen keys must clear this stiffer
# toll. Omit (or leave commented) to fall back to `pow`. No effect on
# "gift-wrap". Example: keep pow = 0 for cheap ongoing trades but require work
# from first-contact senders.
# pow_first_contact = 16
# How often (seconds) to rebuild the active-trade-pubkey cache the gate
# consults. Lower = a just-taken order's keys fast-path sooner; higher = less
# DB load. Default 60.
# active_pubkeys_refresh_interval = 60
# Publish mostro info interval
= 300
# Bitcoin price API base URL.
# DEPRECATED: prefer `[price.providers.yadio].url` in the new multi-source
# `[price]` block below (see docs/PRICE_PROVIDERS.md §10.1). Lifecycle:
# (a) Now OPTIONAL — once you configure a `[price]` block you may delete this
# key. When it is absent AND `[price]` is also absent, the default
# "https://api.yadio.io" is used for the legacy single-source synthesis.
# (b) Still read by the live market-quote path (/convert) until Phase 4. To
# avoid the live and cached paths hitting different Yadio URLs, the live
# path prefers `[price.providers.yadio].url` when a `[price]` block is
# present and only falls back to this key otherwise.
# (c) Fully removed in Phase 5.
= "https://api.yadio.io"
# Fiat currencies accepted for orders - leave empty [] to accept all fiat currencies
= ['USD', 'EUR', 'ARS', 'CUP']
# Maximum orders per response in orders action
= 10
# Development sustainability fee
# Percentage of Mostro fee sent to development fund (0.30 means 30% of the Mostro fee)
= 0.30
[]
= "sqlite://mostro.db"
# Event expiration configuration
[]
# Order events (kind 38383) - trades resolve quickly
= 30
# Rating events (kind 38384) - reputation history retention
= 90
# Dispute events (kind 38386) - need longer retention for auditing
= 90
# Fee audit events (kind 8383) - annual transparency
= 365
# Protocol-v2 direct messages (kind 14) - trade lifetime plus dispute window
= 30
[]
# Enable RPC server for direct admin communication
= false
# RPC server listen address
= "127.0.0.1"
# RPC server port
= 50051
# Duration in seconds after which inactive rate-limiter entries are evicted
# rate_limiter_stale_duration = 3600
# Multi-source price providers (see docs/PRICE_PROVIDERS.md).
# Absent section ≡ legacy single-source behaviour synthesised from
# `[mostro].bitcoin_price_api_url` + `exchange_rates_update_interval_seconds`
# + `publish_exchange_rates_to_nostr`. Uncomment the block to take control.
#
# [price]
# # Poll cadence and freshness budget.
# update_interval_seconds = 300
# max_price_staleness_seconds = 1800
# # Discard a source whose value deviates more than this % from the median
# # (only applies with >= 3 sources for a currency).
# outlier_threshold_pct = 5.0
# # Per-provider request timeout and circuit-breaker (cooldown caps at 30 min).
# provider_timeout_seconds = 10
# provider_failure_threshold = 3
# provider_failure_cooldown_seconds = 120
# # Publish the aggregated rates to Nostr (kind 30078). Replaces the legacy
# # `publish_exchange_rates_to_nostr`.
# publish_to_nostr = true
#
# [price.providers.yadio]
# enabled = true
# url = "https://api.yadio.io"
#
# [price.providers.coingecko]
# enabled = true
# url = "https://api.coingecko.com/api/v3"
# # api_key = "CG-xxxx" # optional demo/pro key; raises rate limits. Pro
# # plans use url = "https://pro-api.coingecko.com/api/v3" (the adapter picks
# # the matching auth header from the host).
#
# # Keyless, CDN-hosted, 300+ currencies incl. CUP at the OFFICIAL rate — so
# # CUP/MLC are excluded to avoid mixing official with the informal-market
# # sources (docs/PRICE_PROVIDERS.md §6.6).
# [price.providers.currency_api]
# enabled = true
# url = "https://currency-api.pages.dev/v1"
# # Ordered mirrors tried in sequence when `url` fails this tick.
# fallback_urls = ["https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1"]
# except = ["CUP", "MLC"]
#
# # Keyless, ~28 major fiats, no CUP/MLC. Mid-market (`last`) only.
# [price.providers.blockchain]
# enabled = true
# url = "https://blockchain.info"
#
# # El Toque — informal-market CUP/MLC (fiat-cross, resolved against the
# # aggregated USD/BTC anchor; §6.3, §11.3). Opt-in: requires a free Bearer
# # token. Scoped to CUP/MLC only — that is all this source contributes.
# # NOTE: the request wiring is PROVISIONAL pending a confirmed payload from
# # the token-gated API — keep `enabled = false` in production until then
# # (see docs/PRICE_PROVIDERS.md §11.3).
# [price.providers.eltoque]
# enabled = false
# url = "https://tasas.eltoque.com"
# # token = "xxxx" # REQUIRED when enabled; provider refuses to start otherwise
# only = ["CUP", "MLC"]
# Anti-abuse bond (issue #711). Opt-in, disabled by default. Uncomment to
# require a Lightning hold-invoice bond from takers and/or makers. See
# docs/ANTI_ABUSE_BOND.md for the full phased rollout.
#
# [anti_abuse_bond]
# enabled = false
# # bond = max(amount_pct * order_amount_sats, base_amount_sats)
# # amount_pct is a unitless fraction (0.01 = 1%); base_amount_sats is a sat floor.
# amount_pct = 0.01
# base_amount_sats = 1000
# # "take" | "make" | "both"
# apply_to = "take"
# # Note: there is no `slash_on_lost_dispute` flag — dispute slashes are
# # solver-directed via the `BondResolution` payload (Phase 2).
# slash_on_waiting_timeout = false
# # Fraction of a slashed bond that the node retains (the rest goes to the
# # winning counterparty). Funds solver compensation for dispute work.
# slash_node_share_pct = 0.5
# payout_invoice_window_seconds = 300
# payout_max_retries = 5
# # Days the winner has to claim their share by submitting a bolt11; after
# # this the bond closes as `forfeited` and the node retains everything.
# payout_claim_window_days = 15