-
Notifications
You must be signed in to change notification settings - Fork 30
CEP 68: Delayed refunds #68
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
Conversation
|
||
#### Elements | ||
|
||
*Thresholds* in {p<sub>1</sub>, ..., p<sub>N</sub>} are percentages (fractions ranging from 0 to 1) that define ranges of observed past refunds, which determine a *penalty* in {1, ..., M}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ranges of observed past refunds
I'm not sure I understand correctly; maybe this could be clarified in the text:
The pi are fixed parameters, are they? They are not the actual observed refunds?
E.g. we could configure (in the chainspec) {p1, ..., pN} to be {10%, 20%, 50%}, so that penalty 1 applies if a user reserved 10% too much, 2 if it's 20% too much and 3 if it's 50% too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's just a step function laid out in the chainspec, exactly as you describe, will clarify.
|
||
*Thresholds* in {p<sub>1</sub>, ..., p<sub>N</sub>} are percentages (fractions ranging from 0 to 1) that define ranges of observed past refunds, which determine a *penalty* in {1, ..., M}. | ||
|
||
Fix N to be #{1, ..., M}. The thresholds define the penalty in the following way: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So… N = M?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awkwardness due to M not necessarily being an integer,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then why does it start with 1? Does that mean "a penalty of 1 era", i.e. delaying the refund by one era?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The penalty is multiplicative, so 1 means no delay at all (everything is refunded at the end of the era). I do see where the problem is now, though, since non-integer multipliers on number of eras do not make sense.
Fix N to be #{1, ..., M}. The thresholds define the penalty in the following way: | ||
|
||
- Take p<sub>i</sub> and p<sub>i+1</sub> | ||
- If one minus *aggregate utilization* **P** (1 - **P**) is between p<sub>i</sub> and p<sub>i+1</sub> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read this as "P · (1 - P)", i.e. "P times one minus P" at first. Maybe less ambiguous:
- If one minus *aggregate utilization* **P** (1 - **P**) is between p<sub>i</sub> and p<sub>i+1</sub> | |
- If 1 - **P**, i.e. one minus *aggregate utilization* **P**, is between p<sub>i</sub> and p<sub>i+1</sub> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
@AlexanderLimonov can this be closed? Merged? |
There's no reason to touch it either way right now. This work will resume after finality signature rewards are done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexanderLimonov this needs to be updated to reflect updated thinking. Please also include the updates to RPC and the precise refund mechanism.
Closing due to a major rework of refund-related logic proposed in CEP 89 |
A new method for issuing refunds, introducing dynamic penalties based on observed past refund percentages
Rendered
NOTE: Revision pending