-
Notifications
You must be signed in to change notification settings - Fork 20
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
Remote fees #8
Comments
The above is just an estimate that assumes fixed remote fees for the given forwarding period. To get the exact number we'd have to track remote fee changes. |
I am thinking of dropping remote fees completely, because these are not accurate. Also I am not that sure whether these should be an important factor whether to keep/close/rebalance the channel. |
I think they're better than nothing though (after my fix below). I was able to quickly identify which remote nodes made more sats by forwarding than my node. Unless people actively manage their fees they don't change often so I think it's a reasonable assumption to make these days. The exact fix is below (you have to adapt it to LND, I'm running this on C-Lightning):
|
Fixed in 8f07c6f Thanks! |
I think remote fees are not calculated correcty:
https://github.com/prusnak/suez/blob/master/lndclient.py#L75
self.channels[cin].remote_fees += fee
The fee on the incoming channel (the remote party fee) is their base fee + amount * fee_rate but here you're using our fee.
This should be:
`self.channels[cin].remote_fees += (self.channels[cin].remote_fee_base + forward_amount * self.channels[cin].remote_fee_base / 10000) / 1000
or something along these lines.
What do you think @prusnak ?
The text was updated successfully, but these errors were encountered: