Skip to content

Conversation

AlexanderLimonov
Copy link
Contributor

@AlexanderLimonov AlexanderLimonov commented Sep 13, 2021

A new method for issuing refunds, introducing dynamic penalties based on observed past refund percentages

Rendered

NOTE: Revision pending

@AlexanderLimonov AlexanderLimonov changed the title Delayed refunds CEP 68: Delayed refunds Sep 13, 2021
@xcthulhu xcthulhu self-requested a review September 14, 2021 02:17

#### 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}.
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

Choose a reason for hiding this comment

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

So… N = M?

Copy link
Contributor Author

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,

Copy link
Contributor

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?

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 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>
Copy link
Contributor

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:

Suggested change
- 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>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed

@RitaMAllenCA
Copy link

@AlexanderLimonov can this be closed? Merged?

@AlexanderLimonov
Copy link
Contributor Author

There's no reason to touch it either way right now. This work will resume after finality signature rewards are done.

Copy link
Contributor

@MParlikar MParlikar left a 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.

@AlexanderLimonov
Copy link
Contributor Author

Closing due to a major rework of refund-related logic proposed in CEP 89

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.

4 participants