An AI-powered subjective decision and fact-checking decentralized application (dApp) built on the GenLayer blockchain. This project demonstrates the power of Intelligent Contracts—smart contracts that can leverage Large Language Models (LLMs) to perform non-deterministic, subjective reasoning directly on-chain.
Traditional blockchains are limited to deterministic computation. GenLayer enables "Optimistic Democracy," where a network of AI-powered validators can reach consensus on subjective claims.
GenLayer AI Proof allows users to submit any factual or subjective claim. The network's AI validators then:
- Analyze the claim independently.
- Provide a verdict:
TRUE,FALSE, orUNDETERMINED. - Give detailed reasoning for their decision.
- Scale consensus via the Equivalence Principle to ensure security.
- Intelligent Verification: Submit claims to the blockchain for AI-backed consensus.
- Truth Ledger: A permanent, on-chain registry of verified claims and their analysis.
- Multi-Validator Consensus: Uses GenVM's
run_nondet_unsafefor robust AI decision-making. - Frosted Glass UI: A modern, glassmorphic interface built with React, Tailwind CSS, and Framer Motion.
- LLM Resilience: Handles non-deterministic LLM variance through intelligent result normalization.
- Blockchain: GenLayer (GenVM)
- Smart Contract: Python (GenVM execution environment)
- Frontend: React + TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion (motion/react)
- Icons: Lucide React
- Client Library:
genlayer-js
├── contracts/
│ └── FactChecker.py # GenLayer Intelligent Contract (Python)
├── src/
│ ├── App.tsx # Main React Application
│ ├── lib/
│ │ └── genlayer.ts # GenLayer client configuration
├── metadata.json # Applet metadata
└── README.md
- Node.js installed.
- Access to GenLayer Studio or a local GenLayer node.
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Deploy Contract:
- Open GenLayer Studio.
- Upload
/contracts/FactChecker.py. - Deploy the contract to your preferred network (e.g., Studionet).
- Copy the resulting Contract Address.
-
Configure App:
- Open the app in your browser.
- Paste the Contract Address into the input field in the header.
- Set the RPC Endpoint (defaults to GenLayer Studionet).
The FactChecker contract uses the gl.nondet.exec_prompt method to call an LLM. It defines a validator_fn that ensures the majority of validators agree on the factual verdict (TRUE/FALSE) rather than the exact wording of the reasoning, allowing for the natural variance of AI models while preserving the integrity of the result.
This project is licensed under the Apache-2.0 License.