Skip to content

Instantly share code, notes, and snippets.

@thelostone-mc
Last active August 11, 2020 13:29
Show Gist options
  • Save thelostone-mc/92863e09e6fa659fa42b68152c45c5f6 to your computer and use it in GitHub Desktop.
Save thelostone-mc/92863e09e6fa659fa42b68152c45c5f6 to your computer and use it in GitHub Desktop.

Description

Current Flow

Grant Creation

A user can create a grant specifing attributes which include

  • Grant Type (This is coupled with the CLR Round. Eg: Tech / Media / ...)
  • Grant Category (This has mapping to Grant Type)
  • Grant Type
  • ETH address to which funds will be deposited
  • Type of token to recieve funds in (One specific token / all)
Grant Fund

A grant contributor can

  • Browse through all Grant Types
  • If CLR round is ongoing -> CLR matching info is shown
  • A contributor can select multiple grants and add them to side cart + update the amout
  • Once they click checkout , they view all the grants in the sidecart with more info like what is the CLR match
  • Click fund ( there is an optional Gitcoin Fee Grant which is selected by default )
Current Limitations of the System
  • Only 1 chain is supported
  • If a CLR round is happening -> all Grant Types are forced to have CLR roudn active at the same time
  • Adding a new Grant Type / Grant Category needs code changes

New Requirements

Admin
  • Should be able to create new Grant Categories
  • Should be able to create new Grant Types and map it to multiple Grant Categories
  • Should be able to create a new CLR rounds and map it when it should be active + link to Grant Type
Grant Creator
  • Should be able to select which chains he'd like to recieve funding from
  • Provide recieving address for selected chains
Grant Contributor
  • Should be able to add Grants to his cart (irrespective of the tokens they support)
  • Visit the cart checkout page and make his contribution

Note: when you have checkout off different chains involved -> you would have diff means of paying out

  • web3 wallet (if you are donating in ETH)
  • QR code

Additionally, since Grant are allowed to be part of multiple tokens -> they can technically be part of multiple CLR rounds Eg: ETH Tech & Z-Cash Tech

Based on the type of token you select -> the potential match of the CLR will vary based on token selected

  • If that token has a running CLR round
  • The total POT
  • The number of Grants in that specific round

This brings about complications in terms of

  • what do we show to the user in the CLR match info
  • how do we tell them this Grant is part of multiple rounds
  • how to make the whole experience as stress free as possible

To address these issues, we'd be breaking this EPIC into multiple releases/versions to allow us to take feedback from the previous version and use that to build out the next version and iterate towards the end state

VERSION 0

CLR flow should be self service as this would be needed to allow us to run CLR rounds for specific Grants like ZCash this month and Media next month.

Admin
  • Should be able to create new Grant Categories
  • Should be able to create new Grant Types and map it to multiple Grant Categories
  • Should be able to create a new CLR rounds and map it when it should be active + link to Grant Type
Grant Creator

(Keep in mind -> GrantType has a tight mapping with CLRRound)

  • Restrict the Grant Creator pick Grant Type (this ensure a grant can be part of only 1 CLR round at a given point in time)
  • Based on the GrantType (update the address to be collected)
Grant Contributor
  • Allow them to add grants from diff GrantTypes into the sidecart
  • Upon checkout -> you will have two sections a) If the donation is in ETH -> usual flow b) If the donation is switched to ZCash -> the QR code flow
  • Here we force the Grant to pick a chain to receive chain in.
  • Grant X can either get funds in Zcash / Eth aka one of two rounds
  • The QR code flow will have a flow like Bounty QR -> where you can either a) scan and pay (upon which we'll try to find the txn)
    b) copy paste the transaction (this is a risky cause this can be spoofed easily)
  • We skip the Gitcoin Fee for cross chain flow

VERSION 1

The end state here is allowing the Grant to accept donations in multiple chains and take part in CLR rounds happening in diff chains. This is the flow what we are hoping to have

Architecture
  • Architecture + Design Changes (will have to keep in detail)
  • Explore one click check out for other chains : QR splitter / wallet connect / bountying custom splitter contract
  • If we continue to stick to the copy paste txn ID -> might need a way to enforce the user that this is thier wallet
Admin
  • CLR Round would be tied to Chain & Grant Type (Z-CASH Tech , ETH Tech, ETH Media, Bitcoin Media) unlike the previous version where only Grant Type was tightly linked to a CLR Round
Grant Owner
  • Would be able to select multiple chains to receive tokens from
  • SHOULD CONTINUE TO HAVE ONE GrantType (Debate WITH WITH Scott + Kevin for only 1 and not many)**
  • Would be allowed to provide address for all selected chains

This allowed Grant Owners to receive funds in multiple chains and also be part of more than 1 CLR rounds (even if they overlap)

Grant Contributor
  • Would be able to navigate
  • Would be able to switch any chain the Grant has selected (Keep in mind -> ETH chain has multiple tokens while ZCash has only 1)
  • If the user switched btwn chains -> the mode of payment would differ and this would tricky
  • Additonally the CLR info will vary based on Chain selected (cause one chain + Grant type will have a CLR round while another chain would not )
  • We add the Gitcoin Fee for cross chain flow

Keep in mind -> if the CLR round is for tech + ETH -> only if the contribution is made in ETH to tech grants -> will they account for the matching algorithm.

** Assume we have CLR round for ETH Tech & ETH Media & ZCash Tech If a grant is allowed to select both Tech & Media & has provided both addresses -> user will not know which pool to contribute to if he selects ETH.

@owocki
Copy link

owocki commented Aug 10, 2020

+1 to multiple overlapping rounds. simple calcs: if a grant is a member of two matching rounds during a time frame, and it gets a contribtuion, the contribiton gets matched by both rounds

if we need to iterate to get there, thats fine. maybe the above is a v1.1 or v2 thing

@frankchen07
Copy link

yeah the calcs will work, I'm just worried about the scenario where grants will trend towards getting into as many rounds as possible, because that maximizes that grant's ability to rake in more funds. Thinking about it now, you can't really compete across rounds, but a grant in multiple rounds can, overall, get more funds.

@owocki
Copy link

owocki commented Aug 10, 2020

fwiw im not really worried about the economics of that scenario (though the UI will be annoying to de-couple/build)

@thelostone-mc
Copy link
Author

Backend: 2 weeks
Frontend : NA
Design

V0

  1. Create a new CLR Round for Zcash
  2. Grant will have pick Zcash /ETH rounds
  3. Contributor will donate via QR code flow

V1

  1. Existing Grants can choose ETH / ZCASH
  2. Can be part of multiple clr rounds across diff chains
  3. Contributor will donate in any token that the Grant accept

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