GuardianScope is a pioneering decentralized content moderation protocol powered by AI Agents and built on EigenLayer's AVS (Actively Validated Service) infrastructure. It enables automated, unbiased, and privacy-preserving content moderation for decentralized social platforms while ensuring transparency and security through blockchain technology.
- Distributed network of operators running AI Agents
- Transparent decision-making process
- Economic incentives through EigenLayer's restaking mechanism
- Immune to centralized control and censorship
- Multi-modal content analysis (text, images, videos)
- Real-time moderation capabilities
- Adaptable to platform-specific requirements
- Continuous model improvement through decentralized governance
- AVS smart contracts for coordination
- On-chain result verification
- Transparent reward distribution
- Governance mechanisms
- Implements ServiceManagerBase for signature aggregation
- Utilizes BLS signatures for efficient consensus
- Leverages restaking for economic security
- Slashing conditions for malicious behavior
- Modular design supporting multiple AI models
- NLP models for text content analysis
- Computer vision models for image/video moderation
- Encrypted inference capabilities
Welcome to the GuardianScope AVS. This project demonstrates a decentralized content moderation service built on EigenLayer. It provides automated, unbiased, and privacy-preserving content moderation for Web3 applications through AI-powered analysis.
+-------------------+ +-------------------+ +-------------------+
| | | | | |
| Content | | GuardianScope | | AI-Powered |
| Publisher |<----->| AVS Contract |<----->| Operators |
| | | | | |
+-------------------+ +-------------------+ +-------------------+
- Content publisher submits content for moderation through the GuardianScope contract.
- GuardianScope contract emits a
NewTaskCreatedevent for the moderation request. - All registered and staked Operators receive this request and process it through their AI models.
- Each Operator generates a moderation decision (approve/reject), hashes it with the content, and signs the hash.
- Operators submit their signed decisions back to the GuardianScope contract.
- The contract verifies operator eligibility and stake before accepting the submission.
This flow demonstrates how GuardianScope leverages EigenLayer's security and AI-powered operators for decentralized content moderation.
The following instructions explain how to deploy GuardianScope from scratch including EigenLayer and AVS specific contracts using Foundry to a local anvil chain, and start the AI-powered Operator application.
Install dependencies:
- Node
- Typescript
- ts-node
- tcs
- npm
- Foundry
- ethers
- Python 3.9+ (for AI models)
- PyTorch
On Nix platforms:
nix developIn terminal window #1:
# Install npm packages
npm install
# Start local anvil chain
npm run start:anvilIn terminal window #2:
# Setup .env files
cp .env.example .env
cp contracts/.env.example contracts/.env
# Build contracts
npm run build
# Deploy EigenLayer contracts
npm run deploy:core
# Deploy GuardianScope contracts
npm run deploy:guardianscope
# Start the AI-powered Operator
npm run start:operatorIn terminal window #3:
# Submit test content for moderation
npm run start:test-contentFor help and support deploying and modifying this repo:
- Open a ticket via support.eigenlayer.xyz
- Include environment details:
- For local testing: Include debug logs with
--revert-strings debug - For testnet: Provide transaction hashes and verified contracts
- For local testing: Include debug logs with
If you're planning to build on GuardianScope or integrate it into your platform, please fill out this form and we'll be in touch.
- This repo is currently intended for local development testing
- Testnet deployment support will be added soon
- Production deployments should migrate to BLS signature architecture
# Start anvil chain
anvil
# In another terminal
make deploy-eigenlayer-contracts
make deploy-guardianscope-contracts
make test-moderationThe operator application includes comprehensive tests for both the smart contracts and AI moderation components. Review the test/ directory for detailed test cases.