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

Extensible Liquidity Ads #2848

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Extensible Liquidity Ads #2848

wants to merge 4 commits into from

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Apr 15, 2024

The initiator of open_channel2, tx_init_rbf and splice_init can request funding from the remote node. The non-initiator node will:

  • let the open-channel-interceptor plugin decide whether to provide liquidity for new channels or not, and how much
  • always honor liquidity requests on existing channels (RBF and splice) when funding rates have been configured

Liquidity ads are included in the node_announcement message, which lets buyers compare sellers and connect to sellers that provide rates they are comfortable with. They are also included in the init message which allows providing different rates to specific peers.

This implements lightning/bolts#1153. We currently use the temporary tlv tag 1339 while we're waiting for
feedback on the spec proposal.

NB: builds on top of #2865 to make e2e testing easier.

@t-bast t-bast changed the title Add extensible liquidity ads format Extensible Liquidity Ads Jun 3, 2024
@t-bast t-bast force-pushed the liquidity-ads-official branch 3 times, most recently from 6fc8334 to e23a6f5 Compare June 14, 2024 11:24
This commit doesn't contain any logical change, we just move code to
align with the FSM flow. It makes it easier to follow the progress of
the state machine to always scroll down when advancing states.
We refactor `NodeRelay.scala` to re-order some steps, without making
meaningful functional changes. The steps are:

1. Fully receive the incoming payment
2. Resolve the next node (unwrap blinded paths if needed)
3. Wake-up the next node if necessary (mobile wallet)
4. Relay outgoing payment

Note that we introduce a wake-up step, that will be enriched in future
commits and can be extended to include mobile notifications. The file
is now also easier to follow, as steps are done linearly by simply
scrolling down.
@t-bast t-bast force-pushed the liquidity-ads-official branch 2 times, most recently from 8b7dc52 to 16ed4d3 Compare June 18, 2024 16:21
We allow relaying data to contain a wallet `node_id` instead of an scid.
When that's the case, we start by waking up that wallet node before we
try relaying onion messages or payments.
The initiator of `open_channel2`, `tx_init_rbf` and `splice_init` can
request funding from the remote node. The non-initiator node will:

- let the open-channel-interceptor plugin decide whether to provide
  liquidity for new channels or not, and how much
- always honor liquidity requests on existing channels (RBF and splice)
  when funding rates have been configured

Liquidity ads are included in the `node_announcement` message, which
lets buyers compare sellers and connect to sellers that provide rates
they are comfortable with. They are also included in the `init` message
which allows providing different rates to specific peers.

This implements lightning/bolts#1153. We
currently use the temporary tlv tag 1339 while we're waiting for
feedback on the spec proposal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant