Closed Impa10r closed 10 months ago
Running the modified af.py since 1 week with these AF settings
I am very satisfied with this new kind of fee algorithm! Thanks very much for this new proposal! It has a more reactive and fast behavior, also a more granular approach of fee adjustment.
However, on channels with very fast liquidity drain, the increase of ppm fees is too high in my opinion, especially if you have high value sink channels with >=1000ppm. Unfortunately the AF.multiplier is an integer variable, and the value of 1 is the lowest setting. However I need a fractional value such as 0.1.
Therefore I suggest to adapt the code line 110 by introducing a divisor like 10 for a smoother slope increase with draining liquidity:
'''balanced_df['new_rate'] = balanced_df.apply(lambda row: row['local_fee_rate'] + (1 if row['local_fee_rate'] < 10 else 1 + (row['local_fee_rate'] - 10) / 20) multiplier / 10 row['net_routed_hours'] * row['in_percent'] if row['net_routed_hours'] > 0 else row['new_rate'], axis=1) '''
Thanks for the feedback! There is definitely room to customise further and the beauty of python implementation is that everyone can tweak it to his heart's content.
+1 I also like this approach a lot for source peers. Been using it for some weeks now.
By the way I suggest the minimum outflow from 1000 (row['amt_routed_out_7day'] < 1000) to 1000000 sats (row['amt_routed_out_7day'] < 1000000) in line 108 and 118 to have a faster fee reduction in case of almost no flow.
Improve Auto Fees logic to allow smooth non-linear increase of fees based on each Update period's flows and channel's liquidity situation. The new logic is described and simulated in this Google Sheet:
https://docs.google.com/spreadsheets/d/1BXsj9pjiKgdaz9JnJ_wKHq5cRRDhzdYQnKLqMyZS-1c/edit?usp=sharing