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

Support new on-the-fly funding #630

Closed
wants to merge 7 commits into from
Closed

Support new on-the-fly funding #630

wants to merge 7 commits into from

Conversation

dpad85
Copy link
Member

@dpad85 dpad85 commented Sep 25, 2024

This PR adds support for the new on-the-fly funding based on liquidity ads.

This description is a WIP.

For the user, it's an UI change : the cost that is sometimes incurred when receiving payments is not displayed as fees anymore ; instead it's now displayed as a separate outgoing payment (but the cost stays the same).

This change will allow for more options regarding liquidity and funding in the future. For example, opportunistically request additional funding on-the-fly.

More details about the underlying change can be found here:

Also upgraded:
- ktor to 2.3.12
- kotlinx.serialisation to 1.7.2 (transitive)
- kotlinx.coroutine to 1.9.0 (transitive)
- kermit to 2.0.4 (transitive)
- skie to 0.8.4
- sqldelight to 2.0.2
This rule seems to cause a build issue with kotlin 2.0.
We are for now using Testnet3.
This script does not seem necessary anymore, as the framework copying
is already done (require further investigation).
- Updated the liquidity policy (see NodeParamsManager). We
are using a policy that does not target additional liquidity
and that does not use fee credit yet.

- Removed the code updating the peer's swap feerate (it's now
provided by the LSP)

- Updated the received-with database object with new types:
incoming LN payments may contain a funding fee ; payments may
be received through a fee credit (not enabled for now).

- Updated the liquidity-purchase database objects with new
purchase & payment-details type. The lease data are now
legacy and are removed wherever possible.

Note: for the inbound liquidity db objects, we are moving
away from the type_version pattern for serialisation. Instead
the json data type is embedded inside the json by the kotlinx
serialisation library. This makes the code less verbose.

- Added a liquidity purchase wrapper for cloud data.

- Updated the Notification types with new rejection options.
We try to match in this update the serialisation pattern that
was mentioned above.
With the new on-the-fly mechanism, the automated liquidity
operation necesssary to receive some payments are stored as
specific payments. That is, the incoming payments related
to this operation do not have a fee, instead there's a
payment row in the payments history specific to the liquidity
purchase. The operation also has its own payment details page
just like the (already existing) manual liquidity purchase.

The splash screen file has been split into several files, one
for each payment types. This makes the code more flexible.

The liquidity policy objects set in the channels management
screen have been updated to match the NodeParamsManager value.

This commit is a WIP, especially for wording and localisation.
@dpad85
Copy link
Member Author

dpad85 commented Oct 1, 2024

Superseded by #632 which does not need the Kotlin 2.0 update.

@dpad85 dpad85 closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant