desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Estimate appropriate fees for transactions (with calibration options)

Open markmhendrickson opened this issue 4 years ago • 3 comments

The wallet should set a default fee for transactions based on data provided by the API that takes into account network conditions and execution characteristics. Currently, the wallet defaults to a constant fee regardless of these factors, leaving users to guess just what changes they might might have to make manually.

Presumably we'll want to enable these three levels of calibration:

  1. High: Expensive / high value for broadcasting a transaction that will very likely (>95% chance) be picked up by the next anchor block / has large time premium for user
  2. Normal (for default in wallets, etc): Modest value for broadcasting a transaction that will likely (>60%) be picked up by the next anchor block / has moderate time premium for user
  3. Low: Low value for broadcasting a transaction that will likely be picked up within 3-5 anchor blocks / has little to no time premium for user.

See relevant work on the node here: https://github.com/blockstack/stacks-blockchain/issues/2836

It's not clear to me if we'll need a single value from the API that we can then adjust around independently on the client-side to provide these options, or whether the API needs to provide all three options, though I suspect the latter.

Companion issue for web wallet: https://github.com/blockstack/stacks-wallet-web/issues/1728

markmhendrickson avatar Sep 20 '21 09:09 markmhendrickson

@andresgalante @kyranjamie -- curious when this work will be prioritized?

As it stands now, anyone who needs to use a ledger needs to use the desktop wallet (hopefully we will be able to soon in the web wallet). However, you cannot set custom fees nor select a higher fee in the desktop wallet. As a result, transactions can stay pending for hours/days.

Any updates around this would be much appreciated!

Edit: this is also labeled as an enhancement -- I'd suggest this is actually a bug.

aulneau avatar Jan 26 '22 23:01 aulneau

Agree this should be prioritised. Easiest step would be to first use the latest fee estimator.

kyranjamie avatar Jan 27 '22 07:01 kyranjamie

@kyranjamie are you referring to https://github.com/hirosystems/stacks-wallet/issues/988?

markmhendrickson avatar Feb 21 '22 13:02 markmhendrickson