joinmarket-webui / jam

Your sats. Your privacy. Your profit.
https://jamapp.org
MIT License
256 stars 53 forks source link

feat: adapt `absurd_fee_per_kb` setting #717

Open theborakompanioni opened 8 months ago

theborakompanioni commented 8 months ago

Currently, absurd_fee_per_kb is hardcoded in Jam and used when validating the fee settings. absurd_fee_per_kb should be customizable by the user and it should be taken into account when validating fee values.

e.g. a user setting tx fee to 349 sats/vbyte with 20% randomization factor will likely have this tx failing without being properly informed exactly why (tx fee > absurd fee).

kristapsk commented 8 months ago

Jam could warn user and if he still agrees dynamically raise absurd_fee_per_kb setting.

theborakompanioni commented 8 months ago

Jam could warn user and if he still agrees dynamically raise absurd_fee_per_kb setting.

Yep. Generally "fees and estimates" and how it is best possible to display information to a user so he has even the slightest ideas of what is going on is rather tricky with the API at the moment. It is suboptimal when all possible settings are displayed. The UI should remain simple, but still somehow allow you to adapt most options. Thank God I'm not a designer and @editwentyone has to deal with that and will find a proper solution :crossed_fingers:

kristapsk commented 8 months ago

Here's my proposal for sendpayment.py - https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1636.

theborakompanioni commented 8 months ago

Here's my proposal for sendpayment.py - JoinMarket-Org/joinmarket-clientserver#1636.

I appreciate the hint @kristapsk :pray: This could be a viable solution in the web ui too. This, or prompting the user to adapt the absurd_fee_per_kb before the transaction.

kristapsk commented 8 months ago

I was briefly thinking maybe RPC should also adjust absurd fee if manual fee is specified above it, but decided that probably it's not a good idea, better to require clients to use configset to override it manually, it's safer.