Technology
The technical architecture behind SunGrid — hardware, oracles, settlement, and security.
Technology
4.1 Architecture Overview
SunGrid is built on four layers:
┌─────────────────────────────────────────────────────────────┐
│ SETTLEMENT LAYER: Ethereum Mainnet │
│ └─ Final settlement of ET balances │
│ └─ Dispute resolution for oracle data │
│ └─ SGC token contract (ERC-20) │
├─────────────────────────────────────────────────────────────┤
│ EXECUTION LAYER: Arbitrum One (or Base) │
│ └─ ET trading (ET/SGC pairs) │
│ └─ Smart meter verification contracts │
│ └─ Grid balancing automation │
│ └─ 400ms finality, ~$0.001 transaction cost │
├─────────────────────────────────────────────────────────────┤
│ ORACLE LAYER: Chainlink + Custom Energy Oracles │
│ └─ Smart meter data feeds (verified via TLSNotary) │
│ └─ Grid operator APIs (real-time pricing, congestion) │
│ └─ Weather data (solar irradiance, wind speed) │
│ └─ 3-of-5 multi-sig verification for all data │
├─────────────────────────────────────────────────────────────┤
│ HARDWARE LAYER: SunGrid Smart Meter (SGM-1) │
│ └─ Tamper-resistant IoT device at generation point │
│ └─ 0.01 kWh measurement precision │
│ └─ Hardware-signed data │
│ └─ WiFi/cellular connectivity │
│ └─ $45 unit cost (mass production) │
└─────────────────────────────────────────────────────────────┘
4.2 The SGM-1 Smart Meter
The SGM-1 is SunGrid's hardware root of trust and primary competitive moat.
4.2.1 Specifications
| Spec | Value |
|---|---|
| Measurement precision | 0.01 kWh |
| Connectivity | WiFi 6 + LTE-M cellular |
| Power supply | Grid-powered with 72-hour battery backup |
| Security | Secure element (SE) for key storage; tamper detection via accelerometer |
| Data signing | ECDSA P-256 with hardware-bound private key |
| Lifespan | 10 years |
| Unit cost (mass production) | $45 |
4.2.2 Verification Flow
- SGM-1 measures energy output every 60 seconds.
- Measurement is signed with the device's hardware-bound private key.
- Signed data is transmitted to the SunGrid oracle network via TLS.
- Oracle network verifies the signature, cross-references weather data and grid telemetry.
- If 3 of 5 oracle nodes agree, the attestation is accepted and ET is minted.
4.2.3 Tamper Resistance
- Physical tamper detection (accelerometer triggers key wipe on case opening).
- Secure element prevents key extraction even with physical access.
- Remote attestation: device proves its firmware integrity to the oracle network.
- Insurance fund covers compensation for verified meter failures.
4.3 Oracle Network
SunGrid uses a hybrid oracle architecture:
- Chainlink Price Feeds for real-time electricity prices and carbon intensity data.
- Custom Energy Oracles for smart meter attestation verification.
- TLSNotary for proving TLS session data without revealing private keys.
- 3-of-5 multi-sig requirement for all data submissions.
Oracle node operators stake SGC as collateral. Dishonest behavior results in slashing. Honest behavior earns a share of protocol fees.
4.4 Smart Contracts
| Contract | Function |
|---|---|
EnergyToken | ERC-20 token representing 1 kWh of verified renewable energy. Mint/burn controlled by oracle-verified attestation. |
StakingVault | Manages SGC staking for oracle node operators. Handles slashing and reward distribution. |
GridBalancer | Automates distributed energy resource aggregation for utility partners. |
StorageRegistry | Tokenizes physical storage capacity as tradeable storage rights. |
CarbonCredit | On-chain verification and trading of renewable energy certificates (RECs). |
All contracts are upgradeable via timelock (48-hour delay) for the first 12 months, after which upgradeability is frozen.
4.5 Security
- Dual audits by Trail of Bits and CertiK before mainnet launch.
- Formal verification of critical invariants (mint/burn conservation, staking accounting).
- Bug bounty program with $500K maximum payout.
- Timelock on all contract upgrades (48 hours).
- Insurance fund funded by 3% of protocol fees, covering smart contract failures and validator slashing.
- No admin keys after 12-month transition period. All parameters governed by SGC holder vote.
4.6 Scalability
- L2 settlement (Arbitrum/Base) provides ~400ms finality and $0.001 transaction costs.
- Batch minting: multiple generation attestations aggregated into single L2 transaction.
- Off-chain indexing via The Graph for fast querying of energy flows and token balances.
- Target throughput: 10,000 ET transactions per second at global scale.