UnstoppableSwap / core

Bitcoin–Monero Cross-chain Atomic Swap (+ GUI)
GNU General Public License v3.0
19 stars 5 forks source link

Manage Monero inputs efficiently #120

Open darkness-su opened 2 weeks ago

darkness-su commented 2 weeks ago

Currently, asb seems to take any 2 or more inputs present in the wallet for transactions. This results in inputs being jumbled together into one unnecessarily and getting progressively bigger, which reduces available liquidity for swaps during ongoing swaps and can even cause unavailability of the provider during swaps once only one input is left.

For example, refilling xmr.darkness.su with exclusively 10 XMR inputs: image

Current state of inputs (Primary address inputs are recent conversions back to XMR): image

The asb server should only use one input, preferably the smallest one it can use for the ongoing swap, in order to maintain the highest possible available liquidity for further swaps. Only if no one input is big enough for the amount being swapped, should multiple inputs be used, again using as few and as small as possible.

binarybaron commented 2 weeks ago

This is handled by the monero-wallet-rpc which default to always creating 2-to-2 transactions (2 inputs, 2 outputs) to minimize fingerprinting attacks.

But I see your point. I'll think about what we can do here.