Ethereum-powered infinite gaming for public goods: a demo

matlemad
Coinmonks

--

I recognized that information was, in many respects, like a public good, and it was this insight that made it clear to me that it was unlikely that the private market would provide efficient resource allocations whenever information was endogenous.

— Joseph Stiglitz

I recently had the chance to work with CLARA, a cooperation project innovating water sanitization for communities living in rural Ethiopia. CLARA was first designed and started by Donato Patrissi, an italian engineer based in Hawassa (200km south west of the capital Addis Ababa) and later developed thanks to a Swiss-Ethiopian consortium constituted by SUPSI, SAED NGO, Hawassa University, and Antenna Foundation.

Background

In humanitarian contexts and developing countries, most water authorities, international organizations and NGOs provide clean but unsafe water. Currently, water is supplied from safe sources and, if not strictly necessary, it is usually not treated nor disinfected before reaching the final users. This causes the risk of water re-contamination by Escherichia coli where water is supplied to community fountains and fetched with unclean jerry-cans. In Ethiopia, as in other African countries, HTH (Calcium hypochlorite) disinfectant powder is imported from India and China. This implies long supply chains, high costs and the potential of depletion of chlorine content in HTH when stored.

CLARA is a Plug&Play technology that automatically disinfects the water passing through a pipeline with sodium hypochlorite produced using only salt and solar energy, at ¼ the market price of HTH. It is a sustainable, innovative, modular and easily deliverable solution for water disinfection in rural areas and humanitarian aid contexts. A controller board detects the flow of water and inserts the right amount of disinfectant solution every 20 liters (jerry-can volume) to reach a desired concentration (0.5mg/L of free Residual Chlorine at the point of delivery). At the same time, thanks to the remote monitoring system installed, NGOs, humanitarian aid agencies and water facilities can ensure standard operations by planning maintenance and reporting KPIs and successful achievements to the donors.

The first pilot of CLARA was installed in Abella, a rural community of 1000 people around Hawassa area (Ethiopia) and it is currently providing safe drinking water for the whole community. In March 2021, a larger system was installed in another rural community. CLARA is now providing disinfected water using solar energy for about 10.400 people living in the area. The percentage of E. coli recontamination at the household level dropped from 75 to 0.

Ethereum-powered gaming for CLARA

Deterioration of components is a major issue in the spectrum of technological deployment for cooperation in developing countries. CLARA devices’ maintenance should not be dependent on donations or on grant-based funding, and not rely on the intervention of non-resident program staff only.

The proof of concept is built using the Ethereum technology and provides a gamified solution for funding the device’s maintenance while offering economic incentives for the funding community.

We opted for creating an online endless-runner game and connecting it to a Leaderboard contract on the Goerli Testnet (Ethereum). In order to start the game players must ‘insert coins’. Players play and when the game is over they have the possibility to add their Top Score and ethereum addresses on the Leaderboard contract.

Game sequence from ‘Insert Coin’ to ‘Add TOP score’

A specific function in the contract would not write on the Leaderboard those addresses that have send ETH without a receipt signed by the game’s address.

Every time the contract owner calls the funds for CLARA maintenance, a function is executed that splits the funds as following:

40% to the contract Owner (for CLARA devices’ maintenance)
30% first address on the Leaderboard
20% second address on the Leaderboard
10% third address on the Leaderboard

The structure of this potentially infinite game, together with the perspective of a passive income, represent an incentive that should guarantee a constant cash-flow. In addition, the smart contract is highly re-usable on different game-schemes in order to make the cooperation project fully sustainable on an extended time frame.

Currently the Leaderboard contract is public and active on the Goerli testnet and the access to the game is allowed previous payment of goETH 0.01.
The Leaderboard contract is written in Solidity, while the game and its browser communication depend from behaviors written in C# (the game’s core) and JavaScript. Web browser is able to execute only JS code, hence the need to create a bridge between the game’s inner functions which will have to communicate with Web3.

Other tech used in the development:
- Unity Engine
- Metamask
- Chainsafe SDK (to observe and notify state changes in the registry)
- Truffle e Ganache

→> TRY THE CLARA DAPP (be sure to have Metamask on your browser, switch to Goerli testnet and have at least 0.03 ETH) **

Leave your feedback (play the game first👆)
See the repo and feel free to contribute
(we did our tests, but suggestions always help)
Join the discussion on TG

Co-Authored with Donato Patrissi and Gorlitzer

--

--

matlemad
Coinmonks

Musician rolling down the crypt, educator and project manager. https://linktr.ee/matlemad