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

generic tx fees #438

Closed
4 tasks
omritoptix opened this issue Dec 3, 2023 · 1 comment · Fixed by dymensionxyz/osmosis#28 or #445
Closed
4 tasks

generic tx fees #438

omritoptix opened this issue Dec 3, 2023 · 1 comment · Fixed by dymensionxyz/osmosis#28 or #445
Assignees

Comments

@omritoptix
Copy link
Contributor

txfees module will have the follwing logic:

  • will replace original cosmos-sdk's DeductFee handler, with 2 handler - MempoolCheck and DeductFee

  • Will swap and burn all tokens in it's balance on epoch start

  • Will manage accepted fees by hooking to the pool creation hook




  • ante handler to accept fees
  • pool creation hook to facilitate the allowed denoms
  • swap and burn on epoch
  • add param to epoch identifier and burn/distribute
@mtsitrin
Copy link
Contributor

mtsitrin commented Dec 4, 2023

Few notes regarding the difference between our/osmosis/ethermint/cosmos implementations:

logic separated into two components

  1. mempoolChecker - checks that the fee is sufficient
  2. feeDeducter - deducts the supplied fee

In Cosmos:

  • mempool fees checked on ctx.IsCheckTx() only
  • all fees deducted sent for Distribution

In Ethermint:

  • same dedcutFee as in cosmos - all fees sent for Distribution
  • uses custom DynamicFeeChecker following the EIP-1559

In Osmosis:

For dymension:

  • mempool check on checkTx() with no additional gas limit checks
  • FeeDeducter similar to osmosis - DYM goes to distribution, non-DYM to txfee to be burned

@omritoptix @shaolin-flow WDYT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants