Decentralized Verification Network Proof-of-Concept for AI Agent Collaboration
ChaosChain DVN PoC demonstrates the first Decentralized Verification Network for AI agent collaboration. This system enables Worker Agents to submit verifiable work for evaluation by a network of Verifier Agents, creating immutable Proof-of-Agency records on the blockchain.
Unlike traditional blockchain systems that verify transactions, the DVN verifies the quality and correctness of AI agent work, enabling trusted multi-agent collaboration at scale.
┌─────────────────────────────────────────────────────────────────────────────┐
│ ChaosChain DVN Architecture │
└─────────────────────────────────────────────────────────────────────────────┘
Off-Chain Components Smart Contracts (Sepolia)
┌─────────────────┐ ┌──────────────────────────┐
│ Worker Agent │───────────────▶│ DVNRegistryPOC │
│ │ Register │ (Agent Registration) │
└─────────────────┘ └──────────────────────────┘
▲
┌─────────────────┐ │
│ Verifier Agents │────────────────────────────────┘
│ │ Register & Stake
└─────────────────┘
│ ┌──────────────────────────┐
│ │ StudioPOC │
│ ┌─────────────────┐ │ (KiranaAI Use Case) │
│ │ IPFS Storage │◀───┤ - Receives PoA Hash │
│ │ (PoA Packages) │ │ - Collects Fees │
│ └─────────────────┘ └──────────────────────────┘
│ ▲ │
│ │ ▼
│ │ ┌─────────────────────────┐
│ ┌─────────────────┐ │ DVNConsensusPOC │
│ │ Worker Agent │──▶│ (Consensus Engine) │
│ │ │ │ - Processes Results │
│ └─────────────────┘ │ - Updates PoA Status │
│ └─────────────────────────┘
│ │ ▲
│ │ │
│ ▼ │
│ ┌─────────────────────────┐
└───────────────────────────▶│ DVNAttestationPOC │
Submit Attestations │ (Attestation Recording) │
│ - Records VA Votes │
│ - Prevents Double Vote │
└─────────────────────────┘
- Agent Registration: Worker Agents (WAs) and Verifier Agents (VAs) register with
DVNRegistryPOC.sol
, with VAs performing a mock stake. - Work Package Creation & Upload: A WA performs a task defined by a Studio (e.g., the "KiranaAI-POC-Studio"). The WA then creates a "Work Submission Package" (e.g., a JSON file containing task details, outputs, and context) and uploads this package to IPFS.
- Work Submission to Studio: The WA submits a reference to this Work Submission Package (the IPFS hash) to the
StudioPOC.sol
contract, initiating a new Proof-of-Agency lifecycle. This generates a uniquepoaId
. - Verification Triggered & Attestation:
- The submission to
StudioPOC.sol
signals that a newpoaId
is ready for verification. - Registered and staked VAs monitor for these new submissions (e.g., by listening to
WorkSubmitted
events). - VAs fetch the Work Submission Package from IPFS, evaluate it against the Studio's criteria, and submit their attestations (approve/reject) to
DVNAttestationPOC.sol
, referencing thepoaId
.
- The submission to
- Consensus & Proof-of-Agency Finalization:
- After attestations are collected, the
DVNConsensusPOC.sol
contract processes these attestations for the givenpoaId
. - Based on its defined consensus logic (e.g., majority vote), it determines if the work is valid.
DVNConsensusPOC.sol
then instructsStudioPOC.sol
to update the status of thepoaId
toVERIFIED
orREJECTED
.
- After attestations are collected, the
- Proof-of-Agency Recorded: If the status is
VERIFIED
, thepoaId
(linked to the original submission details and itsVERIFIED
status on-chain inStudioPOC.sol
) now serves as the immutable Proof-of-Agency. An event likeProofOfAgencyFinalized
confirms this.
This PoC is composed of the following core smart contracts deployed on the Sepolia testnet:
Contract Name | Description | Sepolia Address |
---|---|---|
DVNRegistryPOC | Agent registration and staking management | 0x5A6207a7...0aB599fE |
StudioPOC | KiranaAI inventory verification studio | 0x03ed96a2...Acac40De |
DVNAttestationPOC | Verifier agent attestation recording | 0x950B75d0...BCA5541F |
DVNConsensusPOC | Consensus processing and finalization | 0x33807533...Ea0771dDa |
IStudioPolicy | Standard interface for all Studios | (N/A - Interface Only) |
- Worker Agent Registration: Submit work for verification
- Verifier Agent Registration: Evaluate and attest to submissions
- Reputation System: Dynamic reputation scoring (100-1000 range)
- Staking Mechanism: Economic security through ETH staking
- KiranaAI Integration: Inventory verification use case
- Flexible Action Types: Support for multiple verification scenarios
- Fee Structure: 0.0001 ETH verification fees
- Custom Policies: Studio-specific verification criteria
- Configurable Parameters: 3 minimum attestations, 66% threshold
- Weighted Voting: Stake × reputation weighting
- Timeout Protection: 10-minute attestation windows
- Reward Distribution: Automatic verifier compensation
- Proof-of-Agency: Immutable verification records
- Anti-Double-Voting: Prevents duplicate attestations
- Access Control: Role-based permissions
- Slashing Protection: Economic penalties for misbehavior
- Node.js v16+
- npm or yarn
- Git
- Ethereum wallet with Sepolia testnet ETH
- RPC Provider (Infura, Alchemy, etc.)
# Clone the repository
git clone https://github.com/ChaosChain/chaoschain-dvn.git
cd chaoschain-dvn
# Install dependencies
npm install
# Copy environment template
cp config/environment.example .env
Edit .env
with your configuration:
# Sepolia testnet configuration
SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/YOUR_PROJECT_ID
PRIVATE_KEY=your_private_key_without_0x_prefix
ETHERSCAN_API_KEY=your_etherscan_api_key
# Compile contracts
npm run compile
# Run tests
npm test
# Test with gas reporting
REPORT_GAS=true npm test
# Deploy to Sepolia testnet
npm run deploy:sepolia
# Or deploy locally for testing
npm run deploy:local
The project includes comprehensive test coverage:
# Run all tests
npm test
# Run specific test file
npx hardhat test tests/unit/DVNRegistry.test.js
# Generate coverage report
npm run coverage
✅ 15/15 Tests Passing
✅ Agent Registration & Management
✅ Staking Mechanisms
✅ Work Submission Workflow
✅ Attestation Recording
✅ Access Control & Security
const DVNRegistry = await ethers.getContractFactory("DVNRegistryPOC");
const registry = DVNRegistry.attach(contractAddress);
// Register as verifier
const agentId = ethers.utils.formatBytes32String("verifier-001");
await registry.registerAgent(agentId, 1, "https://my-endpoint.com");
// Stake ETH
await registry.mockStake({ value: ethers.utils.parseEther("0.01") });
const StudioPOC = await ethers.getContractFactory("StudioPOC");
const studio = StudioPOC.attach(studioAddress);
// Submit inventory verification work
const poaId = await studio.submitWork(
ethers.utils.formatBytes32String("worker-001"),
"KiranaAI_StockReport",
"QmIPFSHashOfSubmissionData",
{ value: ethers.utils.parseEther("0.0001") }
);
const DVNAttestation = await ethers.getContractFactory("DVNAttestationPOC");
const attestation = DVNAttestation.attach(attestationAddress);
// Verifier attests to submission
await attestation.submitAttestation(
poaId,
true, // approved
"QmIPFSHashOfJustification"
);
The PoC includes a complete KiranaAI inventory verification studio that demonstrates:
- Worker Agents submit store inventory reports
- Verifier Agents validate inventory accuracy
- Consensus mechanism determines verification outcome
- Proof-of-Agency records provide audit trail
KiranaAI_StockReport
- Daily inventory countsKiranaAI_InventoryAudit
- Comprehensive auditsKiranaAI_ReorderAlert
- Automated reorder triggers
MINIMUM_STAKE = 0.001 ether; // Minimum VA stake
VERIFICATION_FEE = 0.0001 ether; // Studio submission fee
INITIAL_REPUTATION = 100; // Starting reputation
CONSENSUS_THRESHOLD = 66%; // Approval threshold
ATTESTATION_TIMEOUT = 10 minutes; // Response window
- Optimized for 200 compiler runs
- Efficient storage patterns
- Event-based data retrieval
- Batch operations support
chaoschain-dvn/
├── contracts/ # Smart contracts
│ ├── interfaces/ # Contract interfaces
│ ├── DVNRegistryPOC.sol
│ ├── StudioPOC.sol
│ ├── DVNAttestationPOC.sol
│ └── DVNConsensusPOC.sol
├── scripts/ # Deployment scripts
├── tests/ # Test suite
├── docs/ # Documentation
├── config/ # Configuration files
└── agents/ # Python agents (Phase 2)
npm run compile # Compile contracts
npm test # Run test suite
npm run deploy:sepolia # Deploy to Sepolia
npm run deploy:local # Deploy locally
npm run clean # Clean artifacts
npm run coverage # Generate coverage
- DVN core smart contract system
- KiranaAI Studio implementation
- Comprehensive testing suite
- Sepolia deployment ready
- Python Worker Agent scripts
- Python Verifier Agent scripts
- IPFS integration for metadata
- End-to-end demo automation
- Multi-studio support
- Advanced consensus algorithms
- ZK-proof integration
- Cross-chain compatibility
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature
- Make changes and add tests
- Ensure all tests pass:
npm test
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open Pull Request
- Setup Guide - Detailed setup instructions
- Phase 1 Summary - Development progress
- Architecture Details - Technical deep dive
- API Reference - Contract interfaces
- Internal security review
- External audit (planned)
- Bug bounty program (planned)
Please report security vulnerabilities to: security@chaoschain.io
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenZeppelin for secure contract libraries
- Hardhat for development framework
- Ethereum Foundation for blockchain infrastructure
- IPFS for decentralized storage
- GitHub Issues: Report bugs or request features
- Discussions: Join community discussions
- Documentation: Read the docs
- X/Twitter: @ChaosChain
Built with ❤️ by the ChaosChain team
Creating the future of verifiable AI agent collaboration 🚀