district0x / district-registry

A community-curated registry of marketplaces on the district0x Network.
Eclipse Public License 1.0
11 stars 9 forks source link

feature/Snapshot Integration #116

Open madvas opened 3 years ago

madvas commented 3 years ago

Prize Bounty

A winning hackathon submission may be awarded up to a $10,000 prize for this issue. The prize will be paid in USDC.

Bounties will be paid out at the discretion of the judges exclusively and we reserve the right to not give a bounty payment if we believe the submissions do not meet the criteria or are otherwise unfit for development.

Challenge Description

Currently, when user submits a new district, Aragon DAO is created. We'd like to replace Aragon integration, with Snapshot. That means when user submits a new district, new Snapshot Space for this district is created as well. Steps for implementation would be following:

1. Replacing AragonID input with ENS name input

Snapshot requires to own ENS name for creating a Space. Currently in submit form, we have input that checks for somename.aragonid.eth. New input should be checking for TLD ENS names, such as somename.eth. But it won't be checking for name availability as it is now, but if user is owner of the name. In smart-contract, the ENS name will be checked for ownership again and passed through smart-contract event, instead of aragonid. All aragon related code can be removed from smart-contract. ENS name is then stored on server-side instead of AragonID and AragonDAO. GraphQL schema and DB schema will have to be updated as well.

Submit Page image

2. Creating Snapshot Space

Creating district and creating Snapshot Space can't be done in 1 transaction, because Space requires user setting record for ENS name, which needs to be done by name owner. (If there's other way, please feel free to suggest). So after district is created, on district detail page, we'll display "Set up Snapshot" button only for district owner, which will set TEXT record with key "snapshot" and value "ipfs://[IPFS Hash]" such as in example here. IPFS file contains JSON configuration for Snapshot Space, example here. So that means, when user clicks "Set up Snapshot" button, it'll first upload file to IPFS, then it'll use its IPFS hash to set ENS record. District Registry is already uploading files to IPFS from UI, such as here.

As for Snapshot Space configuration file, in strategies we'll use address of StakeBank token address.

"strategies": [
    {
      "name": "erc20-balance-of",
      "params": {
        "address": <StakeBank Token>,
        "symbol": "DVT",
        "decimals": 18
      }
    }
  ],

3. Displaying Snapshot Link

Once Snapshot Space is created, what's left is to display link to it in District Registry UI. We'll be displaying it as an icon button instead of Aragon icon. The UI checks if district's ENS name has "snapshot" TEXT record already. If yes, it'll display link to Snapshot (such as https://snapshot.org/#/somename.eth), if no and connected wallet is district owner, it'll display "Set up Snapshot" next to "Edit" button. image

Submission Requirements

Submissions are required to make Pull Request into District Registry repository. Pull Request should include brief description about what has been done plus screenshots of relevant District Registry UI.

Judging Criteria

district0x team members will pick 1 winning implementation, that satisfies our requirements the most. Aspects considered during the judgement are: functionality, UI styling and code quality.

Winner Announcement Date

The district0x team will decide on a winning implementation within 7 days of the close of the hackathon. Winners will be announced by 11:59PM PST on Wednesday, July 14th.

Resources

To reach our assistance please join our discord at https://discord.gg/FqWuPSEY

For more information on the district0x project, start with https://onboarding.district0x.io/

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 10000.0 OTHER attached to it.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 6 days from now. Please review their action plans below:

1) ssakuh has started work.

i will implement this feature 2) ginesdt has started work.

I plan to submit a pull request with the modifications required to integrate Snapshot into District Registry

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 10000.0 USDC (10000.00 USD @ $1.0/USDC) has been submitted by:


gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 10000.0 USDC (10000.00 USD @ $1.0/USDC) attached to this issue has been approved & issued to @ginesdt.