KomodoPlatform / komodo-wallet-desktop

Komodo Wallet Desktop GUI
https://atomicdex.io
GNU General Public License v2.0
235 stars 207 forks source link

[FEATURE REQUEST]: enable automatic merge of utxos #1784

Open cipig opened 2 years ago

cipig commented 2 years ago

ADEX API supports automatic merging of utxos, like this: curl --url "http://127.0.0.1:7783" --data "{\"method\":\"electrum\",\"coin\":\"RICK\",\"servers\":[{\"url\":\"electrum1.cipig.net:20017\",\"protocol\":\"SSL\"},{\"url\":\"electrum2.cipig.net:20017\",\"protocol\":\"SSL\"},{\"url\":\"electrum3.cipig.net:20017\",\"protocol\":\"SSL\"}],\"userpass\":\"$userpass\",\"mm2\":1,\"utxo_merge_params\":{\"merge_at\":200,\"check_every\":600,\"max_merge_at_once\":100}}"

Can we please use this for all UTXO coins, except BTC (too high fees)?

Reason: If we don't do it and people have too many UTXOs, ADEX will stop working for that coin.

smk762 commented 2 years ago

This should be optional, defaulting to off but configurable by user in settings. Needs:

smk762 commented 2 years ago

related: https://github.com/KomodoPlatform/atomicDEX-Desktop/issues/1436

smk762 commented 2 years ago

I'm not sure there is a viable gui solution for this issue without either more than ideal complexity (e.g. coin specific settings) or being too broad (e.g. blanket application of the merge param).

It does need to be addressed though, as we regularly get people mining to their atomicdex wallet and accumulating thousands of utxos which they find difficult to consolidate.

A negotiated solution with no impact on front end and minimal technical expertise by the user could be to allow this to be defined within a user's coins.json file - so that on activation, if these flags / values are present, the coin will be activated accordingly.

The process would be simple enough to document in a guide for reference whenever needed.

@cipig would this solution be acceptable? If not, would it be an adequate starting point, with a future PR to add a "wizard" like for adding custom coins?

cipig commented 2 years ago

the easiest solution would be to apply the merge params to all utxo coins if you keep the values rather high like \"merge_at\":200,\"check_every\":600,\"max_merge_at_once\":100}}", it will only affect the targeted users, since no normal user has 200 utxos in his address , i guess txfee problems are only present with BTC utxos, all other coins have very low txfees, and nobody has 200 BTC utxos, at least not from mining :-)

but i am fine with any solution... we can start by adding the options to coins config in ADEX Desktop, so if they are present they are added to the enable/electrum call

smk762 commented 2 years ago

The main problem with setting it by default is that it opens up potential perception of "unauthorised" transactions, and the user may experience confusion and think they have been hacked.

cipig commented 2 years ago

The main problem with setting it by default is that it opens up potential perception of "unauthorised" transactions, and the user may experience confusion and think they have been hacked.

Sure, but it would "affect" only few users with \"merge_at\":200 or higher.

smk762 commented 2 years ago

I think we should maybe also add something that detects when there are > "x" utxos, and then show user a pop up warning which lets them toggle on utxo merging for the coin that needs it

smk762 commented 1 year ago

This issue is still not solved in a convenient way (requires support guidance and manual config), and comes up every few weeks from a user mining directly to the wallet.