Cosmos-sdk: Solve fee discovery for wallet users

Created on 18 Sep 2020  路  5Comments  路  Source: cosmos/cosmos-sdk

There is currently no mechanism for validators to suggest to wallet developers what transaction fees they are likely to accept.

This leads to wallet devs essentially guessing what fees to attach to transactions and confusion like

https://forum.cosmos.network/t/transaction-fee/3979/2

Ideas:

  • We could add fee info to the validator information on chain
  • Just have an informal norm for a json blob on a validator website
  • advertise this info over the p2p layer.

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

Most helpful comment

As long as there aren't any security concerns, I think simply advertising this via an API endpoint seems like the easiest approach.

All 5 comments

As long as there aren't any security concerns, I think simply advertising this via an API endpoint seems like the easiest approach.

Hub validators will also need to advertise which denoms they accept, so maybe these should be addressed together?

Quick solution is validators broadcasting off-chain, but an on-chain gas oracle would be quite valuable. This is one of the big EIP-1559 wins, users can deterministically compute the current base fee within one escalation window from past fees.

Alternatively, Dan Finley's EIP-2593 fee model based on Agoric's escalator algorithm looks like it wouldn't benefit much from a validator-reported min fee.

I think the SDK aims to be unopinionated about what fee model chains elect to use, so probably better to use something light weight for now and revisit when competition for transaction ordering heats up.

Min fee already includes denoms.

Right, but is that published to the network?

No. Hence my suggestion for adding an API endpoint (https://github.com/cosmos/cosmos-sdk/issues/7347#issuecomment-695002561).

Was this page helpful?
0 / 5 - 0 ratings