-
Notifications
You must be signed in to change notification settings - Fork 455
Introduce FundingContributionBuilder API #4516
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
base: main
Are you sure you want to change the base?
Changes from all commits
b4b3bfb
41a2baa
11610af
d3ad62b
12970b9
fa10899
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6638,20 +6638,24 @@ impl< | |
| /// The splice initiator is responsible for paying fees for common fields, shared inputs, and | ||
| /// shared outputs along with any contributed inputs and outputs. When building a | ||
| /// [`FundingContribution`], fees are estimated at `min_feerate` assuming initiator | ||
| /// responsibility and must be covered by the supplied inputs for splice-in or the channel | ||
| /// balance for splice-out. If the counterparty also initiates a splice and wins the | ||
| /// tie-break, they become the initiator and choose the feerate. The fee is then | ||
| /// re-estimated at the counterparty's feerate for only our contributed inputs and outputs, | ||
| /// which may be higher or lower than the original estimate. The contribution is dropped and | ||
| /// the splice proceeds without it when: | ||
| /// responsibility. Contributions fall into two cases: | ||
| /// - **input-backed contributions**: when wallet inputs are selected, those inputs fund both | ||
| /// the requested value added to the channel and any explicit withdrawal outputs | ||
|
Comment on lines
+6642
to
+6643
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hope this isn't too pedantic, bit using "fund" here may be confusing for the withdrawal case. I think of "fund" more as funding a channel rather than how the contribution fees are paid for. It seems a little overloaded here when talking about withdrawal outputs. Perhaps we can re-word similar to the second bullet where paying for fees and withdrawal outputs is mentioned? |
||
| /// - **input-less contributions**: when no wallet inputs are selected, fees and explicit | ||
| /// withdrawal outputs are paid from the channel balance | ||
| /// | ||
| /// If the counterparty also initiates a splice and wins the tie-break, they become the | ||
| /// initiator and choose the feerate. The fee is then re-estimated at the counterparty's | ||
| /// feerate for only our contributed inputs and outputs, which may be higher or lower than the | ||
| /// original estimate. The contribution is dropped and the splice proceeds without it when: | ||
| /// - the counterparty's feerate is below `min_feerate` | ||
| /// - the counterparty's feerate is above `max_feerate` and the re-estimated fee exceeds the | ||
| /// original fee estimate | ||
| /// - the re-estimated fee exceeds the *fee buffer* regardless of `max_feerate` | ||
|
wpaulino marked this conversation as resolved.
|
||
| /// | ||
| /// The fee buffer is the maximum fee that can be accommodated: | ||
| /// - **splice-in**: the selected inputs' value minus the contributed amount | ||
| /// - **splice-out**: the channel balance minus the withdrawal outputs | ||
| /// - **input-backed contributions**: the original fee plus any change output value | ||
| /// - **input-less contributions**: the channel balance minus the withdrawal outputs | ||
| /// | ||
| /// # Events | ||
| /// | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.