peerswap
peerswap copied to clipboard
Feature Request: Permissions to View Chain Balance
Hello,
Thanks for building PeerSwap, it's been amazing!
One thing I've noticed in using it with my collection of peers is that it would be great to be able to know what the L-BTC
balance is on my allowed peer list prior to trying to swap out
. I don't see the harm in exposing this to peers that are in the allow list because they can brute force the information anyway by attempting to make a swap out and getting denied until it works--and unfortunately for the UX, this is often necessary. At least, exposing enough that full channel liquidity is covered is something you could brute force--maybe you don't need to know that someone has 20 L-BTC on-chain, but knowing that they can support a 5M sat swap out
would be amazing. So if privacy is a concern it could just show the balance up to the point that a swap out
on that channel could consume--and maybe show_chain_balance=full | swappable
could be a config option.
I've had a few channel partners where I've wanted to swap out 5M sats, and get State_SwapCanceled
with insufficient walletbalance
, then try 4M, same result, 3M, same result, 2M, same result. Then I realize it's not worth reducing the request size and give up, but it's created 4 failed transaction payloads in my listswaps
output.
Counter to this request, I can see how it's useful to go through with the request so the recipient can be made aware of the demand for L-BTC that they don't have, but I think there could be a better way of probing for this. Ultimately, it would be ideal to see that they have no L-BTC, then initiate a special pscli request
that allows them to know that there is need for it. This could potentially be worked into a telegram bot or other external fulfillment automation process as a pre-warming action to the requestor then attempting the swap.