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

epic: Gas Price Equilibrium #1526

Open
2 of 4 tasks
eugypalu opened this issue Oct 23, 2024 · 1 comment
Open
2 of 4 tasks

epic: Gas Price Equilibrium #1526

eugypalu opened this issue Oct 23, 2024 · 1 comment
Assignees

Comments

@eugypalu
Copy link
Contributor

eugypalu commented Oct 23, 2024

Kakarot version

Description

In the current design, we:

  • relay transactions for users (execute_from_outside feature)
    • relayers pay the Starknet fee associated with their Kakarot transaction
  • charge users in Kakarot Core EVM wrt to consumed EVM gas and signed gas price (base fee and max priority fee)

Problem

We need to find a way to balance relayers operational costs and user EVM fees

Non-exhaustive ideas and options:

  1. In legacy transactions, there is only one concept of fee: gas price. We could use the gas price parameter to make sure the user pays (user fee := gasUsed* gasPrice) for the Starknet costs. Note that we know in advance the expected Starknet cost as well as the EVM gas a specific transaction consumes.
    TL;DR: Force legacy transactions on Kakarot & set gasPrice := starknet_total_estimated_fee/EVM_gas
  2. We are able to observe dynamically Kakarot transactions on Starknet public and compute the average relayer cost per transaction as well as the average EVM gas used. And then, dynamically set the baseFee of Kakarot: baseFee := average_relayer_cost_per_transaction/average_EVM_gas
@eugypalu eugypalu self-assigned this Oct 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Kakarot on Starknet Oct 23, 2024
matthieuauger pushed a commit to matthieuauger/kakarot that referenced this issue Nov 9, 2024
* feat: index cairovm errors

* fmt

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🔖 Current sprint
Development

No branches or pull requests

2 participants
@eugypalu and others