-
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
Protocol for closing DLC by mutual consent #161
Comments
I think a PSBT would serve better than a new tlv |
PSBT could make more sense, but would still need to be communicated during closing negotiation, meaning a tlv (idk if psbt in a tlv makes sense) A similar example of closing tlv is closing negotiation in LN #Bolt 2 spec, although this is part of the core protocol. |
@matthewjablack What do you think about zero-feerate signature provided by Alice to Bob ? Let's say at cet_locktime expiration, Alice sends a |
Strong disagree, PSBTs are the worst and shouldn't be used anywhere where we can have a specification instead.
Would love a quick description of the details here as I haven't spent the time researching how those sighash codes work :) |
Note from May meeting:
|
The introduction specifies that in a DLC, contract collateral is locked in an output that can only be spent by mutual consent.
However, there is currently no protocol for requesting to close a DLC before cet_locktime with mutual consent.
Additionally, there are some concerns with requesting to close a DLC early. Say Alice wishes to exit her DLC early. Alice could simply provide a mutual close signature to Bob. However, if Bob does not respond this could result in a free option problem where Bob can simply wait for favorable market conditions and sign and broadcast when it is optimal for him.
After chatting with @nkohen it seems the simplest choices to solve this issue are invalidation or revocation (without going into the realm of verifiable encryption).
Invalidation could be solved by having Alice provide her own Input in addition to the DLC Input. If Bob doesn't respond after a certain amount of time, Alice could spend this input, invalidating this close tx.
A
close_dlc
Message could be formatted as following:close_dlc_v0
)32*byte
:contract_id
]signature
:close_signature
]u64
:offerPayoutSatoshis
]u64
:acceptPayoutSatoshis
]u16
:num_funding_inputs
]num_funding_inputs*funding_input
:funding_inputs
]payout_spk
andpayout_serial_id
fromoffer_dlc
as well aspayout_spk
andpayout_serial_id
fromaccept_dlc
could be used for constructing the close transactionfunding_inputs
would be the input(s) provided by Alice that could be invalidated after a timeout.Curious to hear if folks think this should be added to the spec. I personally think there are quite a few use cases for closing a DLC (such as requesting to close a position where a market maker is the counterparty).
This might also make more sense to add as an optional second layer interaction rather than to the core protocol.
The text was updated successfully, but these errors were encountered: