S4 Requirements [Draft]
So, we have our MVP of a poll service. Now, we need to push headlong into adding web3 elements to it and bring the full vision of the product to life!
Ā
10, 20, 30, 50 , 80, 100
Ā
Account Connect
All users can visit the Governator website and initiate transactions to connect their Discord account to as many Ethereum accounts as they want.
In the future this feature set may also include connecting Twitter account(s) and more.
Ā
FE: 20
- Manage Account
- Add/Remove Address
- Web3 Sign
- EIP 712 Verify (API request)
BE: 20
- Change user Model
- Verify EIP 712 (API)
- Data provider connection (Alchemy, The Graph, Infura?)
- Add/Remove Address
Ā
Select Token Eligibility
When a poll is created, the user must be able to select/input a list of token addresses that are eligible to be included in the poll.
This may include ERC-20, ERC-721, and ERC-1155.
This may require a block height to be determined.
This may inherit directly from Snapshot.
In the future, this token set could be bundled and reused as a shortcut.
In the future, show eligible voters from selections.
Ā
FE: 20
- Set/Select token strategies* [Set Snapshot ENS]
- Contract address, token count āmathā
- Maybe API
- Validate contract? (maybe Web3.js)
- Block Height
- Show strategies on FE
Ā
BE: 20
- Investigate Snapshot
- Modify Poll object for token strategies (API)
- Validate
- Maybe list_contracts API (investigate Snapshot)
Ā
Token Balance Lookup
When a user with a connected Ethereum account votes on a poll, their token balance should be queried and distributed among their votes.
Ex: User clicks on #1 option. The backend will lookup their connected address list and query the pollās token addresses for the balance at the determined block height. The backend returns 5,000 token balance and adds 5,000 units to option #1. The backend makes this information available to the FE and Bot.
Ā
FE: 10
- Display results of voting (if multiple token)
BE: 40
- Connect to data provider
- Query individual votes on the fly
- Saving results to DB, message FE
- Return Bot responses
Ā
Ā
Recurring Poll
When a poll is created, the user may select an option to continuously publish this poll at a set cadence.
In the future, this recurrence could be set to a separate scheduled global event like āStart of Seasonā or through an API trigger.
Consider: If a second poll is posted, it has a different ID. How do we track IDs and the recurring setting itself? Is there a super-object that these polls nest under? Do we simply have the first poll create a new poll instance on close that has an upcoming publish date preset? How does recurrence fit with Poll Flows?
Ā
FE: 20
- Select recurring frequency options
- āSchedule for future publicationā
- API request to modify poll
Ā
BE: 20
- Cron jobs!
- API to modify poll
Ā
Auth Connectivity
FE, Bot, and BE all need to be able to sync on the auth session securely. - 20
Ā
Encrypt Everything
No more passing around raw text strings between Bot and BE, time to encrypt. - 5
Ā
Backend Client
To better connect backend modifications and break builds that fail, we should create a BE Client (SDK) that the FE can consume.
Ā
BE: 10
FE: 10
Ā
E2E Tests
Implement some tests so we arenāt just crossing our fingers on every build.
BE: 20
FE: 10
Ā
Backend Refactor
The Discord libraries underpinning the BE and Bot are shifting; we need to stay ahead of the curve or risk being banned or face a large migration later.
BE: 20
Ā
Direct Voting
User can vote directly on the Governator site.
This may include signing transactions to affirm Token Balance voting.
Ā
Poll Flow*
When a poll is created, the user can create a āsub-pollā that would display after the resolution of the original poll.
The second poll may use the results of the first poll as its list of options, eligibility requirements, or other unknown purposes.
Ex: User creates a nomination poll. Any users that click on poll opt-in to be eligible for the election poll. After a week, the nomination poll closes and the election poll is posted using the signups from the first poll as the options.
Ā
Discord Role Modifications*
When a poll is created, the user can select that the Discord Role of the winner(s) be modified.
This can include removing roles from previous users.
Ex: The election of Guild Organizer has concluded and two winners were selected. Their roles may be immediately appended to include āGuild Organizerā and the previous userās roles will be removed.
Consider: How does the poll track which userās would be removed? What if a role has been removed? How does the poll know that itās options are explicitly Discord users?
Ā