Skip to content

Wraith: replace bonds with UTXO ownership proof and outpoint banning (must precede the ghost-pay deletion) #699

Description

@defenwycke

Audited at f3736bc33.

The coupling

Round bonds are escrowed in the Ghost Pay L2:

/// Per-participant bond escrowed in ghost-pay L2 at registration.tier.rs

This is not theoretical. cargo test -p wraith-coordinator fails on bond_e2e_real_ghostpay_full_lifecycle with "ghost-pay binary not found". Wraith's anti-DoS mechanism cannot be tested, let alone run, without the binary we are deleting.

Ordering is therefore fixed: bond replacement must land before ghost-pay is removed, not after.

Why bonds can go

The bond exists solely to punish register-then-refuse-to-sign, which kills a round for everyone. The standard alternative needs no escrow:

  • Prove control of the input UTXO at registration.
  • Ban a disrupting outpoint for a cooldown period.

Honest participants pay nothing. An attacker must make an on-chain transaction to obtain a fresh UTXO per attack — real cost, paid to miners, scaling with how hard they push. This also satisfies the standing decision that participation must not require a bond.

Blocker: there is no ownership proof today

bins/wraith-coordinator/src/api/session_inputs.rs validates the bond, enrolment and input arithmetic, but does not verify that the submitter controls the UTXO. Without that, banning is unsafe — anyone could register someone else's coin to get it banned, or disrupt rounds for free.

Fix, in order

  1. Add ownership proof at registration (sign the session id with the input's key).
  2. Add the ban list and cooldown.
  3. Delete the bond subsystem — bond.rs (657), bond_ledger_http.rs (521), bond_resolution.rs (231), bond_e2e.rs (1,144) — about 2,553 lines.
  4. Only then remove ghost-pay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions