-
Notifications
You must be signed in to change notification settings - Fork 5
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
No service fee on penalties #424
Conversation
134f9e3
to
ff05504
Compare
I rebased the PR on main. One thing which still needs a decision is about which parts of the different rewards would receive special treatment when being negative. @harisang Currently we have 2 independent payments of COW:
The wording of the CIP is "withholding 15% of the weekly COW rewards solvers are receiving". That would imply batch rewards and quote rewards are affected. Only batch rewards can be negative. If we do not want to modify payments on a per auction basis, this leaves us with two interesting cases: negative batch rewards but positive batch reward + quote reward, and negative batch reward + quote reward.
I am in favor of using the current approach. If we want to go for the alternative, additional code changes would be required. |
to also check - consistency of cow and eth rewards - total service fee since those quantities are modified as well
Could you confirm as a sanity check that the current PR still does
in case batch_rewards > 0 and quote_rewards > 0? |
Btw, current approach is definitely fine for more. Basically, didn't like the fact that we were scaling negative batch rewards as it looked very wrong |
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.
Yeah looks good, and i am fine moving forward with this.
I added a new test for this now. We have tests for the cases |
With this PR, if a solver receives a negative reward for an accounting week, that amount is not multiplied by
reward_scaling
.Before the change,
negativerewards were multiplied byreward_scaling
independent of the sign of the reward. For positive rewards, this does what it should, as a fraction of the reward is withheld from the solver and becomes part of a bounty budget. For negative rewards, the calculation implied that part of the penalty is withheld and it reduces the bounty budget.With the change, negative batch rewards are not multiplied by
reward_scaling
. Quote rewards are left as is.The proposed implementation changes some code in 3 places. Ideally there would only be one change required. Note, that quote rewards are always non-negative and no change in the formula is required.
Alternatively, the total cow reward could be used to decide on the scaling, instead of handling batch and quote rewards separately.
Tests have not been adapted yet.