social-dist0rtion-protocol / planet-a

The Tragedy of the CO₂mmons
MIT License
10 stars 3 forks source link

Display the global CO2 value and make the CO2 "run-away point" configurable #3

Closed TimDaub closed 5 years ago

TimDaub commented 5 years ago

Scope

Screen Shot 2019-07-16 at 14 08 47

Deliverables

Screen Shot 2019-07-16 at 14 13 11

Roles

bounty gardener: @TimDaub / 10% bounty worker: name / 75% bounty reviewer: name / 15%

johannbarbie commented 5 years ago

and then there was this crazy idea: https://leapdao.slack.com/archives/CKG9NG77W/p1563272044003000

johannbarbie commented 5 years ago

we just thought up this together with @micheleb :

Screen Shot 2019-07-16 at 10 14 30 PM
TimDaub commented 5 years ago

Great UI mockups! Shall we create a proper issue for those to implement them after the Ethereum meetup?

For the worker of this issue however, please consider what was written in the original description:

Note that for the purpose of testing the game at the Ethereum Meetup, a complicated time-series data plot/chart is not required! It's something we can build for ETHBerlinZwei of course. As a countdown requires similar functionality, we recommend not implementing that either (too much work for now).

johannbarbie commented 5 years ago

can we still do this on a separate page? i don't see why this needs to be in the wallet.

micheleb commented 5 years ago

so right now we have this toco2 using the app inside the webapp folder on the the demo repo.

The data is polled every 10 seconds using the getUnspent() function iterating over a list of addresses (which is now hardcoded to just @vrde's address, but it should be initialized to the list of addresses of all participants). Names aren't being displayed because... they have not been set in the passports 😅 but as soon as they're set, they will show up on the page. Avatars, not yet, because we need to decide on where to upload user pics and how to link them to the passports.

Data is stored on local storage, so the page can be reloaded without losing anything.

The sustainability index is now calculated as 1 / Math.max(1, countryEmissions - countryTrees) (where trees is actually carbon locked), so that higher scores mean better performance (because "lower is better" is always awkward).

The points are all near 0 because we haven't been trading much yet, and because the numbers need to be tuned, anyway. Also, nobody shows up in the tree planting list because no tree has been planted yet. Those two lists show the top 10 scorers for each category.