superhero-com / superhero-wallet

Superhero is a multi-blockchain wallet to manage crypto assets and navigate the web3 and DeFi space. Currently supporting Bitcoin, Ethereum and æternity blockchains.
https://wallet.superhero.com
ISC License
39 stars 38 forks source link

Be able to choose the transaction speed/fee for bitcoin #3260

Open CedrikNikita opened 1 month ago

CedrikNikita commented 1 month ago

User should be able to chose how much he is willing to pay for the transfer. Currently for the MVP version wallet is using fee so transaction would be mined in 5 blocks option from this API. https://github.com/superhero-com/superhero-wallet/blob/92a5aca3bc3d2bbea5eb51b7ee2cdc22baf94d9a/src/protocols/bitcoin/components/TransferSendForm.vue#L214 https://blockstream.info/api/fee-estimates

{
  "10": 2.48,
  "18": 2.48,
  "2": 3.456,
  "19": 2.48,
  "22": 2.48,
  "6": 2.487,
  "1": 3.456,
  "23": 2.48,
  "20": 2.48,
  "7": 2.487,
  "12": 2.48,
  "9": 2.487,
  "21": 2.48,
  "25": 2.48,
  "14": 2.48,
  "144": 2.335,
  "5": 3.003,
  "504": 2.335,
  "1008": 2.334,
  "3": 3.003,
  "8": 2.487,
  "4": 3.003,
  "16": 2.48,
  "24": 2.48,
  "15": 2.48,
  "11": 2.48,
  "17": 2.48,
  "13": 2.48
}
onvisions commented 1 month ago

Paying hundreds of dollars for a single BTC transaction is definitely not user friendly. Currently we have already implemented the feature allowing users to select between "Slow", "Medium" and "Fast" transaction speed. Transaction fee depending on user's selection should display the expected price to be paid for the transaction under the current network conditions: image

What is missing to me is the display of average expected time for transaction to be mined depending on the user's choice of speed. I'd suggest to include this feature if technically possible.

@CedrikNikita,@smaroudasunicorn Another question: do we need to allow the users to manually select a maximum value they would like to pay for a transaction? Also do we really need the whole Select Tx Speed feature available when sending AE (as requested by community member) regarding the low fee for aeternity transactions? IMO it's an overkill.

On the other hand some users used to take advantage of such a feature in the base æpp and are now asking for it. Possible use case can be: user is willing to pay more in order to have their transactions mined with priority during high network congestion. IMO it's still an overkill at the moment.

My suggestion is to include the Transction speed component for all blockchains in the wallet with options "Slow", "Medium", "Fast" (as currently implemented for ETH and BTC) and to set more adequate values for each tier.