Commit Graph

13 Commits

Author SHA1 Message Date
Gálli Zoltán
6bbd26af18 feeadjuster: review fixes
- forcefeeadjust method becomes feeadjust
- call feeadjust in plugin init
- prevent calling setchannelfee multiple times with the same parameters
- new optional get_ratio_hard and get_ratio_soft functions
- safety check in get_ratio functions
- maybe_setchannelfee is more concise thanks to @m-schmoock
- new test cases by @m-schmoock
2020-11-28 14:49:26 +01:00
Gálli Zoltán
ca518fd291 feeadjuster: forcefeeadjust can run after a successful payment too 2020-11-28 14:49:26 +01:00
Gálli Zoltán
a431fe0495 feeadjuster: method to adjust all existing channels
After start using this plugin, now you have a method to adjust fees for all of your channels. Ideally called only once.

Also, now it is allowed to customize "feeadjuster-ratio-base" to set up fee ratio:
New fee = <default fee> * feeadjuster-ratio-base**(0.5 - <our liquidity ratio>)
2020-11-28 14:49:26 +01:00
Michael Schmoock
75c4194b03 feeadjuster: adds imbalance limiter 2020-11-11 12:00:27 +01:00
Michael Schmoock
ad9c5df9ef feeadjuster: remove unused loop 2020-11-11 12:00:27 +01:00
Michael Schmoock
9809cc2dfd feeadjuster: fix typos 2020-11-11 12:00:27 +01:00
Antoine Poinsot
78c24afe48 feeadjuster: allow to customize the update threshold
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
c675979a21 jitrebalance: we might have many channel entries with one peer
Co-Authored-By: Michael Schmoock <michael@schmoock.net>
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
3617674dc4 feeadjuster: fuzz update trigger treshold, add hysterisis
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
26c25fc8ee feeadjuster: unparallelize
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
d80b30579e feeadjuster: only update fees on substantial unbalancing
5% is a rather conservative value

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
4e5b26dd1e feeadjuster: always update the configuration's base and ppm fees
This avoids exponentially updating them by only multiplying constants.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
a86ef381e7 feeadjuster: a plugin to adjust fees depending on balancing
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00