getAlby / hub

Alby Hub - Your own lightning node connected to every app. Run anywhere. Become self-sovereign.
https://getalby.com
Apache License 2.0
25 stars 3 forks source link

Improve alby fee reserve calculation #169

Open rolznz opened 4 months ago

rolznz commented 4 months ago

Related to https://github.com/getAlby/nostr-wallet-connect-next/pull/130 which uses a hardcoded 1000 sat amount.

This might not be enough to open a larger channel? the max outgoing payment of 1M sats * 0.8% + routing fees could be over 8000 sats.

rolznz commented 4 months ago

This might not be needed if we can remove the fee reserve for payments from LNDHub to Alby's LSP node.

EDIT: but we probably still need to account for the service fee from the NWC side?

rolznz commented 3 months ago

Update: we can just remove the fee reserve because it's an internal payment

rolznz commented 2 months ago

It's still slightly off, leaving up to 1000 sats (in larger migrations) in the user's LNDHub account. Probably a rounding error somewhere.