-
Notifications
You must be signed in to change notification settings - Fork 109
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
Control validator security budget #3702
Comments
The council should be able to set |
For some context on urgency with this GH issue, this forum post shares a % look into how much we are currently paying validators/nominators, it is a significant amount: https://pioneerapp.xyz/#/forum/thread/809 |
Needs estimation of the effort |
To give a status update: we've considered including this functionality in Nara but decided not to. The validator rewards are controlled by a curve defined in the runtime code: Lines 515 to 524 in 0144499
Our initial idea was to add a proposal that can adjust the parameters to construct the curve as seen above. However, Mokhtar has pointed out that the process of compiling the curve - using the parameters to calculate set of curve points - is currently done during runtime build and may be too heave of a calculation to actually do at runtime with a proposal. So an alternative idea is to have the curve itself be a mutable storage value and have a proposal that changes the curve directly (not its parameters). That means we would compute the curve off-chain and only submit the result of that calculation as a proposal. This however requires some basic tooling - we need to be able to construct the curve given a set of parameters but also to somehow verify a proposed curve. We need to research how the curve is stored and what the inputs to a proposal would look like |
@ignazio-bovo I think yes, but what exactly do you mean by the curve structure? |
The math formula being used. |
So Mokhtar's point from his initial research was that we don't want to compute the curve during runtime, so if we want to update it dynamically, we would replace the full curve (1,000,000 points) via a proposal, not specific parameters. Are you thinking about the same thing or have a different approach in mind? |
I think that if we do want to replace the curve in its entirety we have to come up with our own implementation for this basically |
Premise:
The following function internally uses this quantisation for the actual formula to be computed: pub struct PiecewiseLinear<'a> {
/// Array of points. Must be in order from the lowest abscissas to the highest.
pub points: &'a [(Perbill, Perbill)], // points (x,y) for the function
/// The maximum value that can be returned.
pub maximum: Perbill,
} On a call with @kdembler we discussed the following 3 approaches, which might satisfy various objectives. We just need to be clear on the objectives and the methodologies:
In any case in all of the three approached we should just modify the |
We discussed that the simplest approach of introducing some mutable multiplier applied on top of curve calculation should be good enough for our usecase. The only open question at this point is whether we should introduce some min/max value validation in runtime |
Background
Right now (
Olympia
), it is not feasible for the council to set the total $JOY reward devoted to validators over a given period of time, this not only negatively affects the testnet incentives, but it alsoProposal
Introduce ability for this to be controlled directly. Add support in proposal #3626
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: