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

Merged
merged 3 commits into from
Sep 24, 2024
Merged

Extensible Liquidity Ads #2848

merged 3 commits into from
Sep 24, 2024

Commits on Sep 24, 2024

  1. Add support for extensible liquidity ads

    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.
    t-bast committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    d3a7283 View commit details
    Browse the repository at this point in the history
  2. Add channelCreationFee to liquidity ads

    Creating a new channel has an additional cost compared to adding
    liquidity to an existing channel: the channel will be closed in the
    future, which will require paying on-chain fees. Node operators can
    include a `channel-creation-fee-satoshis` in their liquidity ads to
    cover some of that future cost.
    t-bast committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    5b5452e View commit details
    Browse the repository at this point in the history
  3. Add liquidity purchases to the AuditDb

    Whenever liquidity is purchased, we store it in the `AuditDb`. This lets
    node operators gather useful statistics on their peers, and which ones
    are actively using the liquidity that is purchased.
    
    We store minimal information about the liquidity ads itself to be more
    easily compatible with potential changes in the spec.
    t-bast committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c6a1199 View commit details
    Browse the repository at this point in the history