BioVerify
DeSci Protocol — Durable AI Agents for Scientific Integrity


Overview
BioVerify is 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 via Exa AI neural search and Gemini structured output, Chainlink VRF selects unbiased reviewers, and cryptographic consensus settles stakes — creating an immutable, economically enforced pipeline for scientific truth. The contract uses a getter-less, event-sourced design: all state mutations emit events projected off-chain into a Neon Postgres read model via Alchemy Notify webhooks, powering all frontend queries with zero on-chain reads.
Key features
- Stake & Submit: Scientists upload research manifests to IPFS (Pinata) and submit on-chain with a collateral stake and submission fee.
- AI Forensic Screening: A LangGraph Submission Agent fetches the abstract from IPFS, runs a neural search against academic literature via Exa AI, and produces a structured Gemini LLM verdict. Plagiarism triggers immediate on-chain slashing.
- VRF Reviewer Selection: If the submission passes AI screening, Chainlink VRF selects N peer reviewers from the staked pool using cryptographically verifiable randomness. The highest-reputation reviewer 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 LangGraph Review Agent's HITL interrupt. Conflicting verdicts escalate to the Senior Reviewer for a tie-break.
- 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.
- Event-Driven CQRS Architecture: Getter-less contract design — all state mutations emit events, projected off-chain via Alchemy Notify webhooks into a Neon Postgres read model (Drizzle ORM) with optimistic concurrency control.
- Durable Agent Orchestration: Inngest provides durable execution (automatic retries, wait-for-event, fan-out) while LangGraph manages agent lifecycle with checkpointers, enabling workflows to pause for days during peer review and resume exactly where they left off.
Technologies Used
- Solidity + Foundry + Chainlink VRF: BioVerifyV3 smart contract with staking, slashing, VRF-based reviewer selection, and on-chain settlement. 100% branch coverage.
- Next.js + wagmi + Reown AppKit: DApp frontend with wallet integration, EIP-712 typed data signing, and real-time event-driven UI.
- LangGraph.js + Gemini + Exa AI: Stateful AI agents for submission forensics (plagiarism detection via neural search) and review orchestration with HITL interrupts.
- Inngest: Durable execution layer — automatic retries for on-chain commands, wait-for-event logic, and fan-out orchestration.
- Drizzle ORM + Neon Postgres: Event-sourced CQRS read model with optimistic concurrency control, powering all frontend queries.
- Alchemy Notify: HMAC-verified webhooks projecting contract events into the off-chain read model in real time.
Challenges and Learnings
Key challenges included orchestrating durable AI agents across asynchronous human review cycles — LangGraph checkpointers allow the workflow to pause for days and resume at the exact HITL interrupt. Designing the getter-less, event-sourced contract required careful coordination between on-chain event emissions and off-chain Postgres projections via Alchemy Notify webhooks. Coordinating Inngest's durable execution layer with LangGraph's agent lifecycle demanded precise separation of logic state (LangGraph) from execution durability (Inngest retries, wait-for-event, fan-out).
Outcome
BioVerify delivers a full DeSci pipeline deployed on Base Sepolia and Ethereum Sepolia — from stake-and-submit through AI forensic screening, VRF reviewer selection, human-in-the-loop peer review, to on-chain settlement with economic enforcement. The project demonstrates end-to-end integration of stateful AI agents, durable execution, and smart contract game theory for scientific integrity.














