Closed mattcrv closed 4 months ago
I think the same occurs with self-funded LN connections:
"message":"Node capacity is above our capacity limit. Contact us for more information.","type":"CHANNEL_REJECTED_BY_LSP"
$590.50 + $567.44 > $999
Bitkit channel calculation bug?
@JeanlChristophe This still needs addressing on BK side
You have an existing channel with size 731 837 ₿. Trying to receive > 600 000 ₿ puts you over the max node capacity of (currently) 1 397 634 ₿ since total channel size must be at 2 times the client balance.
So you can't receive that amount over Lightning and we can't give you another channel for that size. Currently the UI falls back to onchain only.
You have an existing channel with size 731 837 ₿. Trying to receive > 600 000 ₿ puts you over the max node capacity of (currently) 1 397 634 ₿ since total channel size must be at 2 times the client balance.
So you can't receive that amount over Lightning and we can't give you another channel for that size. Currently the UI falls back to onchain only.
Hmm, gotcha. So it is possible to get a 2nd channel and receive >600 000 ₿ in total, but just as long as I don't try to receive it all at once? That is, if I first receive 590 000 ₿ and then 10 000 ₿, it should work because the 2nd channel size would be 20 000 ₿?
Fwiw I never run into these issues when receiving similar amounts on Phoenix given that they set the remote balance of new JIT channels to a fixed amount rather than 2x the local client balance.
if I first receive 590 000 ₿ and then 10 000 ₿, it should work because the 2nd channel size would be 20 000 ₿?
Right, your first channel's size is 731 837 so that leaves you with 665 797 capacity for your node to open new channels. Since the UI only opens the CJIT flow if you try to create an invoice larger than your current remote balance, you have to receive some payments first. (In your case you could receive ~330 000, that would allow you to create another CJIT order for >328 205 client balance that is still small enough)
fixed amount rather than 2x the local client balance
that is a requirement by Blocktank
Describe the bug
I have one channel whose total size is at $498.71. Trying to receive my current receiving capacity + 1 sat ($448.54) doesn't trigger the CJIT flow. Adding connection doesn't work due to the 2nd channel being too big, despite both totaling $947,25.
Reproduce
Screenshots / Recording
https://github.com/synonymdev/bitkit/assets/93796166/6cac3e9b-b00c-4c5d-8363-7f5bdc168b96
Operating system
iOS 17.5.1
Bitkit version
49d1359
Log output
No response