lightninglabs / lightninglabs/pool
leases: create new opt-in mode for economically rational makers/takers
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 259
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
In Pool as is, when a lease expires, needer the maker not the taker automatically close out the lease yet. This was design to be predictable and let both sides decide if they wish to keep the channel open or not. An incremental step from this model would be to implement auto closing (and later on lease roll over!) in an opt-in manner, based on opportunity costs (from the PoV of the maker) and lease efficacy (from the PoV of the taker).
### Economically Rational Makers
Once a lease is up, a maker should asses the lease itself to determine if the channel should be _closed_ or not. As they're the one that opened the channel, they must pay the closing fees themselves. Therefore, maker that has sold a channel should only close out a lease iff:
* The premium earned minus the potential close fee is greater than zero.
* The above, plus an opportunity to earn an additional premium within teh auction that will cover _both_ the closing fee of this existing lease, and also the new opening fees.
Alternatively, the maker may wish to keep the channel open if the _routing fee revenue_ sourced from/to the channel is deemed to be "attractive". Attractive fee revenue in this case is subjective, and contextual. The value of a sold lease should be compared to the active fee revenue of all the existing channels a Maker has open. Such figures can be obtained via various APIs in the [Faraday](https://github.com/lightninglabs/faraday) library.
### Economically Rational Takers
On the other side of things, a taker has purchased the propensity to receive/send using the channel. Once a lease is up, and assuming roll-over has been implemented, they should either seek out a new lease (if the effective service of the prior lease is deemed to be "poor"), or a _cheaper_ lease can be found elsewhere.
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
No files, tests, or entry points are named in the issue. Start by clarifying the opt-in behavior and the maker and taker decision criteria, including lease rollover and routing-fee comparisons; done should include an agreed implementation scope and validation plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, payments
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100