leather-io / mono

Leather monorepo
https://leather.io
MIT License
12 stars 5 forks source link

Add more granular minimum and maximum fees per transaction type #639

Open 314159265359879 opened 4 days ago

314159265359879 commented 4 days ago

This will introduce a fixed fee (low, medium and high) for STX transactions to prevent users from overpaying by using the default options in Leather. https://github.com/leather-io/mono/pull/600

This contains the current min/max fees in case the fee estimator gives us a higher value and suggestion for new min/max values per setting (low, medium, high) and transaction type (STX transfer, Contract call or Contract deployment): https://docs.google.com/spreadsheets/d/1SVtbuEtUjAvYdnbR-5bDch9wCMrkv7t4VDCZK5T0JYY/edit?gid=0#gid=0

A couple more notes: There may be better solutions, especially for contract calls and contract deployments. There is a lot more variation, and some require more of the block budget than others. That is currently not reflected by these flat fee rates (although the fee estimator API does factor this in), In the long term, a solution based on uSTX/%block could be used to make better judgements.

Or a solution like this: https://github.com/hirosystems/stacks-blockchain-api/pull/2172. If we use a modifier like that, we can possibly use more lenient maximums. If the modification factor is applied first and still turns out higher than the maximum, we can still cap it there to avoid surprises seen in the past of users unknowingly setting a 500 STX fee (because it was the "normal" option served by the wallet).

linear[bot] commented 4 days ago

LEA-1760 Add more granular minimum and maximum fees per transaction type

camerow commented 3 days ago

Added this to the next cycle, though we will need some design eyes on this. @michelly / @fabric-8