-
Notifications
You must be signed in to change notification settings - Fork 767
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
[delegate-registry-v2] Add the delegate registry v2 startegy #1205
Conversation
@manboy-eth We need to add this strategy to src/strategies/index.ts |
@manboy-eth Can take a look at failing test cases, try running `yarn test --strategy=delegate-registry-v2 in your local |
I appreciate your help, @ChaituVR. I am a little unsure how to proceed. Here's how the voting strategy is supposed to work:
Does this approach make sense, or should we structure it differently? Also, is there a way to automatically force a space to enable a validation strategy if a voting strategy is enabled? Also, since the strategy has to return at least one address with a score, is it possible to select what snapshot space should be used in the test? If not, could someone send some tokens (the ones referenced in the yam.eth's voting erc20 strategy) to |
Hi @manboy-eth
Makes sense, but also you could return 0 voting power from this strategy itself and use this strategy in basic validation and check min score. https://docs.snapshot.org/user-guides/strategies/validation-strategies#voting-validation-in-space-settings then we don't need separate validation
There is no way to force, spaces should enable validation if they want to (maybe you can add this in README)
You can easily create one on demo.snapshot.org, using goerli. it should be free :) |
I am unsure how I can make that work since we need to distinguish token holders who have delegated and token holders who have not delegated (but still has a score from other strategies). In both cases, one or more other strategies in the space can return a non-zero value and should be merged. We need a validation strategy that can make it possible to vote as long as the delegation registry strategy does not return "0". I think we have three scenarios (numbers 2 and 3 can probably be counted as the same, I am separating them here for clearity):
So basically, the validation strategy becomes:
Okay.
I meant the space used in the tests when I run |
I created and added the required validation strategy and added it to the readme. |
Hi @manboy-eth I meant adding basic validation directly to your space 😅 Don't have to create a seperate validation |
But the problem is that basic validation does not work for our requirements (check the comment above: #1205 (comment)). |
oh i get it now, thanks! But what will be the voting power if delegate-registry-v2 returns |
Can't depend on |
@manboy-eth it seems like we should just encapsulate everything in the delegation strategy, perhaps? So rather than the current setup, where there is a delegation strategy alongside any number of other strategies... "strategies": [
{
"name": "gno"
},
{
"name": "delegation",
"params": {
"strategies": [
{
"name": "gno"
}
]
}
},
] Perhaps everything should be encapsulated by the delegation strategy. This way there is no need for additional validation outside of the strategy. "strategies": [
{
"name": "delegation",
"params": {
"strategies": [
{
"name": "gno"
}
]
}
},
] |
Then the address has delegated its voting power and should not be able to vote. |
This is the way it currently works:
Regarding @auryn-macmillan 's suggested approach:
|
Better to handle this in strategy itself |
Sure, create a ticket on https://discord.snapshot.org/ will get in touch to create a test space for you
Using a delegation strategy won't have any impact on caching
Correct, whenever a proposal is created - we copy strategies to the proposal so it will use these strategies for ever
didn't get it sorry 🙈 |
Co-authored-by: Chaitanya <[email protected]>
It sounds like we might have some miscommunication, so I just have to make sure we are on the same page before I start working on this: So if I create a ticket in Discord, you will make the user interface for configuring any snapshot strategy inside of our strategy settings like Auryn proposes here: #1205 (comment). This seems like a potentially big and complicated task to me 🤔 In other words, you will handle all these special cases (only applicable to the delegation registry strategy):
This way we will be able to do all the vote weight computations for all strategies in the space, inside of our strategy. |
I am sorry but i am having a hard time understanding your requirements, What interface you are talking about? Can you explain me an example situation of how you want to calculate your voting power? |
We wonder if we can have all the strategies inside of our strategy like @auryn-macmillan suggested (look at the strategy configuration he has suggested in his comment here: #1205 (comment)). I am talking about the user interface / GUI / frontend at "https://snapshot.org", and what I think would be required if we were going to do it as @auryn-macmillan suggested. |
I don't think this necessarily requires UI changes in order to function as intended. |
Okay, so users will have to manually add the strategy settings for all the strategies they want to use here: And will not be able to use Snapshot's normal strategies management UI for adding, removing or editing strategies (they must do it manually as specified above): Also, we must inform users not to add other strategies using Snapshot's normal strategies management UI. @auryn-macmillan and @ChaituVR: That's what we want? |
I think that works for the time being, we can improve on it in a subsequent PR. |
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.
Everything else looks good to me
Add the delegate-registry-v2 strategy.