lightninglabs / lightninglabs/pool
bid orders: remove restrictions on self_chan_balance and min_chan_size
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 259
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
This is a follow-up to the `self_chan_balance` implemented in https://github.com/lightninglabs/pool/pull/232.
To simplify the first iteration, any bid order submitted with a `self_chan_balance` has the following restrictions:
- `min_chan_size == bid_order_amount`: Disallows partial matches
- `self_chan_balance <= bid_order_amount`: Disallow the taker putting more capital into the channel than is actually leased from the market
This is not optimal for some use cases. For example one can imagine the following scenarios:
- "I want a channel as large as possible, but it has to be at least of size M to be usable for me, with a local balance of N sats."
- "I have some sats left in my Pool account, I just want to push them into a channel of whatever size and close it in the process."
Proposed solution:
- Allow a bid order with a `self_chan_balance` to be matched exactly once (move it to `EXECUTED` directly, even if it could theoretically be matched again). That way the `self_chan_balance` would only be charged from the account once.
- Remove the restriction on the size of `self_chan_balance` itself and only make it dependent on the unreserved account value. Since this would allow the taker to use Pool to open large channels with their own capital without paying execution fees (other than the base fee and chain fees) on that amount we'd need to think about adding a new service fee or bumping the base fee enough to still make this economically for the Pool server.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review PR 232 and trace the current bid-order validation and matching behavior for self_chan_balance. Confirm how one-time execution and unreserved account value should work, then resolve the open service-fee economics before defining completion tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100