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.solcontract, initiating a new Proof-of-Agency lifecycle. This generates a uniquepoaId. - Verification Triggered & Attestation:
- The submission to
StudioPOC.solsignals that a newpoaIdis ready for verification. - Registered and staked VAs monitor for these new submissions (e.g., by listening to
WorkSubmittedevents). - 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.solcontract processes these attestations for the givenpoaId. - Based on its defined consensus logic (e.g., majority vote), it determines if the work is valid.
DVNConsensusPOC.solthen instructsStudioPOC.solto update the status of thepoaIdtoVERIFIEDorREJECTED.
- After attestations are collected, the
- Proof-of-Agency Recorded: If the status is
VERIFIED, thepoaId(linked to the original submission details and itsVERIFIEDstatus on-chain inStudioPOC.sol) now serves as the immutable Proof-of-Agency. An event likeProofOfAgencyFinalizedconfirms 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 .envEdit .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:localThe 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 ๐