mwcproject / mwc-qt-wallet

Apache License 2.0
14 stars 17 forks source link

Swaps need to track the case when redeem BTC transaction stuck at the memory pool and increase the fees #667

Open bayk opened 3 years ago

bayk commented 3 years ago

Swaps are automatic, so the redeem transaction can stuck in the memory pool and it need to be processed in timely manner. Because of that wallet will need to increase the fee amount and mining doesn't happens.

The chances much depend in number of mined blocks, mining fee in the first block and the expired time interval

bayk commented 3 years ago

Keep wallet open until the merge to the master branch.

Please note, automated increasing fees is applicable to redeem BTC transaction only. Refund and other coins don't need that.

Testing: The test need to be done for BTC mainnet (it is impossible to do that for testnet because any tx fee will work):

  1. Specify the low fees for BTC transaction on seller side and start swap trade. The BTC amount should be large enough so expected fees will be smaller than 50% of transaction amount. Swap trade should go by happy path, so saller will need to redeem.
  2. Validate that at redeem state the transaction will stuck in the memory pool because of small fees. QT wallet will increase the fees by 20% every 6 BTC blocks and repost the transaction. Eventually fee should be high enough so transaction will pass through.