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

CEP 89: Fee elimination #89

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

CEP 89: Fee elimination #89

wants to merge 3 commits into from

Conversation

AlexanderLimonov
Copy link
Contributor

@AlexanderLimonov AlexanderLimonov commented Feb 7, 2024

@AlexanderLimonov AlexanderLimonov changed the title Fee elimination CEP 89: Fee elimination Feb 7, 2024
@AlexanderLimonov
Copy link
Contributor Author

@MParlikar, please review at your convenience

@@ -0,0 +1,83 @@
# Elimination of gas fees

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Review" to point out parts of this CEP to be reworked


CEP PR: [casperlabs/ceps#0089](https://github.com/casperlabs/ceps/pull/89)

We propose introduction of a delayed gas fee refund feature, replacing the (currently inactive) refund feature.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The summary should describe this CEP as reflecting code already in the release candidate codebase and the CEP should do the following

  • Change all terminology to reflect the rough consensus between external written material (the fee elimination impact documents) and naming conventions within the codebase itself
  • Introduce clear definitions with above consensus terminology as basis, upfront
  • Introduce the concepts of lane configuration and different pricing modes
  • Concomitantly make a clear delineation between recommended chainspec settings for mainnet and the alternatives enabled by interaction of various parameters
  • Introduce our light "theoretical" analysis of the behavior of a no-fee system under attack and direct the readers to review the fee elimination impact document
  • Potentially separate the validator credit feature into a separate CEP, depending on complexity of this CEP after initial revisions


[motivation]: #motivation

Due to the inherent uncertainty in gas costs caused by variation in inputs, users almost always need to overclaim gas to eliminate risk of reversion. Because as-implemented instant refunds are currently set to 0, this creates a serious UX problem, as users must almost always overpay to guarantee successful execution. Unfortunately, given the execution-after-consensus paradigm Casper uses, meaningful non-zero refunds create a serious attack vector, enabling malicious or careless users to fill up blocks with overclaimed gas.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section works conceptually but needs to separate UX concerns about refunds with the refund feature, which still very much exists and could be enabled. Additionally, partial refunds have been activated at some point on mainnet, I believe.

The section must also include the description of the utility of fee elimination for BaaS providers


To address both the UX issue and the security issue with refunds, we propose a re-implementation of the refund feature, introducing delayed refunds with a percentage of "used" token made available to the user on a linear schedule. Unlike the current refund feature, the new system will functionally refund all token and not just token paid for overclaimed gas.

Note that we use the term "refund" for simplicity and to emphasize the viewpoint of the user. However, token "spent" under the new system will not be transferred or otherwise associated with any account other than that of the user.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "refund" as used here with "hold/release" terminology


### Changes to gas fee logic

No changes, at least due to the introduction of this feature, are expected to be made to the calculation of gas fees.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace terminology here and elsewhere "gas fees" -> "gas costs"


[drawbacks]: #drawbacks

Elimination of user fees paid to validators creates adverse incentives for validators. In the interest of keeping
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be broken out into a separate CEP now that we have the validator credit feature, potentially


[prior-art]: #prior-art

We do not currently know of an example of another blockchain replacing the use of token as transferable payment for computation with the use of token as permanent claim to some portion of the blockchain's compute.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do another round of competitive analysis here to confirm

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

Successfully merging this pull request may close these issues.

1 participant