About
GreenStake is a decentralized exchange (DEX) and staking platform designed for community-owned renewable energy ecosystems. It enables users to tokenize surplus kWh credits as ERC-20 EnergyTokens (ETK), stake ETH based on AI-predicted needs, and trade peer-to-peer with real-time pricing and stablecoin settlements. Built on Ethereum Sepolia testnet, it addresses key challenges in green energy: grid waste (20–30% from overproduction), privacy in consumption data, and fragmented liquidity across chains.
Users start by connecting their wallet (MetaMask via Wagmi/WalletConnect) and generating an AI forecast using Hugging Face's GPT-2 model on historical data (e.g., [1000, 1200, 1100] kWh → predicts 1300 kWh next month). This informs needs-based staking: Commit ETH (min 0.01) via the GreenStakeDEX V3 contract (0x802405d53f046429D4e76660FFf9E0FE2b3359A5), which verifies commitments on-chain while keeping details private (future ZKP extension with Semaphore). Staked funds can be withdrawn anytime, with flexible unstaking.
Trading happens via the DEX: Execute swaps (e.g., ETK for PYUSD) at Pyth oracle prices (pull method: Fetch from Hermes, update on-chain with updatePriceFeeds, consume via getCurrentEnergyPrice – fallback $3000/kWh). PYUSD (testnet 0xCaC524BcA292aaade2DF8A05cC58F0a65B1B3bB9) enables instant, stable settlements (approve once, transfer in executeTrade). All txs are transparent via embedded Blockscout Autoscout explorer (Sepolia instance for real-time tracking).
As an ETHOnline 2025 hack, GreenStake demos a live MVP on Replit (https://budget-buddy-andreaamenta87.replit.app/), with verified Sepolia contract. It's mainnet-ready for Ethereum/Polygon/Base, empowering co-ops to trade renewables equitably – reducing fossil reliance and unlocking $1T+ tokenized energy markets. Open-source (MIT), with roadmap for DAO governance and L2 scaling.
Prizes
- PayPal USD · PYUSD Consumer Champion (Best Consumer-Focused Payments Experience) · PYUSD Consumer Champion (Best Consumer-Focused Payments Experience)
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






