Skip to content
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

ADR for DLC collaborative settlement #49

Closed
Tracked by #17
luckysori opened this issue Jan 27, 2023 · 1 comment
Closed
Tracked by #17

ADR for DLC collaborative settlement #49

luckysori opened this issue Jan 27, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation Stale

Comments

@luckysori
Copy link
Contributor

luckysori commented Jan 27, 2023

We need to define what happens when a DLC in a DLC channel is settled off-chain. This is a requirement, as we don't want to go on-chain every time that a CFD is closed. rust-dlc doesn't support settling the DLC output into the channel; it only supports collaborative settlement on-chain.

I can see 2 choices:

  1. DLC is replaced by 1-2 outputs in the DLC channel paying directly to either party.
  2. DLC channel is removed from the split_transaction and the coins are allocated to outputs paying to either party in the Lightning commitment transaction.

Option 1 requires modifying regular rust-dlc to support outputs other than a DLC in the buffer_transaction. Interestingly, this option means that the non-DLC funds in the DLC channel would only be readily available for trading.

[Preferred] Option 2 requires investigating the feasibility of going back and forth between a split_transaction and a regular funding_transaction as the user opens and closes positions.

Let's document our choice in an ADR and create a follow-up ticket with further steps towards the implementation.


Having discussed the product situation with @da-kami, we reached the conclusion that we want the funds in the sibling channels to either be (1) in a DLC or (2) readily available for Ligthning payments. This means that we've eliminated the concept of the trading wallet.

Given this, it appears to make little sense to go for option 1, as we don't want to write code to have coins sitting around in a hidden "trading wallet".

@luckysori luckysori added documentation Improvements or additions to documentation MVP labels Jan 27, 2023
@holzeis holzeis mentioned this issue Jan 31, 2023
10 tasks
@holzeis holzeis removed the MVP label Apr 11, 2023
@github-actions
Copy link

github-actions bot commented Jul 4, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 4, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Stale
Projects
None yet
Development

No branches or pull requests

2 participants