Skip to content
Wattsun

Wattsun

The Grid That Runs Itself!

Created on 21st February 2026

Wattsun

Wattsun

The Grid That Runs Itself!

The problem Wattsun solves

Energy is broken. Utility monopolies set prices, own your grid connection, and penalize you for generating your own power. There's zero transparency into where your money goes, no say in how the grid operates, and no recourse when bills spike. Your solar panels overproduce all day — the utility buys it back at pennies while your neighbor pays full price. And when communities try to self-organize? Corrupt HOAs overstep with power, making illegal decisions and creating headaches communities can't fix.

Wattsun fixes this by putting neighborhoods in control of their own power grid — with peer-to-peer solar energy trading settled on Base.

  • For solar homeowners: Sell surplus energy directly to neighbors at fair, dynamic prices and earn USDC for every kilowatt-hour — not pennies from the utility. Community rates average 39% less than city power.
  • For energy buyers: Purchase clean energy from your neighbor's rooftop instead of paying full price to a monopoly. No middlemen. No markup. Just sunlight and smart contracts.
  • For communities: On-chain governance replaces corrupt HOAs. Neighborhoods vote on their own rules, fund local initiatives from a shared treasury, and maintain built-in safety nets (55% reserve floors, city power backup, storm-adaptive reserves).

What makes it different: An autonomous AI agent ("Wattsun") continuously monitors 132 homes and 1,188 IoT devices across 6 communities, matching surplus with deficit in real time. Every trade settles instantly in USDC on Base — fully transparent and verifiable on-chain. The agent is self-sustaining: gas is sponsored by Base, and per-community ERC-8021 builder codes generate rewards that fund ongoing development and upkeep. More communities means more transactions means more builder code revenue — a self-reinforcing loop.

Challenges we ran into

The Mystery of the Matching Contract Addresses

While working to get seamless on-chain transfer and trading on testnet, we hit a bizarre blocker that cost us roughly 6 hours. After deploying the GridBank contract, we noticed something strange — our new contract address ended in "...63", which was identical to the ending digits of an older deployed contract. We were initially convinced something had gone wrong with deployment or that transactions were routing to the wrong contract.

After extensive debugging, we realized it was pure coincidence — roughly a 1 in 65,536 chance (like flipping 16 coins and getting all heads). A fun unicorn moment in hindsight, but a real headache in the moment when every transaction seemed to behave unexpectedly. The fix was simply verifying we were pointing at the correct full address, but the debugging journey taught us to never assume and always validate contract addresses end-to-end.

Accessible SVG Animations

Creating the interactive system diagram on our landing page was more challenging than expected. We wanted clear, animated visualizations showing how energy flows through the system — from solar panels to AI matching to on-chain settlement. Getting SVG animations to be both visually compelling and meeting accessibility requirements (proper contrast, screen reader support, reduced-motion preferences) required significant iteration. We landed on a design that adapts to light/dark mode and communicates the energy cycle without relying solely on animation.

Use of AI tools and agents

In-System: The Wattsun Agent

At the core of Wattsun is an autonomous on-chain agent managing 6 communities, 132 homes, and 1,188 IoT devices — with zero human in the loop. The agent operates on a continuous 5-tick cycle (~15 seconds) with three phases:

  1. Observe — Solar production, home consumption, battery levels, weather conditions, and 9 device types per home across all 6 geographic locations. Detects solar panel faults by comparing expected vs. actual output.
  2. Analyze — Surplus/deficit matching, fault detection, reserve levels, weather impact, device health, and buyer affordability (USDC balance checks).
  3. Execute — Matches trades and settles in USDC on Base, manages IoT devices (auto-disabling non-essential devices like TVs and EV chargers during storms or low inventory while protecting HVAC and lighting), and builds on-chain reputation (EIP-8004).

The agent is designed for determinism and auditability — every decision follows verifiable, rules-based logic that can be audited on-chain, which is critical when financial transactions and community governance are involved.

The self-sustaining model is key: gas is sponsored by Base, and each community has its own ERC-8021 builder code. High transaction volume across communities generates builder code rewards, which fund ongoing development and infrastructure maintenance. The system literally runs itself.

In Development: AI-Assisted Building

AI tools were a critical force multiplier throughout development. With busy schedules and an ambitious scope (6 communities, 3 smart contracts, full-stack application), we used AI extensively to:

  • Plan and prioritize — Initial brainstorming sessions, conversation transcripts, and notes were processed by AI to identify the highest-impact features and technical dependencies. This gave us project-management-level clarity measured directly against our codebase, helping us prioritize and execute effectively.
  • Rapid iteration — Complex components like the multi-community weather simulation, dynamic pricing engine, and ERC-8021 builder code encoding were developed through fast AI-assisted iteration cycles, allowing us to prototype and refine much faster than traditional development.
  • Architecture decisions — AI helped us evaluate trade-offs like on-chain settlement patterns, reserve floor strategies, and device priority hierarchies for conservation mode.

The combination of an in-system autonomous agent and AI-assisted development meant we could build a system that itself uses intelligent automation — a fitting approach for a project about autonomous infrastructure.

Tracks Applied (2)

Prosperia

On-chain governance — communities create and vote on proposals (wildfire microgrids, hurricane reserves, roof repairs) w...Read More

Base Self-Sustaining Autonomous Agents

Autonomous: The agent runs a 15-second cycle with zero human in the loop. It observes all 132 homes (solar production, c...Read More
Base

Base

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio