Inspiration
Web3 holds immense potential to address real-world challenges, such as financial inclusion. By 2050, the UN has outlined 17 Sustainable Development Goals (SDGs) we should achieve. While the practical applications of blockchain might sometimes seem elusive, there's always room for innovation. Having delved into DeFi, we wanted this hackathon to mark a different direction. Thus, Terripoly was born—a game fusing Monopoly with real-time satellite data for environmental monitoring. The in-game token EKOX isn't just virtual currency; its future could fund reforestation projects, tackle environmental challenges, and even integrate with the carbon credit system.
What it does
The game begins with a map. Users select a location and sketch their desired areas using polygons. They can then request real-time satellite data to determine the purchase price based on the greenness of the area. If a user has enough funds, they can acquire the land. Maintaining these regions in a green state produces yield; healthier vegetation results in greater returns. This functionality has been implemented.
Still on the roadmap: If a user selects a location already owned by another player, they must pay a fee to the original owner, reminiscent of classic Monopoly. Future visions include land trading and partnerships with real-world environmental protection projects, both were not achievable in the hackathon's timeline.
How we built it
We've initiated an ERC-20 token smart contract on CELO, enhancing it with features such as land purchasing, land ownership records, and keeping as much as possible data on-chain.
On the back-end, we've developed an API server, using Python, to process real-time satellite data upon request. This setup currently operates from our home server, hoping everyone could access our demo throughout the hackathon.
Given the tight timeline, our frontend was constructed using vanilla JavaScript and HTML, ensuring swift interactions between the smart contract and satellite data API.
Challenges we ran into
Creating a game necessitates cutting-edge user interface and experience design. Currently, this is an area we're looking to enhance, and we're eager to collaborate with UI/UX experts to elevate it. Extracting polygon geometries from the chain and rendering them on the map proved challenging but was successfully achieved. This intricate process left us with limited time, preventing us from integrating features like payment for trespassing another player's property.
Initially, we aimed to construct a highly secure smart contract and frontend. However, given the time constraints, we prioritized core functionalities. This approach, while operational, does present several security and efficiency concerns, both to be improved in the future.
Accomplishments that we're proud of
We're immensely proud of crafting an API system tailored for satellite data and seamlessly integrating it with both the frontend and the CELO chain. Moreover, our innovative approach to calculating costs based on vegetation health, indexed by the NDVI (Normalized Difference Vegetation Index), and assigning a value to each land parcel stands as a testament to our team's ingenuity and dedication.
What we learned
We've learned a lot along the way. This includes getting to grips with FastAPI in Python, navigating CORS policies, and linking three ecosystems through API and RPC calls. We understood the value of using the chain for transparency and cost management, recognized the satellite API as a vital source of natural data, and realized the frontend needs a blend of creativity and enjoyment.
We also realized how crucial graphic designing is in game development. It's something we'll definitely consider for our future work and projects.
What's next for Terripoly
We will add player-to-player interactions and a random start position in the game. We plan to use the EKOX token to support restoration projects and consider linking it to carbon credit offsetting. We'll seek community feedback to refine the game, aiming for more fun and maintaining our goal of raising environmental awareness.
Adding the satellite data directly on-chain through oracles would be good. It can help boost transparency and trust.
Additionally, if the project gains enough traction, we plan to expand our team by bringing in designers, data scientists, and other developers to help craft a standout product.
Bounties
ETHWarsaw Foundation & Celo Foundation
Wallet Info
0x6ffd165031D3bCFd87dB3Bc52293015e31ACB31c

Log in or sign up for Devpost to join the conversation.