- Try the Demo: đ Live Demo
- Get Testnet Sepolia ETH: Sepolia Faucet
- Swap for Base Sepolia ETH: Superbridge (only if you want to use Base)
- Connect your wallet to the DApp (Base Sepolia or Ethereum Sepolia)
- Submit a publication and/or register as a reviewer and let the agents do the rest!
Durable AI Agent Protocol for Scientific Integrity
A decentralized science (DeSci) protocol that replaces opaque, slow, and biased traditional peer review with stateful AI agents and on-chain game theory. Scientists stake collateral to submit research, autonomous agents screen for plagiarism, Chainlink VRF selects unbiased reviewers, and cryptographic consensus settles stakes â creating an immutable, economically enforced pipeline for scientific truth.
The clips below follow the publication lifecycle from submission through human-in-the-loop review, then a separate plagiarism scenario, reviewer staking, and finally how on-chain events trigger durable agent runs in Inngest.
Split view: BioVerify Telegram bot (left) and DApp (right).
The author completes the publication form (metadata and IPFS manifest) and prepares to submit.
The author confirms the on-chain transaction. The bot receives status notifications as the publication moves from SUBMITTED to IN REVIEW; the author lands back on the publications list.
Opening the publication detail page shows IN REVIEW and the Chainlink VRFâselected reviewers.
Same publication as above, now in the review phase.
The first peer reviewer submits a pass verdict and validates the submission.
The second peer reviewer submits a fail verdict. The two peer reviews now conflict.
Split view: Telegram bot (left) and senior reviewer (right). The bot shows both peer reviews and the agentâs decision to escalate to the senior reviewer. The senior reviewer opens the Reviewer Portal and prepares a tie-breaking pass.
After the senior review is submitted, Telegram reflects PUBLISHED; the detail page shows the final verdict from IPFS and PUBLISHED status.
Separate scenario: a submission that duplicates work already present in the scientific literature.
Dual device view: User A (mobile, no wallet) on /publications (left); User B (tablet, wallet on Base Sepolia) (right).
User B submits the publication on-chain.
User A sees the row appear in real time over WebSocket (no wallet required). User B opens the detail page, follows the live Validation Trail, and ends on EARLY SLASHED with the AI verdict loaded from IPFS.
A visitor who is not yet in the reviewer pool opens the Reviewer Portal, joins for the currently connected network (Base Sepolia or Ethereum Sepolia), pays the reviewer stake, and after the transaction the UI refreshes to show available stake (claimable or eligible for future VRF selection if above the minimum).
A reviewer already assigned to one cycle (locked stake equals reviewer stake) tops up so they can be picked again; the new available balance is shown.
With available stake > 0, the reviewer claims up to that amount (pull withdrawal).
Production Inngest runs driven by Alchemy Notify webhooks â Next.js API apps/fe/app/api/webhooks/alchemy/all-events/route.ts â CQRS processContractEvent.
Completed submission-agent run after a CHAIN_SUBMISSION_RECEIVED event (from SubmitPublication in events.ts lines 158â185):
Completed review-agent run after a CHAIN_PICKED_REVIEWERS_RECEIVED event (from Agent_PickReviewers in events.ts lines 205â229):
The reproducibility crisis is real: a 2016 Nature survey found that over 70% of researchers failed to reproduce another scientist's results. The root cause is a peer-review system with no accountability, no public audit trail, and no economic consequences for negligence.
Traditional peer review is a closed-door process. Reviewers face no consequences for approving fraudulent work or rejecting valid research. There is no on-chain record, no transparency, and no mechanism to reward diligence. The result: retractions, wasted funding, and eroded public trust in science.
BioVerify targets the peer-review accountability layer specifically â the part of the pipeline where economic staking, AI-assisted forensics, and transparent on-chain settlement can have the most immediate impact on research integrity.
- Stake and Submit â A scientist uploads their research manifest to IPFS (via Pinata) and submits it on-chain with a collateral stake and submission fee.
- AI Forensic Screening â The Submission Agent fetches the abstract from IPFS, runs a neural search against academic literature via Exa AI, and produces a structured LLM verdict (pass or fail). Plagiarism triggers immediate on-chain slashing.
-
VRF Reviewer Selection â If the submission passes, Chainlink VRF selects
$N$ peer reviewers from the staked pool using cryptographically verifiable randomness. The reviewer with the highest reputation is assigned as Senior Reviewer. - Human-in-the-Loop Peer Review â Selected reviewers submit EIP-712-signed verdicts through the frontend. Each review resumes the Review Agent's HITL interrupt. If peer verdicts conflict, the Senior Reviewer is called to break the tie.
- On-Chain Settlement â The agent partitions reviewers into honest (aligned with the final decision) and negligent (opposed), then settles on-chain: honest reviewers are rewarded, negligent reviewers are slashed, and the publisher's stake is returned or forfeited.
How the monorepo packages connect to each other and to external services.
graph TD
FE["apps/fe â Next.js Frontend"]
BC["EVM Chains (Base Sepolia, Eth Sepolia)"]
Alchemy["Alchemy Notify"]
CQRS["@packages/cqrs"]
DB["@packages/db â Neon Postgres"]
Inngest["Inngest"]
Agents["@packages/agents â LangGraph"]
IPFS["IPFS (Pinata)"]
VRF["Chainlink VRF"]
EXA["Exa AI"]
FE -- "wagmi writeContract" --> BC
BC -- "emits events" --> Alchemy
Alchemy -- "POST webhook" --> FE
FE -- "processContractEvent" --> CQRS
BC -- "WSS (NewPublicationStatus)" --> FE
CQRS -- "upserts / queries" --> DB
CQRS -- "viem contract calls" --> BC
FE -- "serves Inngest functions" --> Inngest
Inngest -- "step.run" --> Agents
Agents -- "CQRS commands" --> CQRS
Agents -- "fetch manifest" --> IPFS
Agents -- "neural search" --> EXA
FE -- "pin manifest" --> IPFS
BC -- "requestRandomWords" --> VRF
VRF -- "fulfillRandomWords" --> BC
The contract uses a getter-less design: all state mutations emit events. These are projected off-chain into a Postgres read model, which powers all frontend queries. No on-chain reads required. In parallel, the frontend subscribes to NewPublicationStatus events via standalone viem WebSocket clients (Alchemy WSS), independent of wallet connection state, debouncing cache invalidations so the publications list, global stats strip, and related TanStack Query caches stay in sync without polling the table.
graph LR
BC["BioVerifyV3 (events)"] --> AN["Alchemy Notify"]
AN --> WH["Webhook API (HMAC verified)"]
WH --> CQRS["processContractEvent"]
CQRS --> DB["Neon Postgres (OCC)"]
DB --> FE["Frontend Queries (Drizzle)"]
CQRS -.-> INN["Inngest (agent triggers)"]
Logic state and execution durability are separated to handle the asynchronous nature of human review:
- LangGraph manages the agent lifecycle using checkpointers. This allows the workflow to pause for days during peer review and resume exactly where it left off.
- Inngest provides the durable execution layer â automatic retries for on-chain commands, wait-for-event logic, and fan-out orchestration.
graph TD
subgraph triggers [Event Triggers]
E1["SubmitPublication event"]
E2["Agent_PickReviewers event"]
end
subgraph submission [Submission Agent]
S1["fetchIpfsNode â resolve manifest"]
S2["discoveryNode â Exa AI neural search"]
S3["llmNode â plagiarism verdict"]
S1 --> S2 --> S3
end
subgraph review [Review Agent]
R1["humanReviewsNode â HITL loop"]
R2["llmVerdictNode â consensus check"]
R3["seniorReviewNode â escalation HITL"]
R4["llmFinalVerdictNode â enforce decision"]
R5["settlementNode â on-chain settle"]
R1 --> R2
R2 -->|"pass / fail"| R4
R2 -->|escalate| R3 --> R4
R4 --> R5
end
E1 --> |Inngest| submission
S3 -->|pass| pickReviewers["pickReviewersCommand"]
S3 -->|fail| earlySlash["earlySlashPublicationCommand"]
E2 --> |Inngest| review
R5 --> settle["publishPublication / slashPublication"]
pickReviewers --> BC["BioVerifyV3"]
earlySlash --> BC
settle --> BC
The PublicationStatus state machine on-chain.
stateDiagram-v2
[*] --> SUBMITTED : submitPublication()
SUBMITTED --> EARLY_SLASHED : AI detects plagiarism
SUBMITTED --> IN_REVIEW : AI passes, VRF selects reviewers
IN_REVIEW --> PUBLISHED : peer review consensus (pass)
IN_REVIEW --> SLASHED : peer review consensus (fail)
EARLY_SLASHED --> [*]
PUBLISHED --> [*]
SLASHED --> [*]
For detailed end-to-end sequence diagrams with every interaction, see docs/architecture.md.
pnpm workspaces with two apps and seven packages.
apps/
contracts/ BioVerifyV3 Solidity contract (Foundry) â staking, VRF, settlement
fe/ Next.js 16 frontend â DApp UI, webhook API, Inngest serving, WSS event subscriptions
packages/
agents/ LangGraph AI agents (submission + review)
cqrs/ Event projector, DB queries, on-chain action commands
db/ Drizzle ORM client (Neon Postgres)
env/ Type-safe environment variable access (Zod)
notifications/ Telegram notification helpers
schema/ Zod schemas, DB table definitions, domain types, Inngest event types
utils/ Contract config, ABI, network mappings, EIP-712 type definitions
utils-server/ Server-only utilities
| Layer | Technologies |
|---|---|
| Smart Contracts | Solidity, Foundry, OpenZeppelin, Chainlink VRF V2.5 |
| Frontend | Next.js 16 (App Router, RSC), React 19, TypeScript, Tailwind CSS v4, shadcn/ui |
| Web3 | wagmi v3, viem, Reown AppKit (WalletConnect), EIP-712 typed data signing |
| AI Agents | LangGraph.js, Gemini (structured output), Exa AI (neural search) |
| Data | Drizzle ORM, Neon Postgres (serverless), TanStack Query v5, nuqs (URL state) |
| Storage | IPFS via Pinata (publication manifests, verdict pinning) |
| Infrastructure | Inngest (durable execution), Alchemy Notify (webhooks), Vercel Functions |
| Quality | Biome (lint + format), Foundry tests (100% branch coverage) |
- Node.js 20+
- pnpm 10+
- Foundry (for contract development)
git clone https://github.com/SiegfriedBz/BioVerify_Agentic_DApp.git
cd BioVerify_Agentic_DApp
pnpm install
cp .env.example .env # fill in your keys (see packages/env for validation)All scripts run from the monorepo root.
Frontend
pnpm fe:dev # start Next.js dev server
pnpm fe:build # production build
pnpm fe:start # start production serverContracts
pnpm contract:compile # forge compile
pnpm contract:test # forge test
pnpm contract:cov # forge coverage
pnpm contract:deploy:base # deploy to Base Sepolia + sync config
pnpm contract:deploy:sepolia # deploy to Ethereum Sepolia + sync config
pnpm contract:sync-config # regenerate TS config from Foundry artifactsDatabase
pnpm db:push # push Drizzle schema to Neon
pnpm db:seed # seed protocol config rows
pnpm db:setup-agents # initialize LangGraph checkpointer tablesInfrastructure
pnpm inngest:dev # local Inngest dev server
pnpm inngest:sync # sync Inngest functions to cloudQuality
pnpm lint:check # Biome lint
pnpm lint:format # Biome format| Network | Contract Address |
|---|---|
| Base Sepolia | 0x76654c2cdadcf869e78928f0785797b6be20f11b |
| Ethereum Sepolia | 0x7d52170db31be4ab3d0166fbba937a031dc6e1ff |
- Automated Slashing â The AI agent slashes stakes immediately when plagiarism is detected, prioritizing protocol efficiency over manual appeals.
- Senior Reviewer Tie-Break â When peer reviewers disagree, the highest-reputation reviewer is escalated via a second HITL interrupt to cast the deciding verdict, rather than requiring a full quorum re-vote.
- Getter-Less Contract â BioVerifyV3 emits events for every state mutation and exposes no view functions. All reads are served from the off-chain Postgres projection, keeping gas costs minimal and the contract surface small.
Weighted Majority Voting â Replace the Senior Reviewer tie-breaker with a decentralized consensus mechanism where reviewer votes are weighted by on-chain reputation score.
Reputation via ZK-Proofs (Reclaim Protocol) â Reviewer reputation is currently bootstrapped from on-chain history alone. Integration with Reclaim Protocol would allow scientists to import real-world credentials (h-index, citation count, institutional affiliation) via zero-knowledge proofs, solving the cold-start problem.
Paid Content Access (x402) â Integration of the x402 protocol to gate publication content behind micropayments. Non-publishers and non-reviewers would pay to access full research data (datasets, methodology, supplementary materials) through x402's HTTP 402-based payment flow, creating a sustainable revenue stream for honest publishers.
Encrypted Access Control (Lit Protocol) â Publication data on IPFS would be encrypted using Lit Protocol. Decryption keys are only released when on-chain conditions are met â "has paid via x402", "is an assigned reviewer", or "is the publisher" â combining payment verification with decentralized key management and removing the need for a centralized access server.
Together, these roadmap items would extend BioVerify from a pure integrity protocol into a full research marketplace: stake-to-publish, pay-to-read, earn-to-review.
MIT â Siegfried Bozza, 2026
Built solo (in parallel with a full-time professional software engineering role) by Siegfried Bozza: Full-stack development, smart contract, and deployment.
Full-Stack Developer React/Next.js & Web3













