clboss icon indicating copy to clipboard operation
clboss copied to clipboard

clboss-withdraw?

Open rustyrussell opened this issue 3 years ago • 3 comments

If I want to pull some funds out of my node, I currently turn off clboss, close a channel at random, and withdraw. It'd be nice if clboss figured out how to get enough onchain funds to make the payment for me, instead.

rustyrussell avatar Mar 15 '21 23:03 rustyrussell

I would second this feature, as I have to do the same procedure :)

willcl-ark avatar Mar 20 '21 19:03 willcl-ark

Suggest clboss-withdraw be a wrapper around the submarine swap with user supplied address and amount.

Cons

  • using a third party so is unreliable, and subject to their amount restrictions

Pros

  • Withdraw creates remote channel capacity
  • Good for privacy, doesn't expose your lightning node or balance on chain

ghost avatar Mar 21 '21 21:03 ghost

You can use clboss-ignore-onchain then close channels and withdraw, without disabling clboss, that is the intent of that command after all, to ignore onchain funds temporarily. This still requires multiple commands as well as waiting.

@AutonomousOrganization has good idea I think. Though it would require some restructuring of the code.

  • the onchain-funds-announcer should use a different new message for announcing onchain funds.
  • move the ignore-onchain mechanism to a new module that accepts the "raw" onchain funds announce and emits the "pickled" onchain funds announce (i.e. the current message).
  • Make the new module a swapper.
  • When a clboss-withdraw command is received, put it in the db as a set of payments to make. Then trigger a swap of the value.
  • If the raw onchain funds announcement is received, check if we have pending payments that can now be fulfilled, and withdraw if so (possibly with some heuristics to hold off for future swaps if there are still other pending payments as well, to automatically merge multiple withdraws). Otherwise check for ignore-onchain timeout and if not ignore-onchain, announce the "pickled" onchain funds announcement (which will trigger the channel creator).

ZmnSCPxj avatar May 03 '21 02:05 ZmnSCPxj