Only charge custom fees given explicit willingness-to-pay #456
tinker-michaelj
started this conversation in
Ideas
Replies: 1 comment
-
Agreed on this approach. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The network will only charge Alice a custom fee if Alice has signed the active transaction.
But Alice might sign a transaction, expecting the custom fee to be 1 ℏ---or even 0 ℏ---only to discover later that the actual fee was 1M ℏ. This unfortunate scenario would almost always be the result of malicious behavior; and since Alice only interacts with trusted tokens and smart contracts, they are not worried.
Nonetheless, Alice is not the only user on the network.
We suggest a safeguard against this kind of exploit. Define the following protobuf message, which sets the maximum willingness of a given account to pay a custom fee in a given denomination:
Then add a new field to the
TransactionBody
message:and fail any transaction that attempts to charge a custom fee for which
max_custom_fees
list does not assert willingness-to-pay.Beta Was this translation helpful? Give feedback.
All reactions