gitcoinco / web

Grow Open Source
https://gitcoin.co
Other
1.79k stars 776 forks source link

as a user attending ethdenver, i want to play the 'set completion' game at ETHDenver, so I can engage with sponsors and win a keep key #3197

Closed owocki closed 5 years ago

owocki commented 5 years ago

User Story

as a user attending ethdenver, i want to play the 'set completion' game at ETHDenver, so I can engage with sponsors and win a keep key

Why Is this Needed

Summary:

Description

Type: Feature

Definition of Done

We would like to build a set completion game for ETHDenver this year, wherein you complete various tasks for sponsors. For each task you complete for a sponsor, you are given one of 12 limited edition bufficorn kudos.

The technology for airdropping kudos already exists We will give each sponsor a lint to airdrop their kudos. To see an example airdropped kudos, click here.

What the user, who builds this ticket, will be responsible for, is the set completion aspect of the game. Here's how it works.

  1. User collects 12 bufficorn kudos
  2. User goes to gitcoin.co/ethdenver
  3. Site validates that user has all 12 bufficorn kudos (John to provide direction on whether we need to validate that they didn't get traded them or not. i.e. do they need to come direct from our distribution address or not?)
  4. If validation in step 3 passes, then user is sent a special 13th Kudos.
  5. If validation in step 3 passes, then user is sent a uPort attestation that they've finished the ETHdenver prize.
  6. If validation in step 3 passes, then user is sent a uPort attestation they get a kudos

Additional Information

This bounty will be broken up into two components,

  1. design for gitcoin.co/ethdenver
  2. coding for gitcoin.co/ethdenver

I will pay 50% of the bounty to contributors who complete each portion of the task.

kuhnchris commented 5 years ago

I'd be up for the coding side.

willsputra commented 5 years ago

This sounds exciting! I'll give this a shot.

Not logged in: A landing page that explains how the game works and what users can get. Clicking 'Get Started' should ask the users to log in. not logged in

Logged in: We can reuse the Kudos component from the marketplace. Clicking on each Kudos (Kudo? 🧐) should bring you to the Kudos details page. logged in

Complete all: Is there going to be only one winner or multiple? What actions do the winner have to do? success

owocki commented 5 years ago

wow, looks pretty cool. passing to john paller for feedback now @willsputra

kuhnchris commented 5 years ago

Also, I assume the Dead Line is Feb 2019, as ETHDenver starts then?

kuhnchris commented 5 years ago

Any news on this @owocki ?

owocki commented 5 years ago

Is there going to be only one winner or multiple? What actions do the winner have to do?

Multiple- The winner has to earn eeach of the kudos.

Guys I have some bad news. I shared the designs with John Paller of ETHDenver and he said he wants it to be ETHDenver branded not Gitcoin branded.

I'll own the miscommunication. It's my fault; sorry. I'll def pay for the work done thus far.

The website collateral for ETHDenver is http://ethdenver.com and here => http://bits.owocki.com/72d1277da728/Austin%20Sort%20Images%20-%20Website-20181221T180314Z-001.zip

kuhnchris commented 5 years ago

So you'd rather have it the other way around, e.a. use the ethdenver template as a base and go from there, right?

owocki commented 5 years ago

yea thats what john asked for. luckily i think much of the content is the same

kuhnchris commented 5 years ago

Well, easy enough, that's mainly a loss for @willsputra then, sorry. For me it stays mostly the same. Just let me know if you got an approved design. 👍

willsputra commented 5 years ago

@owocki @kuhnchris no problem at all! 😄

so are they going to send us a design? or do I just change the ones we have with ethdenver color/fonts/layout?

owocki commented 5 years ago

so are they going to send us a design? or do I just change the ones we have with ethdenver color/fonts/layout?

yeah lets just use the ethdenver colors / fonts / layout

heres the art for the ETHdenver site https://www.dropbox.com/sh/tzf83jcpbqxtmxy/AAAqRwP_G1aPZ1M3GVvgkPeVa?dl=0

its all from ethdenver.com -- thats all that he sent me.

owocki commented 5 years ago

@willsputra i have a meeting with john paller on thursday/friday. any chance we can have a skinned mock by then? ( i dont know what your other priorities are.. but feel free to say no if there are more pressing things, we can always kick to next week)

willsputra commented 5 years ago

@owocki planning to finish it today!

willsputra commented 5 years ago

Not logged in: not logged in copy

Logged in: logged in

Completed: completed

@owocki what do you think?

owocki commented 5 years ago

i love it.. asking john for feedback now

PixelantDesign commented 5 years ago

Love this! Looking great!

PixelantDesign commented 5 years ago

Are we able to say Nifty Kudos? Will there be confusion with Nifty?

kuhnchris commented 5 years ago

"Neat"? "Special"? "Bufficorn-Approved"?

owocki commented 5 years ago

From the ethdenver folks:

Any special requirements on the redemption side? We were planning on having a link that each sponsor can use to give away their specific kudos. Or maybe a spreadsheet of links, each of them one-time-use - so that way people can’t save the link address and pass it to their friends.

Then if they get all sponsor kudos they’ll get a modal overlay and/or an email telling them some copy you specify about earning a keepkey..

I think unique links is the way to go, don't want people to game the game. We might print the links on paper or sticker sheets as QR codes or urls for the sponsors to individually pass out.

owocki commented 5 years ago

will make a code ticket after i finalize with them.. this is def on the right track

willsputra commented 5 years ago

@PixelantDesign @kuhnchris Good point. I like "Bufficorn-Approved". I think it'd be great if we could also highlight that they're NFTs too. Would "Bufficorn-approved, non-fungible Kudos" be too long? 😂

@owocki What will the users see when they go to the unique links? Something like our current Redeem Kudos page?

screenshot 2019-01-04 21 56 29
owocki commented 5 years ago

yes thats the plan.

maybe we just keep it the same page that as is now, but add an ethdenver logo next to the gitcoin logo in the top left

owocki commented 5 years ago

Gameplay: I'm keeping it simple.

STEP 1: Player visits 12 sponsors and 7 ecosystem locations.

Ecosystem KUDOS Maker Space Art Gallery Food Trucks Shill Colorado (No Draft Completed) Relaxation Room (No Draft Completed) DJ Chill Room BUIDL a Friend Sponsor KUDOS: ConsenSys Opolis Shapeshift KeepKey (No Draft Completed) Clearmatics Skale Labs Maker Status NCC POA The Graph OPEN (will sell before Jan 15th) STAGE 2: This unlocks the 20th KUDO, the "Be A Bufficorn" KUDO. Presenting this KUDO to the Gift Shop desk will result in reward of Custom Bufficorn KeepKey.

NOTE: Along the way, each station will have a custom KUDO sticker to give out to those earning the digital KUDO. Draft Gameboard attached.

Per Above, We need to ADD a Relaxation Room KUDO that we didn't have on the first go around. We need to ADD a Shill Colorado KUDO that we didn't have on the first go around. We need to ADD a KeepKey KUDO that we didn't have on the first go around.

A few questions & Comments about gameplay:

We'd like to host the game site at ethdenver.com/bufficorngame We understand that uPort can't hold a KUDO (erc 721). How are the attestations being issued? Purpose of them? Where will players receive their KUDOS? Hold them long term? How will a person get "scanned" for their KUDO? uPort ID? Then what? How do we prevent people from "redeeming" their completed set more than once? How do we prevent people from sending/sharing KUDOS? NOTE: Status has said they can be received/held by their wallet.

Let us know when you're ready to walk through the gameplay simulation. Thanks!

kuhnchris commented 5 years ago

Well, can we assume everyone has a cellphone? and if so, can we assume that those people have a gitcoin/eth addr on hand? even if uPort can't hold the kudos, if they are a eth addr they can receive the kudos, they just need a extra page (which we can provide) to check that address's kudos. (it's actually a widget I planned to implement, maybe we can use it directly there)

For the simulation I think we need the following:

After that we can:

Those are all the steps I think are neccessary to test this out to give a final yay/nay

owocki commented 5 years ago

Thanks for the feedback Chris! Yes we can assume 95% will have a smartphone. We've found that 60% will have an ETH address on hand (its an Ethereum focused event)

Agree with your order of operations

kuhnchris commented 5 years ago

You want to schedule a pre-test internally so you guys can test it out? In my earlier job as demand manager I usually suggested 2 test phases before the live phase, to say a "dev pre test" where we play the entire process ourselves and a "customer test" where we have the customer test with us shadowing them, before we set everything live. But that depends on your strategy of work and how much time you want to invest in this event. If you say it's not that integral you may can work with one "final" test before the live phase and live-patch everything that pops up during the event by having some devs on standby.

Everything else, up to you. ;-)

owocki commented 5 years ago

@willsputra can you share skitch files?

@kuhnchris i think its a good idea. first things first, we'll need to get this spliced up tho.. im gonna make a code ticket

owocki commented 5 years ago

coding task https://github.com/gitcoinco/web/issues/3427

kuhnchris commented 5 years ago

@owocki great! I'll jump right on it as soon as I can fizzle it apart.

willsputra commented 5 years ago

@owocki @kuhnchris Sketch file: https://drive.google.com/open?id=1zwPL6rX5O263q7haS9R41boFKHTDuKj9

kuhnchris commented 5 years ago

ha! i found https://www.photopea.com/ which lets us open these sketchy (pun intended) sketch files without any problems, and export and layers I need, wheee! Starting on it right now! Thanks @willsputra !

cmditch commented 5 years ago

A few notes about functionality, from a conversation Kevin and I had over the weekend:

  1. Provenance Check. The kudos should only show up on the dashboard if the owner received it from it's original source (gitcoin owned contract). To prevent people from gaming the game by sending their kudos to people who didn't actually earn it.

  2. No Github Auth The kudos should be redeemable if the browser sees you have a web3 wallet, no github account should be required as many people playing the game aren't necessarily devs.

  3. One time use link for kudos redemption Instead of a static/reusable URL for redeeming a given kudos, each redemption should be one time use only, using a dynamically generated link, which expires once it's been claimed. Once again, to prevent gaming the system.

Let me know if there's any questions on these.

Thanks!!

Coury Ditch ETHDenver Technical Steward

kuhnchris commented 5 years ago

Hi Coury!

Thanks for chiming in, you can see the progress over at https://github.com/gitcoinco/web/issues/3427 or on-demand if you ask me I'll start a VM so you can take a look.

Regarding your points: 1.) Right now I check against the "original" kudos, which is the address that mints the kudos. So as long as it's sent from the original minter nobody should be able to by-pass the system (we can try it during the test run if you want, @owocki please note) 2.) So, we shall not check regarding a gitcoin login, but for web3 availability? That may make things not that trivial, but possible - which kind of web3 provider do we need to support? Brave and Metamask? Trust? Any other? (I do not know the eco-system of android browsers for web3 support) 3.) The current implementation would redirect the user to ethdenver/redeem where his assigned user would automatically get the kudos transfered (after a check he did not already receive one) if all other kudos have been redeemed, see build-ticket for information(s). Do you want to have additional "printed" and pre-minted one-time links so user could redeem them later on?

Thanks! Chris

owocki commented 5 years ago

@kuhnchris whats the action item for me on this? sorry i missed it; didnt know u were waiting on me. u need me to test / PR review?

kuhnchris commented 5 years ago

Your take on the web3 v.s. login thing, is that OK within this scope? And what browsers to support?

owocki commented 5 years ago

the customer wants web3 and no logins.. i guess my question back to you is how much more complexity is there for doing the web3 way.

for browsers, lets just say latest chrome.. and it should work responsive design, which means that mobile / tablet are fine.

i can re-up the bounty-amount if the scope has changed too much.. can also chat on slack about this if u want

kuhnchris commented 5 years ago

Well "web3 and no login" basically changes the task from "back-end check if user is logged in" (e.a. python) to "check via javascript if user is logged in and then blend in/out a div", e.a. redesigning the page. Not that it would be a hard task, mind you, it just is a entirely different technology and basis. also, the logic for reading the kudos has then to be changed, as it currently demands us to check the profile connected to the kudos to the tx, but instead you want to have it being searched from a (random) eth addr, which I do not think is currently even implemented.

And the "browser" question is DIRECTLY linked to that. Before we had a "homogenous" environment, gitcoin (linked either via mobile or desktop to a eth addr), user can redeem a kudos even without the wallet on hand, and now, he needs to have a event, or hot-wallet on hand to redeem the kudos. This sounds not entirely optimal, especially since we already had people ask around with the other types of android browsers, if you remember the tickets in the last week(s).

It's not about "re-up the bounty", it's about "what's the scope" in this case. Maybe it was a misunderstanding from my side assuming "logged in" would mean "logged in into gitcoin".

It's up to you, if you say we want to support chrome/brave on android for this event environment, then, sure enough, we can do that. I can rewrite the page to have everything in a single page, the only thing that needs to be rewritten on the Backend would be the determination of "has he collected all the kudos", as this would not be connected to a profile, but rather to a txid, and/or eth addr within that txid. @mbeacom @octavioamu is this even possible in the current data model of the Kudos?

Sorry for being a party pooper! Chris

owocki commented 5 years ago

Got it. The reason I scoped https://github.com/gitcoinco/web/issues/3427

to be :

The scope of THIS SPECIFIC coding task is to just do the html / frontend coding. Acceptance criteria:

All of the designs are coded.
all pages are responsive
pls allow 2-3 iterations of feedback.
must be submitted by 1/11/2019

Hopefully you didnt get too far into coding up the python side of this...

From https://github.com/gitcoinco/web/pull/3429 it looks like you might have. I'm sorry I should have done a better job of calling this out.

Let me go back to the customer and ask if theres something we can do about this

kuhnchris commented 5 years ago

Well, bugger me backwards, I guess I overread that one.

Do not worry, all designs and all pages are coded (and should be responsive ™️ ), the python code wasn't much, so even if we discard it, we can always keep it as a template for future events. That begs the question tho: did you intend to create a ticket for the backend aswell? Or was it always just in scope as frontend development?

Again, do not worry, that was my bad for misreading that up there. I'll get to the web3.js part ASAP, the pages themselves are at least finish from a design point of view.

owocki commented 5 years ago

let me see if i can convince the customer to use the python stuff. i do think that, in addition to minimizing the rework, it will be less clunky. give me 12 hours

kuhnchris commented 5 years ago

Do not worry about "12 hours" or stuff like that, it was your time line to finish it by the 11th, I just try to keep it within that time range. ;-) And, as I said, having not a github, or at least gitcoin, connection makes interacting with the platform far harder than it has to be, as the web3(.js) environments are not really unified right now.

Naturally I see that people want to decouple Kudos from Gitcoin (makes sense), but right now it's in a bit of a integration state since nothing else supports it currently. ;-)

owocki commented 5 years ago

@kuhnchris @cmditch After sleeping on it, I'm really worried about what the web3 architecture of this is going to look like.

Upon page load, we're going to have to make 20 calls to the smart contract via web3 (one for each kudos). for each kudos, we'll also have to hit up IPFS to get the metadata hash of each kudos. We may also have to make more calls to figure out the lineage of each Kudos (each 721 has a parent gen 0 Kudos)

Ref: Kudos Contract https://github.com/gitcoinco/Kudos721Contract/blob/master/contracts/Kudos.sol

@kuhnchris any way you can think of to get around these problems?

kuhnchris commented 5 years ago

yes, very easily even: we provide this via gitcoin API. we need to make sure we are not getting bombed tho, but the same way we check right now, we simply provide "anonymous" api call functions for gitcoin api which provide the current data (kudostransfers, etc.) as we currently use them in the backend, simply in the frontend. shouldn't take longer than a couple of hours if you want me to try?

owocki commented 5 years ago

@kuhnchris as long as it's scoped in the ethdenver app and doesnt affect the other django apps in the gitcoin system, then fine by me.

since the original code ticket was scoped around just coding the html/css, do you want a new ticket?

lets set a target date of 1/14 to have a demo we can do internally for this?

kuhnchris commented 5 years ago

keep it in that ticket so we do not spread this stuff around. make a note that the target goal is 14th, i'll try to get it done today or tomorrow.

owocki commented 5 years ago

thanks man!

cmditch commented 5 years ago

@kuhnchris Thank you!

This will be incredibly helpful for the non-techy, or non-github account folks at the event.

❤️

kuhnchris commented 5 years ago
Loading Web3 context...
test.html:68 Found eth addr: 0x28F4a17f8A99AB90c1a401b85D694B2C0eA40C4b, loading kudos...
test.html:107 Kudos owning: 14
test.html:68 Loading 14 kudos data...
test.html:68 (kudos 2) Loading Kudos Data from ID: 307
test.html:68 (kudos 7) Loading Kudos Data from ID: 419
test.html:68 (kudos 5) Loading Kudos Data from ID: 364
test.html:68 (kudos 12) Loading Kudos Data from ID: 878
test.html:68 (kudos 11) Loading Kudos Data from ID: 757
test.html:68 (kudos 13) Loading Kudos Data from ID: 894
test.html:68 (kudos 10) Loading Kudos Data from ID: 649
test.html:68 (kudos 8) Loading Kudos Data from ID: 426
test.html:68 (kudos 0) Loading Kudos Data from ID: 202
test.html:68 (kudos 2) finished loading data for base kudos. - cloned-from ID = 239
test.html:68 (kudos 7) finished loading data for base kudos. - cloned-from ID = 28
test.html:68 (kudos 5) finished loading data for base kudos. - cloned-from ID = 82
test.html:68 (kudos 12) finished loading data for base kudos. - cloned-from ID = 57
test.html:68 (kudos 10) finished loading data for base kudos. - cloned-from ID = 121
test.html:68 (kudos 11) finished loading data for base kudos. - cloned-from ID = 671
test.html:68 (kudos 8) finished loading data for base kudos. - cloned-from ID = 341
test.html:68 (kudos 13) finished loading data for base kudos. - cloned-from ID = 27
test.html:68 (kudos 0) finished loading data for base kudos. - cloned-from ID = 38
test.html:68 (kudos 9) Loading Kudos Data from ID: 444
test.html:68 (kudos 6) Loading Kudos Data from ID: 375
test.html:68 (kudos 1) Loading Kudos Data from ID: 203
test.html:68 (kudos 6) finished loading data for base kudos. - cloned-from ID = 114
test.html:68 (kudos 3) Loading Kudos Data from ID: 312
test.html:68 (kudos 9) finished loading data for base kudos. - cloned-from ID = 441
test.html:68 (kudos 1) finished loading data for base kudos. - cloned-from ID = 43
test.html:68 (kudos 4) Loading Kudos Data from ID: 333
test.html:68 (kudos 3) finished loading data for base kudos. - cloned-from ID = 99
test.html:68 (kudos 4) finished loading data for base kudos. - cloned-from ID = 102
test.html:68 loading kudos finished. proceeding with dApp...

guess that crash-course in web3.js worked.

and since i'm a total bell-end I now can totally scrap that and use web3.py and do it from the python side, since doing it like this is unsecure as fuck. But at least not everything is lost: I need to figure out the eth address in the first place, so I have to interact with web3.js anyways to fetch the current user account ('Found eth addr...'), with that, I'll make a call to the back-end where web3.py does the same I did right now, that is:

On a related note: @octavioamu does the air drop link already work for "eth only" addresses? I can only seem to create a KudosTransfer Object, but that one does only work against Profile Objects. Do we have to write our own AirDrop/Kudos Redeem page to allow for web3-only-eth-addr redemption without github & gitcoin profile? Would not be that big of a problem, but we would need to spend the gas on the transfer, I guess? cc @owocki

Sorry for rambling, but this topic got complex all of a sudden, lol.

owocki commented 5 years ago

with that, I'll make a call to the back-end where web3.py does the same I did right now, that is:

Do you even need to hit web3py? You should have everything u need from the KudosTransfer objects in our DB..

On a related note: @octavioamu does the air drop link already work for "eth only" addresses?

No it doesnt, we'll have to create a flag on BulkTransferCoupon to allow Kudos to be created which have no to_username.

Do we have to write our own AirDrop/Kudos Redeem page to allow for web3-only-eth-addr redemption without github & gitcoin profile?

Please no.. We could just add support for the above flag on the current one.

kuhnchris commented 5 years ago

Do you even need to hit web3py? You should have everything u need from the KudosTransfer objects in our DB..

That's what I thought. But upon investigating and checking the KudosTransfers in my Rinkeby Test System we do not have a reference to the target eth address, just the "to profile". (the sender address is filled, but the receiver is always empty...) Hence I do not think we have any Kudos Object in the database that did not come from the gitcoin app. That also poses the problem if people would ever see Kudos if they were traded on OpenSea, for example... But that's secondary for now.

No it doesnt, we'll have to create a flag on BulkTransferCoupon to allow Kudos to be created which have no to_username.

Well, the problem is not that we need to "create a flag on BulkTransferCoupon", but, how do they get redeemed? The current process, as far as I understood it, is that the Coupon initiates a KudosTransfer which basically requires, as above, a gitcoin/hub handle/Profile object. How would one then redeem that Kudos? Basically what we need is to invoke the send method on the contract to a eth address, and either create a dummy kudostransfer object or clean up kudos transfers as they are right now...

regarding the state of the page

My current workaround is that I implement a "watch list", to say, a backend endpoint that queries the web3py backend with the eth addr, with that getting into the contract, reading all ids a eth addr has in possesion (contract: balanceOf(ethaddr), then get the kudos IDs (contract: tokenOfOwnerByIndex), and then check against the internal database of kudos (I created my own cronjob for that to sync all kudos ids...) what kudos id this thing he owns is based on, and get the "base kudos". And from there I can compare which kudos the user posesses and which one he doesn't. If entry is a base kudos and base kudos is one of the customized ethdenver ones -> yes, got kudos. Else, no, kudos not relevant.

Not the prettiest solution, but as long as it works... I'll keep you updated on that.