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

[subgraph-split-delegation] New strategy: Subgraph split delegation #1583

Merged
merged 9 commits into from
Sep 26, 2024

Conversation

xavikh
Copy link
Contributor

@xavikh xavikh commented Sep 19, 2024

The subgraph-split-delegation calculates new Vp for the addresses based on the delegation ratios provided by a Subgraph endpoint and an initial strategy Vp.

Comment on lines 129 to 160
for (const chunk of chunks) {
const params = {
members: {
__args: {
block: { number: block.number },
where: {
address_in: chunk.map((address) => address.toLowerCase())
}
},
id: true,
address: true,
delegators: {
__args: {
where: {
context: space,
expirationTimestamp_gte: block.timestamp
}
},
delegator: {
address: true
},
ratio: true
},
delegatees: {
__args: {
where: {
context: space,
expirationTimestamp_gte: block.timestamp
}
},
delegatee: {
address: true
Copy link
Member

@ChaituVR ChaituVR Sep 19, 2024

Choose a reason for hiding this comment

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

But i think if a address has more than 1000 delegations this may ignore them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think you are right. I'm going to paginate the delegations too. Thanks!

@ChaituVR ChaituVR merged commit ae11f20 into snapshot-labs:master Sep 26, 2024
3 checks passed
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