Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for zip317 fees #73

Open
autotunafish opened this issue Dec 14, 2024 · 0 comments
Open

Add support for zip317 fees #73

autotunafish opened this issue Dec 14, 2024 · 0 comments

Comments

@autotunafish
Copy link

Is your feature request related to a problem? Please describe.

Zip317 fee compliance is now mandatory. Besides the base fee 0.0001, they also vary depending on the number of inputs/outputs or actions. The code to apply this calculation looks something like this (link below). Obviously, may vary according to secant's structure, and there is underlying complexities in spending notes of sub-par (0.00005) value i.e. this is disallowed and those notes are not included nor should the wallet be allowed to create note outputs below that value unless it's '0', but theres not much to it: it takes a maximum of said in/out-actions and charges the 0.00005 for it, that's the gist of it. Knowing how many notes the wallet holds might be nice because it directly affects the fee and some users wonder about why balance on walletA that does pre-calulate a fee is lower than it's clone in walletB. The wallet history provides this info but many users don't even have a concept of notes.
https://github.com/Zondax/zecwallet-light-cli/blob/main/lib/src/lightwallet.rs#L1517-L1536

Describe the solution you'd like

Proper fee calculation for the TX.
Proper fee pre-calculation for the wallet balance.

Alternatives you've considered

A view of the number of notes and custom fee. This is like a workable alternative to adding some kind official 317 support because it would potentially allow the user to manually calculate, set the fee and spend correctly. It assumes they know what the fee should be. Regardless, might be nice feature.

Additional context

@autotunafish autotunafish changed the title Add support for zip317 fee's Add support for zip317 fees Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant