Skip to content

Conversation

@GuillemGarciaDev
Copy link
Contributor

@GuillemGarciaDev GuillemGarciaDev commented Sep 11, 2025

[TA-5498] feat(ante): add DynamicDiscountTxFeeChecker proof-of-concept

This PR adds a proof-of-concent dynamic discount TxFeeChecker that reduces the fees with given discount for transactions that contain whitelisted messages. This PoC attempts to prove that the fee discount is properly set without affecting the transaction priority to be eligible from the mempool.

This DynamicDiscountTxFeeChecker extends the cosmos/evm FeeChecker (used in DynamicFeeChecker) in order to apply the same fee check over non-whitelisted transaction messages.

Changes 🛠

app/ante

  • Added NewDynamicDiscountTxFeeChecker
  • Unit tested new dynamic discount fee checker

misc

  • Refactored test-poa with test-unit Makefile rule.
  • Updated Dockerfile with new test-unit rule.

Considerations 🤔

This is a proof-of-concept and it's not production ready. Messages should be whitelisted via configuration, module or governance proposal.

Test instructions

  • Run the local-node.sh script setting the BASE_FEE different to 0.
  • Send a transaction with a banktypes.MsgSend to a receiver adding the --gas-prices flag.
  • Query the transaction via hash and check that transaction initial fee is different from the events fee amount. (should be the discount percentage less).

@GuillemGarciaDev GuillemGarciaDev added the feature Feature label Sep 11, 2025
@GuillemGarciaDev GuillemGarciaDev changed the title [TA-5498] feat(ante): add DynamicDiscountTxFeeChecker proof-of-concept [TA-5498] feat(ante): add DynamicDiscountTxFeeChecker PoC Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants