-
Notifications
You must be signed in to change notification settings - Fork 44
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
[feature request] Avoid dust outputs #99
Comments
Normal wallets have only one option to avoid dust creation: Send it all to miners. PeerSwap has another way to avoid dust creation. When you request a swap you eyeball the channel and decide you want to swap 10 million sats but you don't actually need that particular amount. What if the swap amount is allowed to be within a small range +/-. The other side could auto-negotiate the swap cost and the exact amount it wants to swap. I personally would allow a range as big as like 100k sats if it avoids the need for another output. File this under ideas for the next protocol spec. Concept: Option |
We should add a dumb dust mitigation for now where a mempool policy failing tiny output would go to fees. That doesn't require any negotiation with the peer. Later it could be optimized by making the swap amount flexible which is the better way to avoid not only dust outputs but many additional small outputs as well. This would be a significant win to the blockchain in terms of storage efficiency. |
What would be a sufficient dust limit? |
I would go as high as avoiding outputs less than 20k sats (the minimum LN channel size) then later a dynamically chosen amount makes sense with |
Was running a this successful swap between LND v0.15.0 nodes on signet (testing the PR #79):
Got a dustsize (303 sats) change output in the first transaction: https://mempool.space/signet/tx/61a5e4456fa8e7b35d432ef4a063247e069d853944f3e85341ffa4b57df82d1c
going back into the swapout receiver's onchain wallet:
PeerSwap should avoid creating such a tiny output onchain.
Amounts below the dust limit should be added to the miner fee for both convenience and privacy.
The limit for SegWit outputs is 330 sats https://bitcoin.stackexchange.com/questions/113649/dust-threshold-for-testnet, but would be comfortable with a higher limit.
The text was updated successfully, but these errors were encountered: