Welcome to first actual, autonomous, self hosted DAO Service for Community Governance.
Challenge
Achieving consensus in Web3 is a big challenge, decentralized nature of Communities around Crypto Projects brought up questions like how can decentralized Community come to consensus in decision making without being reliant on old centralised Solutions or single point of failure.
Smart people came out with Solutions by offering Services to Communities like for example CollabLand (token Gated discord roles and management), GitCoin (bind Social accounts to your Web3 identity), SnapShot (transparent and certificated Voting system), EasyPoll (anonymous voting bot for Discord), TweetShift (Discord Sales Bot).
While all those Services are of great benefit for whole Crypto Community, they come with the Price. Making it really complicated for onboarding and thus limiting participation, there is also risk involved with how user data is being processed/stored. Web3 is all about own you own Data, Simplicity, not to rely on third party Services and be self sufficient as individual and Community.
How things are set currently is not only not optimal but also undermines basic principles of Web3: Decentralised, Trustless and Transparent.
Web3 introduces four core principles that promise to reshape the digital landscape: ownership, commerce, identity, and governance.
Solution
With PhunkBot module called DAOService enabled, communities don't need to be dependent on third party Services for Governance anymore. In true Web3 fashion, PhunkBot makes third party Services like CollabLand, GitCoin, SnapShot, EasyPoll and TweetShift obsolete.
PhunkBot is in house, Self-Sufficient Service hosted by the Community for the Community, safe and as simple to use as running Discord application commands or pressing an emoji to vote.
Solution we found is, it all revolves around token ownership and identity in Web3. By binding those two Assets we can actually solve Governance for decentralized community.
PhunkBot elegantly eliminates possible sybil attacks with simple and configurable minOwnedCount&minOwnedTime safety checks and by binding discord account and/or social account with Web3 wallet(s) holding underlying Assets or even Traits of underlying Assets.
This enables individual to safely participate in community Governance and it guarantees provably fair process to achieve consensus.
Hardly any Community in Crypto is immune to Sybil Attack especially where individuals can exploit Governance system to their monetary advantage.
We at Phunks Community, while exploring best ways to Achieve consensus for Proposals came to conclusion that current system if flawed and undermines basic Principles of Web3.
We found a new, better way to Govern decentralized Community by utilising already available ideas and tools into Simple yet powerful way.
We enabled PhunkBot to serve as autonomous, trustless Bot that elegantly eliminates Sybil in dynamic and configurable setup.
config.ts
minOwnedCount:1, minOwnedTime:15,// in days
Example Above is set off Parameters that writes a Simple Rule that if user has minimum of
1 underlying Asset and owns that Asset for minimum of 15 days is allowed to Vote. Only works if that user already bounded his Discord and/or Twitter account to his Web3 wallet(s).
Example bellow is another (optional) set of rules where only permitted Discord Roles that PhunkBot granted to a specific underlying Assets/Traits are allowed to Vote.
dao.extention.service.ts
if (poll.discord_role_id &&!member.roles.cache.has(poll.discord_role_id)) {
Also here, First rule minOwnedCount & minOwnedTime always applies.
Additional Rules like minDiscordActivity & minTwitterActivity can be added in the future.
Voting Process Explained
HARDCODED RULES
For users to participate in Voting Process, few simple conditions needs to be met.
User holds underlying Asset, for example Phunk NFT.
User holds underlying Asset for minimum threshold time set.
User has Discord and optional Twitter Account.
User bounded his Discord and optional Twitter Account.
For Vote to be considered Success, min Vote count threshold needs to be reached.
1 bounded Identity even with multiple Wallets and Phunks NFTs equals 1 Vote.
That's it! Player one ready, go!
START NEW POLL
This commands is reserved for Discord Admins only and is explained here:
->
CAST YOUR VOTE
By default users have two options to Vote 👍 (Yes) and 👎 (No).
Note: your Vote is anonymous and is not visible to other users, however Admins are allowed to privately audit all the Voters/Votes for security purposes and if necessary to provide proof in case of a dispute.
Note: once Voted, Vote can not be redacted! You can however change your Vote from yes to no or other way around during whole voting period without limitations.
If Vote was successfully recorded, user gets confirmation message from PhunkBot
If user is not allowed to Vote, user gets notification message from PhunkBot
To receive PhunkBot notifications you need to have your Discord DMs open.
To see all Active Polls to Vote, simply run /listpolls command on Discord or go to:
https://phunk.cc/polls/
DEMO
Vote demo for custom Discord role powered by PhunkBot.
MIN VOTE COUNT
Optional Admins can set minimumVotesRequired for Poll to be considered Success or if minimum threshold was not Reached is marked as Failed, therefore consensus not reached.
Note: If min threshold of Votes is set too for example 30 and reached; Min votes required: 30 (Reached: ❌) will automatically change to Min votes required: 30 (Reached: ✅).
RESULTS
To avoid user being influenced by Vote weight going in one direction and to keep Voting process as fair as possible, it is not possible to see current results nor count of yes or no Votes/Voters. Only after set time for Poll expired, final results are automatically Revealed.
Output
Discord Roles Explained
ROLES
By binding Discord Account with your Web3 wallet(s), PhunkBot automatically Grants you Discord roles depending on underlying Asset and parameters set under src/config.ts.
This can be for example one Role for holding underlying Asset or Multiple Roles for holding Specific Traits of underlying Collection.
Code Example of Role granted to Stringy Hair Trait Holders
[start:prod] [2023-11-3022:58:57] [dao.extension.service] [info]: grantRoles()[start:prod] --> granting PHUNK to avolalim.eth[start:prod] --> granting PHUNK to MACHO 💥[start:prod] --> granting PHUNKto .meuleman[start:prod] --> granting PHUNK to dovebot <afk>[start:prod] --> granting PHUNK to shalfean[start:prod] --> granting PHUNK to qukuaiboyou[start:prod] --> granting PHUNK to jacopoman[start:prod] --> granting PHUNK to 9999999333[start:prod] --> granting PHUNK to cadillion[start:prod] --> granting PHUNK to doli0li[start:prod] --> granting PHUNK to web_gnar
grantRoles() is handled by PhunkBot automatically and if user at anytime or for any reason removes underlying Asset from his bounded Web3 wallet, Role(s) get redacted. Grace period is set to 24h!
MANAGE ROLES
DAOService Commands Explained
User Commands
/bindweb3
User command to bind Discord Account with Web3 wallet(s).
User Command
/bindweb3
Output
/bindtwitter
User command to bind Twitter Account with Web3 wallet(s).
User Command
/bindtwitter
Output
/bounded
List bounded Web3 wallet(s) and Twitter Account to your Discord Account.
User Command
/bounded
Output
/listpolls
To make it easy for users to keep track of Active Polls, users can run this command at any time without limitations. Wen called, it will List all Active Polls and link to each Poll.
This commands is reserved for Discord Admins only, executing this command with parameters set kicks off new Poll where community can vote on Active proposals and as a result achieve consensus.
Voting itself is anonymous and final results get auto revealed only after set time expires.
Only Admins are permitted to see casted Votes and Voters for auditing purposes.
If optional <role> is set, only users with set Discord role can cast a Vote.
With set parameters under src/config.ts Sybil attacks are mitigated, read more here.
This commands is reserved for Discord Admins only. It will display SnapShot of Vote result and will list all the Voters for Current and Past Polls.
Admin Command
/pollresults <poll id>
How to get Poll ID?
To see this option, on your Discord settings, you will need to have Developer mode turned ON.
Output
This is Visible to Admins only and it is on their own discretion if they will share this information with the Community.
/closepoll
This commands is reserved for Discord Admins only. It will Force Close currently Active Poll.
If used, PhunkBot will Print this interaction and it will be visible to users.
Admin Command
/closepoll <poll id>
Output
/deletepoll
This commands is reserved for Discord Admins only. It will Force Delete currently Active Poll.
If used, PhunkBot will Print this interaction and it will be visible to users.
Admin Command
/deletepoll <poll id>
Output
Encryption
USER DATA
To protect user data in case of data breach, data is Encrypted using community owned Symetric key that is obtained from the discord server and Explained here.
Wen enabled, this is how Encrypted user data looks like on Host Server.
Encryption is Optional, it can be Enabled by changing Boolean from false to true
config.ts
dao_requires_encryption_key:false,
Code Sample
dao.extention.service.ts
if (config.dao_requires_encryption_key) {constguildsId=unique(config.dao_roles.map(r =>r.guildId))for (constguildIdof guildsId) {console.log(`fetching encryption key for ${guildId}`)constguild=this.discordClient.getClient().guilds.cache.get(guildId)constchannels=awaitguild.channels.fetch()constchannel=channels.find(channel =>channel.name ==='setup-daoextension') asTextBasedChannelconstlastMessage=awaitchannel.messages.fetch(channel.lastMessageId)this.encryptionKeys.set(guildId,lastMessage.content)console.log(`fetched encryption key for ${guildId}`) }}
Data saved is: Discord ID, Wallet(s) public Key(s).
DEPLOYMENT
Data is Encrypted using community owned Symetric key that is obtained from the discord server, but how does that work?
Ideally one of Discord Admins creates Private channel called #setup-daoextension
on Discord containing a 32 bytes encryption key for example using this generator.
and places Encryption key as only message into this Private channel. PhunkBot needs to have access to channel to Decrypt data in PhunkBot memory using this key.
After seed (encryption key) is in place, bot host enables encryption by changing Boolean from false to true under config.ts.
config.ts
dao_requires_encryption_key:true,
Warning: enabling Encryption will wipe database containing user data collected before.