leather-io / extension

Leather browser extension
https://leather.io
MIT License
293 stars 140 forks source link

Show fees in PSBT confirmation modal #3805

Open 314159265359879 opened 1 year ago

314159265359879 commented 1 year ago

A concerned user is rather convinced the over charge on magic eden is a bug specific to Hiro because they do not see the overcharge on other wallets. https://github.com/hirosystems/wallet/issues/3700

I have trouble understanding the input outputs, why so many (small ones) and I see CPFP’s again and overcharged fees too: probably pending/returning sats? https://github.com/hirosystems/wallet/issues/3753#issuecomment-1564994621

Inputs and outputs on confirm screen. Should the wallet show a review page first that shows net bitcoin balance change? Another user saw this before confirming image

image

The concerned user uses this taproot and native segwit: bc1p4u7kt22yww66y0pqjcz7z70qr6wa9gcgchxlsx4z66v67l8md4lsfk8sme (ordinals)

bc1qzl5xt45gazvj2j4su2xdm5tftqkckgst5hhald (also has stamps)

This transaction was for a marketplace buy: They bought nft for 0.00095071 and paid 0.00170782 in the total.

https://mempool.space/tx/be16e2e2699dbed2522c4252a77222fc4afc17ab8c786e119b27c0ec2f891152

Similar transaction: https://mempool.space/tx/9a6aa048e672c3fd62027b8e3beb4071958b7c0af55a2fce6edbceaa059f336c

Further transaction history for the account here… https://magiceden.io/ordinals/wallet?walletAddress=bc1p4u7kt22yww66y0pqjcz7z70qr6wa9gcgchxlsx4z66v67l8md4lsfk8sme says it has been like this for a week. And they did not realize it earlier.

What are those small utxo’s input —> output?

A third user mentioned creating this transaction 2 weeks ago which spend about 100$ in fees where 14 times less would have sufficed based on current average network fees at the time. https://mempool.space/tx/768501fb4f5bb1dbff1e565223f11c2fe4d9e901571b5275f2ed48aece44084c

markmhendrickson commented 1 year ago

It seems we need to show fees in the UI to prevent users from getting caught from higher-than-expected (fee and overall) amounts here

fbwoolf commented 1 year ago

Even if we display the fee for the user, we aren't controlling it. Magic Eden sends us the PSBT, we just sign the inputs. We don't determine the fee here. The user can simply check the advanced view to see the inputs/outputs of the PSBT we receive from ME.

kyranjamie commented 1 year ago

+1 custom fees aren't appropriate here. If I understand correctly, depending on sighash type, you may or may not be able to adjust fee if yours is the last UTXO, but apps wouldn't want to let you do that as it might change the transaction in unintended ways.

314159265359879 commented 1 year ago

In this case the user has issue with the transaction even without knowing what the fees are.

They expect a 25$ worth of value to be send where the input/outputs being reviewed actually result in a 125$ withdrawal from their account.

Showing a bottom line is what the user is after instead of determining what they are signing by going over every input and output individually, which is a good idea. They want confirmation they are interpreting the data correctly.

Something like: If you sign this Total (expected) bitcoin balance change in your account = minus 0.0141 BTC

I don't think it matters what (part of an) input is used to cover fees if the user is more confident about the total amount.

markmhendrickson commented 1 year ago

Unless it's easy to separate fees in the current UX and display them specifically on their own, we may need to tackle this underlying need with https://github.com/hirosystems/wallet/issues/3849

Note that we haven't heard demand for customizing PSBT fees per se yet afaik. Just understanding / seeing them better