Skip to content

Commit

Permalink
Merge revault#106: Larger feerate for the Emergency transaction
Browse files Browse the repository at this point in the history
38b5fbf transactions: increase Emergency feerate to 300sat/vb (Antoine Poinsot)
67058a7 transactions: fix an incorrect feerate (Antoine Poinsot)
26f51a2 messages: move transactions pre-signed feerate specs to transactions.md (Antoine Poinsot)

Pull request description:

  Fixes revault#86

ACKs for top commit:
  danielabrozzoni:
    concept ACK 38b5fbf
  JSwambo:
    Ack 38b5fbf

Tree-SHA512: 72102756e2fe7b6c59b575486caa0fc9cb3671d205e92d3de9876b1a785d2e82f2faf5bfadaca29c2fc5230953b535d7d5846c58bfd7bfe74e69b9dc65698492
  • Loading branch information
darosior committed Oct 14, 2021
2 parents 18931ea + 38b5fbf commit 8d69136
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
12 changes: 0 additions & 12 deletions messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,6 @@ loss of funds.
Acting as a cache in place of -example given- a p2p network, the information stored on the
coordinator is transient.

All [revaulting transactions][revaulting_txs] (the cancel tx and both emergency txs) are signed
paying a fixed `22 sat/WU` feerate and using the `ALL | ANYONECANPAY` signature hash flag. This
is in order to reduce the funds burden on *each* of the watchtowers.

The [unvault transaction][unvault_tx] is signed using a fixed `6 sat/WU` feerate. This is
a completely arbitrary value that was chosen to avoid blocking operations too early in case of
a huge load of transactions on the network and an increase of the mempools minimum feerate.
This transaction's fees can be bumped if not competitive (using the CPFP output) but
it will likely not be relayed if the mempools minimum feerate goes above `84 000 sat/kw`
until the Bitcoin network deploys [package relay][package_relay].


### Rough flow

Expand Down Expand Up @@ -476,4 +465,3 @@ manager cosig_server

[revaulting_txs]: transactions.md#cancel_tx
[unvault_tx]: transactions.md#unvault_tx
[package_relay]: https://github.com/bitcoin/bitcoin/issues/14895
28 changes: 25 additions & 3 deletions transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ The transaction which spends the [`deposit_tx`](#deposit_tx) deposit output, and
unvault output spendable by the `N` stakeholders or the managers (along with the cosigning
servers) after `X` blocks.

The Unvault transaction is signed using a fixed `6 sat/WU` feerate. This is a
completely arbitrary value that was chosen to avoid blocking operations too early
in case of a huge load of transactions on the network and an increase of the
network mempools minimum feerate.
This transaction's fees can be bumped if not competitive (using the CPFP output) but
it will likely not be relayed if the network mempools minimum feerate goes above
`24 sat/vb` until [package relay][package_relay] is deployed on the Bitcoin network.

- version: 2
- locktime: 0

Expand Down Expand Up @@ -115,6 +123,12 @@ The CPFP output value is adjusted depending on the actual transaction size.
The transaction which spends the [`unvault_tx`](#unvault_tx) `output[0]` using the N-of-N path and
pays back to a deposit output (it is therefore another vault deposit transaction).

The Cancel transaction is signed using the `ALL | ANYONECANPAY` signature hash flag, to
allow watchtowers (or anyone else) to attach fee-bumping inputs.

The Cancel transaction is signed at a fixed `22 sat/WU` feerate. This is in order to
reduce the funds burden on *each* of the watchtowers.

- version: 2
- locktime: 0

Expand All @@ -138,11 +152,16 @@ pays back to a deposit output (it is therefore another vault deposit transaction

## emergency_txs

Emergency transactions are used as deterrents against threats targetting stakeholders'
funds. They lock coins to what we call an EDV (Emergency Deep Vault): a script chosen
by the participants and kept obfuscated by the properties of P2WSH, as the emergency
Emergency transactions are used as deterrents against threats targeting stakeholders'
funds. They lock coins to what we call an EDV (Emergency Deep Vault): a script chosen
by the participants and kept obfuscated by the properties of P2WSH, as the emergency
transactions are never meant to be used.

Both Emergency transactions are signed at a fixed `75 sat/WU` feerate.

Both Emergency transaction are signed using the `ALL | ANYONECANPAY` signature hash flag,
to allow watchtowers (or anyone else) to attach fee-bumping inputs.

The Emergency `scriptPubKey` is not known to the managers.


Expand Down Expand Up @@ -218,3 +237,6 @@ Bypass tx spends the [`deposit_tx`](#deposit_tx) and pays to arbitrary addresses
#### OUT

Unspecified


[package_relay]: https://github.com/bitcoin/bitcoin/issues/14895

0 comments on commit 8d69136

Please sign in to comment.