Comments (8)
How will fee change in this case?
You need to set fee_sigma > 0
in order to not have flat fee everywhere.
I pushed one more fix in 5ee8d83
After the fix is applied, channels with local_balance < 1/2 of capacity will get higher fees.
from suez.
What about to replace
channel.local_balance + channel.remote_balance
tochannel.capacity - channel.commit_fee
? :)
Done in 84e3ff3
from suez.
I wanted to motivate the other peer to use the channel to push the balance to my side by having a low fee, but maybe that was a misunderstanding of how things work.
I need to implement new strategy, maybe the one in #4 ?
Or do you have any other ideas about what strategies could be implemented?
from suez.
Your settings from your side (fee_base / fee_rate in your LND) only work for outgoing payments
The remote settings (fee_base/fee_rate of remote channel tip) - these commissions cannot be monitored by you and you are not going - they are received by a remote side that sends the payment to you (you do not receive anything for the incoming payment).
When you forward payment REMOTE_NODE --> YOUR NODE --> NEXT_REMOTE_NODE you will get fee only from the channel YOUR NODE --> NEXT_REMOTE_NODE ("fee_base/fee_rate" of this channel) but not from REMOTE_NODE --> YOUR NODE.
from suez.
I would like to suggest to raise your fees for those channels where your balance is greatly declining - in this way you will give to understand other nodes that through this channel should not carry out an outgoing payment from you, and if someone will do it - you will earn more. Lowering the fees for such channels you do not improve because a lot part of balance on the other side and a sending of satoshis from a remote node to your node are not controlled by your fee settings - ideally, in this case, the remote side should reduce the fees and promote the network to send to your side.
from suez.
I updated the fee-sigma logic in 6606d15
For channels with local balance >= capacity the fee rate is set to fee-rate
. For channels with smaller local balance the fee is getting exponentially higher. See 6606d15 for more details
from suez.
Line 20 in 6606d15
channel.local_balance + channel.remote_balance
- most likely it is not that you want to do. Better to take capacity - commit_fee
(LND API) because when there is a processed HTLC your local_balance
is temporarily reduced by this amount (or remote_balance
). It turns out, the numbers will constantly jump in the processing moments of HTLC (forwarding payments) but capacity - commit_fee
will be what you want.
I did not look in detail all logic, but if the local_balance
will be 20% from channel volume the ratio will be -0.6
, the coef
will be 1
(fee_sigma by default in your code is 0
). How will fee change in this case?
I would suggest changing fee by step by step because in your case with each a forwarded payment the fees will be changed in the channel, this will issue a new update (ChannelUpdate) on the network with new commissions and those LN senders who will not have time to get new commissions from you - can receive FAIL answer (with fee_insufficient error) when will sending, for example, just because your commissions slightly rose.
from suez.
What about to replace channel.local_balance + channel.remote_balance
to channel.capacity - channel.commit_fee
? :)
If in the channel there no HTLCs then the channel.local_balance + channel.remote_balance
=== channel.capacity - channel.commit_fee
. But if the channel has HTLCs (for example the one 1K sats for example) then there will be:
channel.local_balance + channel.remote_balance
< channel.capacity - channel.commit_fee
and (channel.capacity - channel.commit_fee) - (channel.local_balance + channel.remote_balance) === 1000
The LND will reduce the HTLC amount from local_balance
(outgoing payment and at that time the remote_balance
will be not changed) or from 'remote_balance' (incoming payment and at that time the local_balance
will be not changed) during forwarding.
from suez.
Related Issues (20)
- ModuleNotFoundError: No module named 'dataclasses' HOT 8
- edge not foud HOT 2
- ZeroDivisionError when running without channels HOT 1
- connecting to remote node? HOT 6
- TypeError: unsupported format string passed to NoneType.__format__ HOT 2
- ZeroDivisionError while node syncing HOT 3
- Latest c-lightning no longer has last_tx_fee, but does have last_tx_fee_msat
- Confirming: is it dangerous to interrupt the script (e.g., via CTRL+C)? HOT 2
- Remote Node / Umbrel HOT 3
- Display in Min & Max HTLCs HOT 4
- Use RPC instead of lncli HOT 3
- No module named 'virtualenv.seed.via_app_data' HOT 4
- Parallel channels for Core Ligthning are not displayed HOT 2
- Version for Terminal Web Scores HOT 1
- Terminal Web v3 HOT 1
- Inaccurate local fees calculation HOT 2
- Add arguments to show only public or only private channels HOT 6
- corelightning + suez HOT 18
- CLN - Command "setchannelfee" is deprecated HOT 3
- Add lightning-network as a topic to this repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suez.