App to distribute ENS token voting power to multiple delegates.
There are three functional screens:
/strategy: View the delegation strategy for the connected account.- Handles the case when the connected account has no tokens, or has undelegated tokens.
/strategy/:addressOrName: View somebody else's delegation strategy by ETH address or ENS name.- Should perform almost identically to the
/strategypage.
- Should perform almost identically to the
/manage: Manage the delegation strategy for the connected account.- Search modal to add a new delegate. Fetches results from the subgraph if the input is an incomplete name.
- Visualization of current delegation strategy + highlights of the in-progress changes.
- If 95% of an account's tokens are allocated to a single delegate, the user is prompted to choose between native token delegation and using the multi-delegate contract.
- To reclaim all tokens, set all delegations to 0.
Note: The frontend can run without the indexer, but it may perform slower because it's processing event logs instead of reading from an indexed database. You can see the graceful fallback in useDelegationInfo.
- Clone the repository
- Install dependencies with
pnpm install - Create a
.env.localfile for each app based on the respective.env.examplefile - Start each app in its own terminal with
pnpm indexer:devandpnpm web:dev - Open the web app in your browser at http://localhost:5173