LIGHTNING-FUNDERUPDATE(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’Έ LIGHTNING-FUNDERUPDATE (7) πŸ’Έ

okay so this is the lightning-funderupdate page bestie β€” it's the one where you tell your node how it should behave when it's the funder on v2 (dual-funded) channel opens. like, how much of its own money it's willing to throw in, what it charges for leases, all that. it's giving "set it and forget it" but make it finance πŸ’…


🌸 NAME 🌸

funderupdate β€” the command for adjusting your node's funding settings on v2 channels. yes queen, tune your capital allocation strategy πŸŽ€


✨ SYNOPSIS ✨

funderupdate [policy] [policy_mod] [leases_only]
[min_their_funding_msat] [max_their_funding_msat] [per_channel_min_msat]
[per_channel_max_msat] [reserve_tank_msat] [fuzz_percent]
[fund_probability] [lease_fee_base_msat] [lease_fee_basis]
[funding_weight] [channel_fee_max_base_msat]
[channel_fee_max_proportional_thousandths] [compact_lease]

πŸ’– DESCRIPTION πŸ’–

NOTE: you literally must have --experimental-dual-fund enabled or none of these settings take effect. no cap. πŸ™ˆ

So this whole thing is for channel open requests that use dual funding.

Note: to maximize channel leases, the best policy setting is (match, 100). that's the move, iykyk.

Setting any of the 5 options out of lease_fee_base_msat, lease_fee_basis, funding_weight, channel_fee_max_base_msat and channel_fee_max_proportional_thousandths will activate channel leases for this node and advertise these values via the lightning gossip network. And if any one of them is set, the other values just fall back to their defaults. slay.

  • policy (string, optional) (one of "match", "available", "fixed") β€” tells the Funder plugin how to decide how much capital to commit to a v2 open channel request. three policy options, deep-dived below πŸ‘‡
    • match β€” contribute policy_mod percent of their requested funds. valid policy_mod values are 0 to 200. if it's a channel lease request, we match based on their requested funds. if it's not a channel lease request (and lease_only is false), then we match their funding amount. Note: any lease match less than 100 will likely fail, because clients won't accept a lease less than their request. πŸ’€
    • available β€” contribute policy_mod percent of our available node wallet funds. valid policy_mod values are 0 to 100.
    • fixed β€” contributes a fixed policy_mod sats to v2 channel open requests. the default is fixed.
  • policy_mod (msat, optional) β€” the number or 'modification' to apply to the policy. the default is 0sats.
  • leases_only (boolean, optional) β€” only contribute funds to option_will_fund requests that actually pay to lease funds. it'll fund any v2 open request using policy even if they're not seeking to lease funds. note that option_will_fund commits funds for 4032 blocks (~1mo). you must also set lease_fee_base_msat, lease_fee_basis, funding_weight, channel_fee_max_base_msat, and channel_fee_max_proportional_thousandths to advertise available channel leases. the default is False.
  • min_their_funding_msat (msat, optional) β€” minimum funding sats that we require in order to activate our contribution policy to the v2 open. the default is 10k sats.
  • max_their_funding_msat (msat, optional) β€” maximum funding sats that we'll consider to activate our contribution policy to the v2 open. any channel open above this will not be funded. the default is no max (UINT_MAX).
  • per_channel_min_msat (msat, optional) β€” minimum amount that we'll contribute to a channel open. the default is 10k sats.
  • per_channel_max_msat (msat, optional) β€” maximum amount that we'll contribute to a channel open. the default is no max (UINT_MAX).
  • reserve_tank_msat (msat, optional) β€” amount of sats to leave available in the node wallet. the default is zero sats.
  • fuzz_percent (u32, optional) β€” a percentage to fuzz the resulting contribution amount by. valid values are 0 to 100. Note: turning this on with (match, 100) policy will randomly fail option_will_fund leases, because most clients expect an exact or greater match of their requested_funds. the default is 0% (no fuzz).
  • fund_probability (u32, optional) β€” the percent of v2 channel open requests to apply our policy to. valid values are integers from 0 (fund 0% of all open requests) to 100 (fund every request). useful for randomizing opens that receive funds. useful for randomizing opens that receive funds. (yes it says it twice, we love a repetition moment πŸ‘‘) the default is 100.
  • lease_fee_base_msat (msat, optional) β€” flat fee for a channel lease. the node will receive this much extra added to their channel balance, paid by the opening node. note that the minimum is 1sat. the default is 2k sats.
  • lease_fee_basis (u32, optional) β€” a basis fee calculated as 1/10k of the total requested funds the peer is asking for. the node will receive the total of lease_fee_basis times requested funds / 10k satoshis added to their channel balance, paid by the opening node. the default is 0.65% (65 basis points).
  • funding_weight (u32, optional) β€” used to calculate the fee the peer will compensate your node for its contributing inputs to the funding transaction. the total fee is calculated as open_channel2.funding_feerate_perkw times this funding_weight divided by 1000. the node will have this funding fee added to their channel balance, paid by the opening node. the default is 2 inputs + 1 P2WPKH output.
  • channel_fee_max_base_msat (msat, optional) β€” a commitment to a maximum channel_fee_base_msat that your node will charge for routing payments over this leased channel during the lease duration. the default is 5k sats.
  • channel_fee_max_proportional_thousandths (u32, optional) β€” a commitment to a maximum channel_fee_proportional_millionths that your node will charge for routing payments over this leased channel during the lease duration. note that it's denominated in 'thousandths'. a setting of 1 is equal to 1k ppm; 5 is 5k ppm, etc. the default is 100 (100k ppm).
  • compact_lease (hex, optional) β€” a compact description of the channel lease params. when opening a channel, passed in to fundchannel to indicate the terms we expect from the peer.

πŸ¦‹ RETURN VALUE πŸ¦‹

on success, an object is returned containing all this good stuff:

  • summary (string) β€” summary of the current funding policy, e.g. (match 100).
  • policy (string) (one of "match", "available", "fixed") β€” the policy the funder plugin will use to decide how much capital to commit to a v2 open channel request.
  • policy_mod (u32) β€” the policy_mod is the number or 'modification' to apply to the policy.
  • leases_only (boolean) β€” only contribute funds to option_will_fund lease requests.
  • min_their_funding_msat (msat) β€” the minimum funding sats that we require from peer to activate our funding policy.
  • max_their_funding_msat (msat) β€” the maximum funding sats that we'll allow from peer to activate our funding policy.
  • per_channel_min_msat (msat) β€” the minimum amount that we will fund a channel open with.
  • per_channel_max_msat (msat) β€” the maximum amount that we will fund a channel open with.
  • reserve_tank_msat (msat) β€” amount of sats to leave available in the node wallet.
  • fuzz_percent (u32) β€” percentage to fuzz our funding amount by.
  • fund_probability (u32) β€” percent of opens to consider funding. 100 means we'll consider funding every requested open channel request.
  • lease_fee_base_msat (msat, optional) β€” flat fee to charge for a channel lease.
  • lease_fee_basis (u32, optional) β€” proportional fee to charge for a channel lease, calculated as 1/10,000th of requested funds.
  • funding_weight (u32, optional) β€” transaction weight the channel opener will pay us for a leased funding transaction.
  • channel_fee_max_base_msat (msat, optional) β€” maximum channel_fee_base_msat we'll charge for routing funds leased on this channel.
  • channel_fee_max_proportional_thousandths (u32, optional) β€” maximum channel_fee_proportional_millitionths we'll charge for routing funds leased on this channel, in thousandths. (that spelling is straight from the source, we don't fix, we respect πŸ’…)
  • compact_lease (hex, optional) β€” compact description of the channel lease parameters.

πŸ’€ ERRORS πŸ’€

the following error code may occur:

  • -32602 β€” if the given parameters are invalid. like, check ur inputs bestie 😭

🫢 AUTHOR 🫢

Lisa Neigut niftynei@gmail.com is mainly responsible. legend behavior, honestly πŸ‘‘


🌈 SEE ALSO 🌈

lightning-fundchannel(7), lightning-listfunds(7)


⭐ RESOURCES ⭐

main web site: https://github.com/ElementsProject/lightning


πŸ“ EXAMPLES πŸ“

Example 1:

Request:

$ lightning-cli funderupdate
{
  "id": "example:funderupdate#1",
  "method": "funderupdate",
  "params": {}
}

Response:

{
  "summary": "fixed (0sat)",
  "policy": "fixed",
  "policy_mod": 0,
  "leases_only": true,
  "min_their_funding_msat": 10000000,
  "max_their_funding_msat": 4294967295000,
  "per_channel_min_msat": 10000000,
  "per_channel_max_msat": 4294967295000,
  "reserve_tank_msat": 0,
  "fuzz_percent": 0,
  "fund_probability": 100
}

Example 2:

Request:

$ lightning-cli funderupdate -k "policy"="fixed" "policy_mod"="50000sat" "min_their_funding_msat"=1000 "per_channel_min_msat"="1000sat" "per_channel_max_msat"="500000sat" "fund_probability"=100 "fuzz_percent"=0 "leases_only"=False
{
  "id": "example:funderupdate#2",
  "method": "funderupdate",
  "params": {
    "policy": "fixed",
    "policy_mod": "50000sat",
    "min_their_funding_msat": 1000,
    "per_channel_min_msat": "1000sat",
    "per_channel_max_msat": "500000sat",
    "fund_probability": 100,
    "fuzz_percent": 0,
    "leases_only": false
  }
}

Response:

{
  "summary": "fixed (50000sat)",
  "policy": "fixed",
  "policy_mod": 50000,
  "leases_only": false,
  "min_their_funding_msat": 1000,
  "max_their_funding_msat": 4294967295000,
  "per_channel_min_msat": 1000000,
  "per_channel_max_msat": 500000000,
  "reserve_tank_msat": 0,
  "fuzz_percent": 0,
  "fund_probability": 100
}

and that's the whole page bestie, go forth and fund some channels πŸ’œ

Core Lightning v26.06.9 β€” lightning-funderupdate(7), mwah, bye 🧚✨

πŸ“¦ where this page comes from