Inspiration
As renewable energy adoption grows, peer-to-peer energy trading and microgrids offer an opportunity to make energy systems more efficient and decentralized. However, a critical challenge remains: how can we trust the energy being offered for trade?
A producer may claim to have generated a certain amount of renewable energy, but the claim might not match the available meter readings, facility capacity, or certificate records. Even when a trade is successfully matched, the buyer and seller still need a reliable way to establish delivery and settle their obligations fairly.
We wanted to bring together AI, blockchain, and energy-market coordination to address these challenges. That idea led to Tranergy AI: a platform that connects renewable-energy evidence to trading decisions and accountable settlement.
What it does
Tranergy AI provides an integrated workflow for renewable-energy verification, surplus estimation, peer-to-peer trading, and blockchain-based settlement.
AI-assisted energy verification: Meter readings are checked using deterministic validation rules and an Isolation Forest anomaly-detection model. The system checks data quality, meter continuity, facility capacity, energy balance, and certificate status through a registry adapter.
Human-in-the-loop review: Suspicious claims are sent to a review queue with their validation results, anomaly scores, and reason codes. AI provides an additional signal; it does not independently declare fraud or override the verification rules.
Surplus estimation: The platform calculates estimated surplus, offerable energy, reserved quantities, and safety buffers separately. Only eligible claims verified for the prototype can back energy offers.
Peer-to-peer energy trading: Producers publish offers and consumers submit requests. An explainable matching engine considers delivery intervals, available quantities, and price limits while reserving quantities to prevent double allocation.
Mutual-stake escrow: Once a trade is matched, the consumer's payment and collateral, together with the producer's collateral, are locked through a smart contract before delivery.
Evidence-based settlement: After the delivery interval, evidence is checked against the agreed quantity, hashed using SHA-256, and attested by an authorized verifier. Smart-contract rules handle full delivery, partial delivery, producer default, collateral returns, and refunds.
Auditable trade records: Settlement outcomes, evidence hashes, transaction identifiers, and prototype reward events link the trading workflow to blockchain records.
Our core idea is simple: a renewable-energy claim should not automatically become a tradeable asset, and a matched trade should not automatically be treated as delivered.
How we built it
We built Tranergy AI as a modular application combining a web dashboard, backend API, machine-learning service, relational database, and Solidity smart contracts.
- Frontend: Next.js, TypeScript, Tailwind CSS, and Recharts provide the dashboard for facilities, energy data, verification, marketplace activity, and trade receipts.
- Backend: Node.js, Express, TypeScript, Prisma, and PostgreSQL handle API requests, application data, verification workflows, and transactional energy reservations.
- AI/ML: Python, FastAPI, and scikit-learn power an Isolation Forest service that identifies unusual meter-data patterns.
- Blockchain: Solidity smart contracts, Foundry, OpenZeppelin, and ethers.js implement trade management, mutual-stake escrow, settlement rules, and reward-token functionality.
- Development environment: Anvil provides a local EVM chain for contract deployment and testing.
The application separates off-chain processing from on-chain settlement. Meter data, verification rules, and ML analysis are handled off-chain, while the smart contracts manage escrow state and settlement outcomes. Evidence hashes connect delivery records to the on-chain trade lifecycle.
For this prototype, meter readings can be imported from CSV or generated for demonstrations, and certificate checks use a mock registry adapter. Blockchain transactions run against the local Anvil environment.
Challenges we ran into
One of our biggest challenges was designing a workflow in which several different forms of evidence could influence whether energy was eligible for trading.
We needed to distinguish measured exports from estimated surplus, account for reserved quantities and safety buffers, and prevent suspicious claims from entering the marketplace automatically.
Another challenge was making AI and deterministic validation work together without treating an anomaly score as proof of wrongdoing. We addressed this through explicit verification states, reason codes, and human review.
We also had to think carefully about blockchain state transitions and escrow accounting. Both parties need clear funding obligations, and every settlement outcome must handle payments, refunds, and collateral consistently. A trade being matched also cannot be treated as proof that physical delivery occurred.
Accomplishments that we're proud of
We are proud to have connected renewable-energy verification, energy allocation, trading, and settlement into one coherent workflow rather than building isolated features.
Our key accomplishments include:
- Combining deterministic energy-validation rules with ML-based anomaly detection and human review.
- Making surplus estimation and offer eligibility explicit instead of treating every generation claim as available energy.
- Implementing explainable peer-to-peer matching with transactional reservations.
- Designing mutual-stake escrow that gives both producer and consumer financial commitments within the prototype.
- Connecting delivery-evidence checks and verifier attestation to smart-contract settlement.
- Building a modular architecture in which the frontend, backend, ML service, database, and blockchain components have distinct responsibilities.
Most importantly, Tranergy AI demonstrates how verification, trading, and settlement can be connected into a single accountable process.
What we learned
We learned that putting information on a blockchain does not automatically make the original information true. Reliable energy trading needs validation before a claim becomes eligible, and an auditable record of a claim is not the same as independently verified physical delivery.
We also learned that ML anomaly detection is most useful when it supports an understandable review process instead of making unexplained decisions. Deterministic checks, model outputs, and human verification each play different roles.
Finally, building mutual-stake escrow taught us to treat smart-contract state transitions, authorization, refunds, and collateral accounting as core parts of the product—not as features that can be added after the trading logic.
What's next for Tranergy AI
Our next steps are to move beyond the prototype environment and make Tranergy AI suitable for real-world evaluation.
We plan to explore integrations with real meter-data sources and renewable-energy certificate registries, deploy and test the smart contracts on an appropriate test network, and strengthen our delivery-evidence and verifier workflows.
We also want to evaluate the anomaly-detection model against more diverse real-world datasets, improve energy forecasting and microgrid coordination, and investigate more robust mechanisms for verifying meter identities and delivery information.
Our long-term vision is to make renewable-energy trading more trustworthy and accessible by linking verifiable evidence, intelligent allocation, and accountable settlement—helping communities and energy producers coordinate their resources with greater confidence.
Built With
- ai
- blockchain
- ethers.js
- express.js
- fastapi
- foundry
- machine-learning
- next.js
- node.js
- scikit-learn
- solidity
- supabase
- tailwind-css
- typescript
- web3
Log in or sign up for Devpost to join the conversation.