Skip to content

Commit 0812ed4

Browse files
grunchclaude
andcommitted
docs: advertise anti-abuse-bond policy on kind-38385 info event
Adds bond_enabled plus six policy tags (bond_apply_to, bond_slash_on_waiting_timeout, bond_amount_pct, bond_base_amount_sats, bond_slash_node_share_pct, bond_payout_claim_window_days) so clients can show bond cost and slash conditions before a user enters a trade. Replaces the prior "Upcoming" placeholder with a concrete description and a three-state disambiguation for bond_enabled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e2374e8 commit 0812ed4

1 file changed

Lines changed: 39 additions & 3 deletions

File tree

src/other_events.md

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,34 @@ This event contains specific data about a Mostro instance. The instance is ident
157157
"lnd_uris",
158158
"0220e4558a8d9af4988ef6c8def0e73b05403819e49b7fb2db79d322ac3be1547e@172.26.0.2:9735"
159159
],
160+
[
161+
"bond_enabled",
162+
"true"
163+
],
164+
[
165+
"bond_apply_to",
166+
"take"
167+
],
168+
[
169+
"bond_slash_on_waiting_timeout",
170+
"false"
171+
],
172+
[
173+
"bond_amount_pct",
174+
"0.01"
175+
],
176+
[
177+
"bond_base_amount_sats",
178+
"1000"
179+
],
180+
[
181+
"bond_slash_node_share_pct",
182+
"0.5"
183+
],
184+
[
185+
"bond_payout_claim_window_days",
186+
"15"
187+
],
160188
[
161189
"y",
162190
"mostro",
@@ -199,11 +227,19 @@ Below is an explanation of the meaning of some of the labels in this event, all
199227
- `y`: Platform identifier tag values. Mostro publishes `"mostro"` and MAY include a second value with the Mostro instance name from settings.
200228
- `z`: The type of event.
201229

202-
### Upcoming: anti-abuse bond tags
230+
### Anti-abuse bond policy tags
231+
232+
These tags advertise the node's anti-abuse-bond configuration so clients can show users — *before* they enter a trade — whether a bond is required, how much it will cost, and under what conditions it can be slashed. `bond_enabled` is always emitted on daemons that support the feature; the remaining six tags are present only when `bond_enabled = "true"`.
203233

204-
A future Mostro release will publish bond-related tags in this event so clients can detect bond-enabled nodes ahead of a take. The tag set is still being finalized; at minimum it will include a `bond` tag with the value `enabled` or `disabled`. Additional tags describing the bond size policy (percentage, floor) may be added.
234+
- `bond_enabled`: `"true"` if the node enforces an anti-abuse bond on at least one trade side, otherwise `"false"`.
235+
- `bond_apply_to`: which side must lock a bond — `"take"`, `"make"`, or `"both"`.
236+
- `bond_slash_on_waiting_timeout`: `"true"` if a bonded user's bond is slashed when a waiting-state timeout elapses, `"false"` if such timeouts only release the bond.
237+
- `bond_amount_pct`: bond size as a fraction of the trade amount (e.g. `"0.01"` = 1%). The actual bond is `max(bond_amount_pct × order_amount_sats, bond_base_amount_sats)`.
238+
- `bond_base_amount_sats`: minimum bond size in satoshis. Floor applied to `bond_amount_pct × order_amount_sats` so small trades still carry a non-trivial bond.
239+
- `bond_slash_node_share_pct`: fraction of a slashed bond the node retains. The remainder is paid out to the winning counterparty as a Lightning payment. Always within `[0.0, 1.0]`.
240+
- `bond_payout_claim_window_days`: number of days the winning counterparty has, from the slash moment, to submit a Lightning invoice for their share of a slashed bond. After this window the share is forfeited to the node. Clients use this together with the `slashed_at` field carried on `add-bond-invoice` messages (see [Bond payout invoice](./add_bond_invoice.md)) to render the forfeit deadline locally.
205241

206-
Clients that take orders on a node advertising `bond` `enabled` should be prepared to handle the [`pay-bond-invoice`](./pay_bond_invoice.md) action and the `waiting-taker-bond` order status. Until this tag is finalized and shipped, clients should treat the absence of bond tags as "behaviour unknown" and surface a clear error if the node sends `pay-bond-invoice` to a take they cannot handle.
242+
**Disambiguation.** When `bond_enabled` is absent from the event, the daemon predates the bond feature; treat the node as not enforcing bonds. When `bond_enabled = "false"`, the daemon supports the feature but the operator has not enabled it on this instance. When `bond_enabled = "true"`, the remaining six bond tags are present and clients should expect bond messages on this node [`pay-bond-invoice`](./pay_bond_invoice.md) for the bonded user and [`add-bond-invoice`](./add_bond_invoice.md) for the payout recipient on a slashed trade.
207243

208244
## Information about the Relays Where Events Are Published
209245

0 commit comments

Comments
 (0)