This is my public repository for Hedera Africa Hackathon
# ⚡ SOKO: A P2P Energy Marketplace on Hedera
**Hackathon Track:** Track 4: AI & DePIN
This repository contains the complete source code for SOKO, a decentralized P2P energy trading platform built on Hedera.
* **Live Demo:** `
sokoenergy.netlify.app`
* **Demo Video:** `
youtu.be`
* **Pitch Deck:** `
gamma.app
## Hackathon Compliance
* **Hedera Certification:** Proof of certification for our team lead is available here: `[LINK TO YOUR HEDERA CERTIFICATE]`
* **Public Repository:** This repository is public and all code is auditable.
* **Collaborator:** `Hackathon@hashgraph-association.com` has been invited as a collaborator.
---
## Project Structure
* `/soko-contracts`: The deployed Solidity smart contract (Ethers v5/Hardhat).
* `/soko-frontend`: The functional React frontend deployed on Netlify.
## Problem Statement
In many African communities, energy access is unreliable and expensive. Households with small-scale solar (producers) have no way to monetize their surplus energy, while their neighbors (consumers) have no way to buy it directly, relying on an inefficient central grid.
## Our Hedera-Based Solution
SOKO is a decentralized marketplace that tokenizes surplus energy, allowing for secure, P2P trading.
1. **Producers** tokenize their surplus energy (e.g., 1 kWh) as `$SEWH$` tokens (an HTS token).
2. **Producers** list these tokens for sale on our Hedera Smart Contract, setting a price in `$USDC` (another HTS token).
3. **Consumers** browse the marketplace and purchase the `$SEWH$` tokens.
4. The smart contract handles the **atomic swap** trustlessly.
Our future-state feature, mocked up in the UI, includes an **AI layer** to suggest optimal pricing based on grid demand and weather forecasts, fulfilling the "AI & DePIN" track.
## Hedera Integration Summary
* **Hedera Smart Contract Service (HSCS):** Our entire marketplace (`SokoMarketplaceV2.sol`) is a Solidity sm …