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

[tokenvm] Overhaul Fees #96

Closed
patrick-ogrady opened this issue Mar 18, 2023 · 5 comments · Fixed by #352
Closed

[tokenvm] Overhaul Fees #96

patrick-ogrady opened this issue Mar 18, 2023 · 5 comments · Fixed by #352

Comments

@patrick-ogrady
Copy link
Contributor

patrick-ogrady commented Mar 18, 2023

Naïve fee pricing/usage targets were added during initial development. We should revisit these and add the updated values to the README.

Changes

  • Charge for keys specified in pre-fetch
  • Charge a fee if new state created
@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Mar 21, 2023

As part of this overhaul, we may find it useful to break apart "units" into specialized units that are independently priced (ex: CPU, State, Size)

Related work: https://angeris.github.io/papers/block-space.pdf (https://arxiv.org/abs/2208.07919)

@patrick-ogrady
Copy link
Contributor Author

It would also be great if we can find some way to remove the notion of block cost and surplus fee.

We should ideally just refund anything above the required fee.

@patrick-ogrady
Copy link
Contributor Author

With the current parameters, a "full" block can sometimes only be ~200KB:
image

@patrick-ogrady
Copy link
Contributor Author

We should require a state deposit that is returned when state is freed (minus some penalty) to discourage state bloat attacks.

@patrick-ogrady patrick-ogrady modified the milestones: v0.1.0, v0.0.11 Jul 18, 2023
@patrick-ogrady
Copy link
Contributor Author

patrick-ogrady commented Aug 12, 2023

Have a few that is always charged and then have a storage fee that if not paid, causes the tx to revert.

Both should be included in the tx result (we should not deduct balance hidden).

We can also deduct keys requested to prefetch from this balance too.

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

Successfully merging a pull request may close this issue.

1 participant