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

discord validation onchain #64

Open
5-mark opened this issue Aug 15, 2022 · 3 comments
Open

discord validation onchain #64

5-mark opened this issue Aug 15, 2022 · 3 comments
Assignees

Comments

@5-mark
Copy link
Contributor

5-mark commented Aug 15, 2022

User Story

As GameDAO user I want to provide my Discord Account and verfiy it so I can validate my uniqueness.

Acceptance Criteria

Validator

  1. addRegistrar(account) (wallet connected with discord bot)
  2. setFields(index, fields) (setting "discord" as a field in onchain identity)
    2.1 how the field is validated in the frontent?
  3. setFee(index, fee) (set trx fee for setting onchain ID)
  4. discord bot will be setup similar like faucet bot. (instead transfer funds, it will call approve provideJudgement extrinsic

user
6. requestJudgement(regIndex, maxFee) --> click frontend button
7. provideJudgement(regIndex, target, judgement) --> comes from discord bot

Additional Information

How to test

  1. a
  2. b
  3. c
  4. d
@vayesy vayesy self-assigned this Aug 16, 2022
@vayesy
Copy link

vayesy commented Aug 16, 2022

Preparation

As a first step, account should be created which will have funds in network currency (ZERO) and will be marked as registrar.
This can be done with Sudo or with the democracy process, described in the identity manual page.
identity.addRegistrar extrinsic responsible for this.
There is no possibility to create registrar during genesis.
By default there may be up to 20 registrars in the chain.
Each registrar can specify fee amount it will use for it's services (providing judgements). By default this value is 0.

User perspective

User should provide identity, calling identity.setIdentity extrinsic.
There is list of predefined fields: display, legal, web, riot, email, pgpFingerprint, image, twitter.
Apart from those, it's possible to provide custom fields, discord would be one of those custom fields.
By default there are 100 custom fields, which user may provide apart from predefined ones.
User has to have funds before submitting the identity in amount of 10 full tokens plus 0.25 token per every custom field. Those funds are reserved as payment to store identity information on-chain.

After identity is set, user can optionally request judgement from the registrar, he's interested it.
This can be done by calling identity.requestJudgement.
This step can be skipped, especially if registrar fee is 0.
This step is the last one, needed from the user.

Registrar perspective

Once user set the identity and (optionally) requested judgement.
Registrar should then provide judgement by calling identity.provideJudgement.
This extrinsic requires providing status to be set for the identity. List of available statuses to be set.

Discord validation flow

  1. Once user provides his identity via the frontend, his discord is stored as additional field to the identity. At this step his identity remains not confirmed by the registrar.
  2. User navigates to discord bot, responsible for identity confirmation and sends his wallet address.
  3. Bot reacts to the received message.
    3.1. Retrieves account details (by address, provided in the message) from the chain.
    3.2. Compares it's identity discord field to the actual username, who sent the message.
    3.3. Bot executes identity.provideJudgement extrinsic (as a registrar) for the given account, setting it's status to Reasonable if data match and Erroneous otherwise.

@2075
Copy link
Member

2075 commented Aug 20, 2022

please check out the prior art by @DarkNebula0

@vayesy
Copy link

vayesy commented Aug 23, 2022

@2075 @DarkNebula0 could you please provide link to that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants