-
Notifications
You must be signed in to change notification settings - Fork 10
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
Set mixer contract config in genesis #395
Conversation
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| `sigmoid` | [MixerContractConfig.Sigmoid](#confio.poe.v1beta1.MixerContractConfig.Sigmoid) | | Sigmoid returns a sigmoid-like value of staked amount times engagement points. See the Proof-of-Engagement white-paper for details. | |
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 would like to support the other variants as well. I can define these on a branch off of this.
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 will do that later, please merge without that. It is not required yet
// https://github.com/confio/poe-contracts/tree/main/contracts/tg4-mixer | ||
message MixerContractConfig { | ||
message Sigmoid { | ||
uint64 max_rewards = 1; |
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.
Note here and others: this is going to be renamed to max_points
for PoE contracts v0.11.0
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.
lgtm 👍
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.
Let's get this in. I played with the values a bit. If tests pass, then let's merge these as good basis for others. I can add other equations later.
|
||
| Field | Type | Label | Description | | ||
| ----- | ---- | ----- | ----------- | | ||
| `sigmoid` | [MixerContractConfig.Sigmoid](#confio.poe.v1beta1.MixerContractConfig.Sigmoid) | | Sigmoid returns a sigmoid-like value of staked amount times engagement points. See the Proof-of-Engagement white-paper for details. | |
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 will do that later, please merge without that. It is not required yet
MixerContractConfig: &MixerContractConfig{ | ||
Sigmoid: MixerContractConfig_Sigmoid{ | ||
MaxRewards: 1000, | ||
P: sdk.MustNewDecFromStr("0.62"), |
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 picked new values from my model. Let's try with these and see how simulations work.
I left a low-priority follow up issue here: #399 This is good to go for mainnet. We can extend later, especially if a new network will use this implementation. |
Codecov Report
@@ Coverage Diff @@
## main #395 +/- ##
==========================================
+ Coverage 57.43% 57.57% +0.14%
==========================================
Files 73 73
Lines 5544 5563 +19
==========================================
+ Hits 3184 3203 +19
Misses 2043 2043
Partials 317 317
|
Follow up on #386
Note to reviewer: tests do fail with my second commit. The sigmoid valued used in tests and config before were not equal.I need help to adjust them to the expected values
Reverted the changes to the test after discussing with @maurolacy