-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Free option problem during Funding Phase #155
Comments
I think this is covered by
Though the wording could maybe be made more explicit.
I'm not sure about having it as a parameter in the protocol. I think it makes more sense to carefully check that the fee rate is adequate with respect to current mempool conditions and then have a global timeout. Open for discussions though. |
So a My understanding for
Perhaps there needs to be a |
My understanding was that it referred to both situations. But if we are having this discussion and both of us aren't sure, it probably means that it's not clear enough. @ariard can you confirm which one it is? |
Currently, funding transactions signatures are only known by the DLC initiator, which as you described W.r.t to a), the spec currently suggests both DLC counterparties to fee-bump the funding transaction W.r.t to b) the current spec says
The first part of the sentence ("if a funding signature has been sent") targets the acceptor, but I A 3rd issue raised in this issue is when it's lawful for both counterparties to try a double-spend |
W.r.t a) I think suggesting that both DLC counterparties fee-bump the funding tx in case it doesn't confirm is reasonable. W.r.t b) Isn't it the
So in this case:
I guess
Agreed. Are you thinking of a |
I think it will be difficult to have a "very short" timeout as it is difficult to rely on transaction propagation. Maybe a solution would be to add a step to the protocol where the acceptor also shares his signatures for the fund tx, in which case it would be possible and meaningful to have a short timeout on this message which would make the UX smooth. |
I think this is a great idea! In that case, the full set of messages could be something like |
The only problem here is that the Accepter doesn't need to ever send that final message |
Right, and I guess the assumption is if |
Just read the whole thread, here are my thoughts:
EDIT: To be clear, the |
On further discussion in slack with Tibo, I've decided that I don't actually have any opinions on the optional vs. mandatory nature of points 4 and 5 |
You're right, the initiator doesn't learn the acceptor signature. I guess I've been confused with the dual-funding_tx proposal where the initiator is the one collecting all the signatures and responsible of the fee-bumping.
I would rather shun away from any mempool-detection as lightclient don't have a mempool and it's gameable by broadcasting the funding_tx in your local mempool and a double-spend/pinning tx to the rest of the network. Let's consider the following framework of actions and see the margin of actions we have to solve the call_option. Those are the actions counterparties can take with the current transactions/signatures exchanged, not exactly what the spec is requiring to do. An Acceptor:
An Initiator:
As you can observe by running the optional paths, in case of malicious counterparties, we have the choice between overpaying bumping feerate OR infinite timevalue DoS. The current spec is recommending the first option as it forces the attacker to engage in a scorched earth game and to bid competing fees in the mempool to maintain the pin. Note, this last point benefits the Acceptor only if it does engage in funding input double-spend once reaching its With this context in mind, I think solving the call_option by either two-sided fee-bumping or complete signatures exchange will only complexify further this part of the spec. And introduce new issues like asynchronous fee-bumping overshooting the package feerate far above what is required for block inclusion. What we might consider in the feature would be a premium fee paid by the initiator to the acceptor to cover mempool spikes. Such fee could be zero or even negative if the mempool might dry-up in near-feature. It could be added on any change output. I would shun away from black-listing from now, failing to confirm the funding_tx might have a lot of acceptable reasons like a network outage or black mempool spikes. We might introduce service-level-agreement negotiation feature in the future. Lastly, I think a I'm pretty sure I need to correct the current spec to make it clearer, but for v0 I'm of the opinion we shouldn't increase its scope. Note also, we won't reuse most of the work here once we piggyback on payment channels and if get package-relay, a lot of those issues should be flattened. |
The main goal of complete signature exchange (or An Initiator:
Tbh I'm not trying to convince anybody that |
The more I think about this the more it seems to me that messages such as |
I do think ACK adding second layer interaction section |
During the Funding Phase, the Non-Interactive-Protocol specifies that
if all counter-party CET and funding signatures are received
then the nodeMUST finalize the funding transaction with a local SIGHASH_ALL signatures
andMUST broadcast the funding transaction
However, if a node does not perform these actions, it puts the counter-party in an awkward situation. If they do nothing, then the node can monitor changes in the market, and broadcast when it is optimal for them.
In this case, the counter-party should move their UTXOs, either to a new address in their wallet or into a new DLC, they should blacklist the node, and they should also monitor the chain to ensure the node doesn't broadcast the funding transaction at a later point.
This should be specified in the spec, and there should probably also be a
timeout
value in the offer message / accept message to specify how long a party will wait for a transaction to be broadcast.The text was updated successfully, but these errors were encountered: