Skip to content

Support dynamic fees for chains with fee market (EIP-1559) #3738

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

Closed
5 tasks
ertemann opened this issue Dec 20, 2023 · 2 comments · Fixed by #3771
Closed
5 tasks

Support dynamic fees for chains with fee market (EIP-1559) #3738

ertemann opened this issue Dec 20, 2023 · 2 comments · Fixed by #3771
Labels
A: critical Admin: critical or important I: protocol Internal: related to IBC protocol changes (eg. v2 update) O: new-feature Objective: cause to add a new feature or support
Milestone

Comments

@ertemann
Copy link

Summary

With Osmosis and other chains adopting the Skip Block SDK and EIP1559 the gas fees are now no longer stagnant. We have had 2 times already where our relayer stopped because the on-chain feel went above our configured amount.

We would love a feature that allows to make the fee dynamic based on the on-chain endpoint: lcd.osmosis.zone/osmosis/txfees/v1beta1/cur_eip_base_fee


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Hermes Dec 20, 2023
@ljoss17
Copy link
Contributor

ljoss17 commented Dec 21, 2023

Hi @ertemann thanks for opening this issue. I have the following proposal as a solution which will need some investigation from our side:

Proposal

Depending on what data Hermes has access there are two possible solutions:

  1. Hermes is able to retrieve the base_fee when simulating the Tx
  2. Hermes can query the base_fee

For both solutions, once the base_fee has been retrieved the behaviour would then be similar to what is being done for gas amount:

  1. Try to retrieve the base_fee
    a. If it succeeds, use that value
    b. If it fails use a fallback value default_gas_price
  2. Check that the base_fee is not higher than a configured max_gas_price
  3. Relay Tx

@romac romac changed the title Hermes should model gas fees for Block SDK enabled chains using the on-chain endpoint Support dynamic fees for chains with fee market (EIP-1559) Jan 4, 2024
@romac romac added this to the v1.8 milestone Jan 4, 2024
@romac romac added A: critical Admin: critical or important O: new-feature Objective: cause to add a new feature or support I: protocol Internal: related to IBC protocol changes (eg. v2 update) A: urgent Admin: high priority / urgent labels Jan 4, 2024
@romac romac moved this from 🩹 Triage to 🏗 In progress in Hermes Jan 4, 2024
@romac
Copy link
Member

romac commented Jan 5, 2024

We are planning to implement proper support for dynamic gas price based on the upcoming EIP-1559 FeeMarket module provided by the Skip SDK.

Until then, for Osmosis one can use this fork of Hermes by Osmosis which adapts the gas price dynamically based on the osmosis/txfees/v1beta1/cur_eip_base_fee endpoint.

@romac romac removed the A: urgent Admin: high priority / urgent label Jan 5, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Hermes Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: critical Admin: critical or important I: protocol Internal: related to IBC protocol changes (eg. v2 update) O: new-feature Objective: cause to add a new feature or support
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants