Skip to content
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

[sd-reverse-delegation] new strategy: sd reverse delegation #1341

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pierremarsotlyon1
Copy link
Contributor

Create a reverse delegation strategy

Changes proposed in this pull request:

  • the delegation address will acquire the whole voting power
  • if an user will vote or delegate to another address than the delegation address, the delegation address voting power will decrease

@ChaituVR ChaituVR changed the title reverse delegation [sd-reverse-delegation] new strategy: sd reverse delegation Nov 10, 2023

export const author = 'pierremarsotlyon1';
export const version = '0.1.0';
export const dependOnOtherAddress = true;
Copy link
Member

Choose a reason for hiding this comment

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

Hi @pierremarsotlyon1 Right now we are not accepting strategies that depend on other addresses to calculate voting power. these types of strategies are usually not scalable, you see some other way to handle this without depending on other voters

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@pierremarsotlyon1 pierremarsotlyon1 Nov 10, 2023

Choose a reason for hiding this comment

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

Hey @ChaituVR
I didn't really understand the issue here
I'm just calculating the voting power of each voters to calculate the voting power of another voter
Which is basically like calculate the voting power of each voters like all the other strategies

For example, if we have these voters : [0x1, 0x2, 0x3] and the strategy will want to calculate the voting power of 0x3 (based on strategy parameters), I will calculate the voting power of 0x1 and 0x2 to assign the voting power of 0x3

What's the issue here ?

and you already have few strategies with dependOnOtherAddress set at true like 'src/strategies/delegation/index.ts'

Copy link
Member

Choose a reason for hiding this comment

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

Yes we do have other 15 old strategies that depend on other addresses, but we stopped accepting new ones as they are not scalable and causing lot of trouble, one alternative way is running seperate server to return the voting power of addresses and using the strategy api-v2-override

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But there is something that i don't understand
Currently, with your current default delegation strategy, how you reduce the delegation address voting power if there are some voters who delegated to the delegation address ?

Copy link
Member

Choose a reason for hiding this comment

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

Currently, with your current default delegation strategy, how you reduce the delegation address voting power if there are some voters who delegated to the delegation address?

We calculate voting power for all addresses again (that's the pain problem 🙈 ), and then we will just ignore the voting power of the delegator who voted from the delegate's voting power

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to calculate in a external server the voting power of each user and then compute the delegation address voting power in the strategy ?

the delegation address voting power will still be based on the voter addresses but at least the user voting power will be compute externally
So basically, the strategy will just fetch voting powers with an endpoint and then do plus/minus stuff

Copy link
Member

Choose a reason for hiding this comment

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

Your strategy can do anything within limits mentioned here https:/snapshot-labs/snapshot-strategies#code just that depending on other addresses is not scalable for us

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, we're blocked with what we want to achieve and your requirements.
Is it really not possible to push this strat ?

Otherwise, is it possible to use your delegation strategy (like currently we have) but use a custom delegation contract address by the strategy settings ?
Or is it possible to add this logic on your side ?

Basically, our "custom" delegation contract will be the same as yours but with new functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants