-
Notifications
You must be signed in to change notification settings - Fork 9
Description
I've been discussing this a lot privately, mainly as a point of comparison when considering tradeoffs in Revault's architecture and/or deployment. Especially with regard to watchtowers, which bring a lot of tradeoffs.
Here i describe how a custody protocol with the same feature set as Revault but with different tradeoffs could be concretely designed.
Conceptual description
We keep the stakeholders / managers types of participants. The purpose is to keep the restrictive delegation of Revault without the burden of managing watchtowers, the cost of using them, and the unpredictability of their enforcement of the policy.
Starting from today's Revault, instead of pre-signing Cancel transaction and giving out an authorization by the form of the signature of an Unvault transaction, coins are locked to both the managers and a set of Cosigning Servers managed by stakeholders. The automated cosigning servers enforce any kind of policy: for instance, "notify the stakeholders and authorize by default after a hour if not told otherwise", or "don't accept any transaction with outputs that don't pay to one of these addresses or any deposit address (whitelist)".
You can still, optionally, have the Emergency.
Concrete modifications to practical-revault
Scripts and transactions
The deposit policy is still a multisig between all the stakeholders.
We introduce a new "Delegation" transaction that spend any number of deposit UTxOs and creates one "delegated" UTxO.
The "delegated" policy has two branches:
- The multisig of the stakeholders; or
- A thresholds of the managers and a given combination of the Cosigning Servers
There is no Unvault, Cancel and UnvaultEmergency transaction anymore. The Spend transaction directly spends from "delegated" UTxOs. The Emergency descriptor and transaction may be kept as well as introducing a "DelegatedEmergency" transaction spending from a "delegated" UTxO.
Coordinator
We don't need the coordinator to synchronize the exchange of presigned transactions' signatures anymore (apart if keeping the Emergency), or to announce a Spend. It may still be used to coordinate the creation of a Spend or a "Delegation" transaction.
Watchtower
Removed, or rather "merged" with the Cosigning Servers in terms of functionality (not messages).
Cosigning server
In place of the single sign message we have today, we have 2 of them to allow the cosigning servers to enforce a timeout without the need to maintain a connection for a long period of time.
We use the first one to "register" a Spend. The second one is used to poll fpr Spend signature by txid (the Cosigning Server may return "ack", "nack", "pending".
Discussion
This design is conceptually much simpler, it's essentially a cold -> warm design with integrated policy enforcement. The protocol is greatly simplified, too. The implementation would very likely be too.
The User Experience would obviously be way neater and intuitive:
- No need to think about the distribution of the coins value in order for managers to not be blocked on stakeholders pre-signing more transactions ("change issue")
- No need to think about the CPFP wallet, logic, or how to represent this as fees in the user interface
- No need to think about propagation issues for the Unvault transaction w/o package relay
- With dynamic fee-bumping, no need to refill every watchtower for every stakeholder
The cost would be much lower:
- No need for an Unvault transaction per deposit UTxO. The "Delegation" tx may be batched.
- No need to allocate some amount of sats per-Unvault and per-Spend for CPFP (a non-trivial amount)
- No need to overpay the fees of the presigned Unvault transaction
- No need to pay for a consolidation transaction (upcoming not-yet-spec'd way to workaround the coins distribution issue from above)
- The enforcement of the policy does not need an expensive onchain transaction
- With dynamic fee-bumping, no need to keep a non-trivial amount of coins for every watchtower for every stakeholder
It also presents some advantages compared to Today's Revault:
- No uncertainty from the fee market for policy enforcement. Policy in this model are applied before giving out the authorization (in the form of a signature of the Spend transaction), as opposed to today's Revault model of "approving by default". The latter relies on many liveness assumptions that are hard to reason about. This is by far the biggest win IMO.
- Plausible deniability. Here, everything is just multisig. By taking some care we can "blend into the mass", while Revault usage has an obvious onchain footprint.
- Easier to introduce a thresholds for Stakeholders. With today's Revault, having a threshold for stakeholders also means that they give up on all being able to enforce delegation/spending policies [0]. With the approach taken here they can have a threshold-based deposit but still always enforce spending policies.
Also note that it shares an advantage of "Revault-with-cosigning-servers-for-spending-policies":
- The keys for Cosigning Servers do not need to be backed up, they can be entirely stored on some kind of HSM. Only the keys of the stakehodlers do, actually.
The obvious disadvantage (heh, there needs to be one, at least!) compared to Revault is in the "securing by decentralizing". Watchtowers are (supposed to be) easy-and-inexpensive-to-spin-up servers that can directly enforce the delegation policies and can be replicated any number of time to reduce some liveness risks. Replacing them with cosigning servers involves introducing a limited number of "participants" which are identified and pre-committed to in the Script.
I think that it is a big deal in theory, but not so much in practice. You can scale the number of Cosigning Servers up by a lot before being in any way remotely close to the cost of using Revault. In addition, you can add more Cosigning Servers with Musig so you can decentralize a lot at very little cost (with additional assumptions wrt the session state, but mutlisig security is additive).
The same goes with the manual broadcast of the Cancel transaction. In today's Revault you assume you can reach the Bitcoin network (or rather, a decent % of the hashrate) with a decent fee (if miners are still incentivized by those and not some out-of-band mechanism). In this version, you are trusting that not all of your cosigning servers were not compromised. It's hard to compare as the former is pretty fuzzy.
Another obvious disadvantage is the increased potential for downtimes. It is inherent to refusing the "authorized by default" mechanism". However, i don't think it's a valid con. To the contrary. Take the same situations for both architectures: a cosigning server down VS a watchtower down. In the former situation, the transaction is stuck. In the latter, the transaction does go through but the policy enforced by this watchtower aren't enforced. I think the best tradeoff in this situation is to prime "security" (as in policy enforcement) over availability.
[0] If that's not obvious: if the deposit multisig in Today's Revault is not an N-of-N then N-1 parties can sign an Unvault transaction without giving you the Cancel transaction as much as they can spend directly from the deposit ("bypass") without you.