IndexCoop / index-coop-analytics

A repository for the Analytics Working Group.
MIT License
22 stars 18 forks source link

[Dashboard] Snapshot Delegation Tool #180

Open jackiep00 opened 2 years ago

jackiep00 commented 2 years ago

Mel.eth is curious who's delegating to him - this could be a broad tool to measure who is delegating to whom and generally monitor our governance for individuals who are accumulating delegation power. This is also probably broadly useful across all snapshot governance systems, so could be useful for clout. Surprisingly, I don't think this has been built yet.

Delegations are on-chain, so this is queryable via Dune. This is doable for someone who's reasonably good at SQL, but requires a bit of work and thought.

Docs: Snapshot resource here: https://docs.snapshot.org/guides/delegation events documentation here: https://github.com/gnosis/delegate-registry/blob/main/contracts/DelegateRegistry.sol Contract has been decoded on dune.xyz , e.g.

select * from snapshot."DelegateRegistry_evt_SetDelegate" limit 100;

Things to keep in mind:

  1. Confirm that the space ID is actually being recorded in the event log. If the space ID is blank, then the delegation applies to all spaces.
  2. Figure out how to map useful names of protocols to space IDs
  3. You'll have to cancel out delegation events and delegation clearing events and figure out how to handle that. Some cases - what if someone doesn't clear their delegation and just re-delegates to someone else?
  4. A delegation is for ALL of a user's tokens, so you'll need to join to current token balances in order to figure out what token to use for the voting power.
ef3n9r98 commented 1 year ago

Hey @jackiep00, I know some devs who'd be interested in working on this. Is there a budget for fixing this issue, and if so, how much?

I'd put this issue up on OpenQ and list the budget publicly to attract devs.

Thanks!