|
| 1 | +# Bond slashed notification |
| 2 | + |
| 3 | +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. |
| 4 | + |
| 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. |
| 6 | +
|
| 7 | +## Direction and trigger |
| 8 | + |
| 9 | +- **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 `bond_slash_on_waiting_timeout = "true"` in the info event. |
| 11 | +- The `amount` in the payload is the **slashed bond amount in satoshis** — not the trade amount. |
| 12 | + |
| 13 | +## Wire format |
| 14 | + |
| 15 | +```json |
| 16 | +[ |
| 17 | + { |
| 18 | + "order": { |
| 19 | + "version": 1, |
| 20 | + "id": "<Order Id>", |
| 21 | + "action": "bond-slashed", |
| 22 | + "payload": { |
| 23 | + "order": { |
| 24 | + "id": "<Order Id>", |
| 25 | + "kind": "sell", |
| 26 | + "status": null, |
| 27 | + "amount": 785, |
| 28 | + "fiat_code": "VES", |
| 29 | + "fiat_amount": 100, |
| 30 | + "payment_method": "face to face", |
| 31 | + "premium": 1, |
| 32 | + "created_at": null |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + }, |
| 37 | + null |
| 38 | +] |
| 39 | +``` |
| 40 | + |
| 41 | +The `amount` field in the embedded `SmallOrder` is the **slashed bond amount** (not the original trade amount). For a range-order maker bond, this is the proportional slice amount for the taken sub-order. The `status` field is `null` on this message — the `SmallOrder` carries only the bond context (id, kind, amounts), not an order status; clients should rely on the `bond-slashed` action itself, and on the separate order-status messages that follow (`canceled` for the order, plus a republished NIP-33 event when the order returns to the book). |
| 42 | + |
| 43 | +## What happens next |
| 44 | + |
| 45 | +After `bond-slashed` is sent to the responsible party, Mostro also: |
| 46 | + |
| 47 | +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 **canceled** (since the maker cannot be trusted to fulfil it). The maker receives the `bond-slashed` notice followed by a `canceled` confirmation. |
| 49 | + - **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`. |
| 50 | + |
| 51 | +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). |
| 52 | + |
| 53 | +## Expected client behaviour |
| 54 | + |
| 55 | +- Surface `bond-slashed` to the user as an explicit forfeiture notice, not as a generic cancellation. Suggested wording: *"Your bond of `amount` Sats has been forfeited due to a waiting-state timeout."* |
| 56 | +- This action is distinct from `canceled` — clients should not suppress it or merge it into the cancel flow. |
| 57 | +- A `canceled` message will typically follow for the order itself; clients should handle both. |
| 58 | + |
| 59 | +## Note on cancels vs. slashes |
| 60 | + |
| 61 | +A cancel sent by either party **before** the timeout elapses never triggers `bond-slashed`. Bonds are always released (never slashed) on user-initiated cancels. Only the automated scheduler-driven timeout slash path emits this action, and only when `slash_on_waiting_timeout = true` is set by the operator. |
0 commit comments