Skip to content

Commit 2ec4c38

Browse files
grunchclaude
andcommitted
docs: fix bond doc review findings
- bond_slashed.md: 'cancelled' → 'canceled' (American spelling throughout) - bond_slashed.md: slash_on_waiting_timeout → bond_slash_on_waiting_timeout (correct wire tag name per other_events.md kind-38385 spec) - pay_bond_invoice.md: 'rumor's content' → 'message's content' - pay_bond_invoice.md: maker-bond SmallOrder status 'waiting-maker-bond' → 'pending' (matches flow.rs:380 which uses Some(Status::Pending) as the wire-facing NIP-69 bucket; waiting-maker-bond is daemon-internal only and never emitted in DM payloads) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 5320436 commit 2ec4c38

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/bond_slashed.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
The `bond-slashed` action is a notification Mostro sends to a bonded party when their anti-abuse bond has been **settled due to a waiting-state timeout**. It is a forfeiture notice: the bond HTLC has already been claimed into Mostro's wallet by the time this message is sent.
44

5-
> **Scope.** This action is only emitted on the **timeout slash** path (scheduler-driven, gated by `slash_on_waiting_timeout = true` in the Mostro info event). It is **not** sent on the dispute-slash path — when a solver slashes a bond via [`admin-settle`](./admin_settle_order.md) or [`admin-cancel`](./admin_cancel_order.md), the slashed party receives the `admin-settled` / `admin-canceled` confirmation instead.
5+
> **Scope.** This action is only emitted on the **timeout slash** path (scheduler-driven, gated by `bond_slash_on_waiting_timeout = "true"` in the Mostro info event — see [Other events published by Mostro](./other_events.md#anti-abuse-bond-policy-tags)). It is **not** sent on the dispute-slash path — when a solver slashes a bond via [`admin-settle`](./admin_settle_order.md) or [`admin-cancel`](./admin_cancel_order.md), the slashed party receives the `admin-settled` / `admin-canceled` confirmation instead.
66
77
## Direction and trigger
88

99
- **Direction:** Mostro → the party whose bond was slashed.
10-
- **Trigger:** The waiting-state timeout elapsed while the responsible party had not performed their expected trade action (e.g. the seller never paid the hold invoice while in `waiting-payment`, or the buyer never submitted an invoice in `waiting-buyer-invoice`), and the operator has configured `slash_on_waiting_timeout = true`.
10+
- **Trigger:** The waiting-state timeout elapsed while the responsible party had not performed their expected trade action (e.g. the seller never paid the hold invoice while in `waiting-payment`, or the buyer never submitted an invoice in `waiting-buyer-invoice`), and the operator has configured `bond_slash_on_waiting_timeout = "true"` in the info event.
1111
- The `amount` in the payload is the **slashed bond amount in satoshis** — not the trade amount.
1212

1313
## Wire format
@@ -45,7 +45,7 @@ The `amount` field in the embedded `SmallOrder` is the **slashed bond amount** (
4545
After `bond-slashed` is sent to the responsible party, Mostro also:
4646

4747
1. **Cancels or republishes the order** depending on which party was responsible:
48-
- **Maker responsible** (e.g. maker-as-seller never paid the hold invoice): the order is **cancelled** (since the maker cannot be trusted to fulfil it). The maker receives the `bond-slashed` notice followed by a `canceled` confirmation.
48+
- **Maker responsible** (e.g. maker-as-seller never paid the hold invoice): the order is **canceled** (since the maker cannot be trusted to fulfil it). The maker receives the `bond-slashed` notice followed by a `canceled` confirmation.
4949
- **Taker responsible** (e.g. taker-as-buyer never submitted their invoice): the order is **republished** to the book as `pending` so the maker can be matched again. The taker receives `bond-slashed` followed by `canceled`. The maker's bond (if any) remains `Locked`.
5050

5151
2. **Asks the winning counterparty for a payout invoice** by sending them an [`add-bond-invoice`](./add_bond_invoice.md) message for their share of the slashed bond (governed by `bond_slash_node_share_pct` — the node retains its share, the rest goes to the counterparty).

src/pay_bond_invoice.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `bond_apply_to` tag in the Mostro info event (kind 38385) tells clients whic
1616

1717
### Mostro message to the taker
1818

19-
The rumor's content has the same shape as `pay-invoice`; only the action discriminator differs:
19+
The message's content has the same shape as `pay-invoice`; only the action discriminator differs:
2020

2121
```json
2222
[
@@ -94,7 +94,7 @@ When `apply_to` is `"make"` or `"both"`, the **maker** must lock a bond before t
9494

9595
### Mostro message to the maker
9696

97-
The action and wire shape are identical to the taker case; only the embedded `status` field in the `SmallOrder` differs:
97+
The action and wire shape are identical to the taker case:
9898

9999
```json
100100
[
@@ -108,7 +108,7 @@ The action and wire shape are identical to the taker case; only the embedded `st
108108
{
109109
"id": "<Order Id>",
110110
"kind": "sell",
111-
"status": "waiting-maker-bond",
111+
"status": "pending",
112112
"amount": 7851,
113113
"fiat_code": "VES",
114114
"fiat_amount": 100,
@@ -125,7 +125,7 @@ The action and wire shape are identical to the taker case; only the embedded `st
125125
]
126126
```
127127

128-
> Note: `"waiting-maker-bond"` is the daemon-internal status echoed in the DM payload. No NIP-33 order event has been emitted yet at this point.
128+
> Note: the `SmallOrder` echo always carries `"status": "pending"` — this is the NIP-69 wire bucket the order will appear in once the bond locks and the order is published. The daemon-internal state `waiting-maker-bond` is tracked only in the daemon's database and is never emitted in DM payloads. No NIP-33 order event has been emitted yet at this point.
129129
130130
For **range sell orders**, the bond is sized against `max_amount` (not the individual fiat_amount). The `SmallOrder` echo will reflect the range order fields (`min_amount`, `max_amount`).
131131

0 commit comments

Comments
 (0)