Skip to content
Veritas Security Oracle

Veritas Security Oracle

Making Chainlink meet AI

Created on 29th June 2025

•

Veritas Security Oracle

Veritas Security Oracle

Making Chainlink meet AI

The problem Veritas Security Oracle solves

In today's on-chain economy, identifying smart contract security risks is only half the battle. Investors, traders, and even protocols themselves struggle to quickly assess the economic viability and financial risks embedded within complex DeFi contracts. Traditional security audits focus on code-level vulnerabilities but often miss flawed economic models, oracle manipulation vectors, or designs that could lead to protocol insolvency under specific market conditions.
Veritas solves this by acting as an Onchain Financial Intelligence Platform.
It makes existing tasks easier, faster, and safer in several ways:

  • Automated Financial Due Diligence: Instead of spending days or weeks manually analyzing a contract's economic incentives, Veritas delivers a comprehensive AI-driven financial report in seconds. It identifies the protocol type (e.g., DEX, Lending), breaks down its value-flow and fee structures, and assesses its overall financial health.

  • Proactive Economic Risk Identification: Veritas goes beyond standard security analysis to pinpoint crucial financial risks, categorized by severity:

    1. Critical: Identifies flaws that could lead to a rapid loss of user funds or protocol insolvency, such as faulty liquidation logic or oracle exploits.
    2. High/Medium: Uncovers risks like impermanent loss exposure, potential for bank runs, or governance attack vectors that could destabilize the protocol.
    3. Low: Highlights minor inefficiencies or suggestions for improving economic robustness.
  • Democratizing On-chain Alpha: By analyzing contract mechanics, the platform surfaces potential strategies (e.g., arbitrage, liquidity provision) and their associated risks, making sophisticated financial analysis accessible to a much broader audience.

The entire system is powered by Chainlink. Chainlink Price Feeds provide the live, reliable market data that grounds the platform's dashboard. More importantly, the core analysis is architected around Chainlink Functions, which serve as the critical bridge to trigger off-chain AI computation in response to an on-chain request.

Challenges I ran into

A significant hurdle I encountered was ensuring reliable, multi-chain data fetching for the live dashboard. While data from Ethereum Mainnet was stable, the application would intermittently fail when fetching block numbers, gas prices, and even Chainlink Price Feed data from L2 networks like Arbitrum and Optimism. The error was a cryptic NETWORK_ERROR: network is not available yet from the ethers.js library.

I discovered the issue was a subtle race condition. By default, ethers.js tries to auto-detect the network when a provider is initialized. On L2s, this auto-detection process would sometimes not complete before my application's first data request was sent, causing the provider to report that the network wasn't "ready."
I overcame this by making the provider initialization process more explicit and robust. Instead of relying on auto-detection

Tracks Applied (2)

Onchain Finance

We use Chainlink as the core infrastructure to solve a critical problem in DeFi: assessing the economic and financial in...Read More

Cross-Chain Solutions

This project is a powerful example of a Cross-Chain Onchain Finance solution, built fundamentally around Chainlink CCIP ...Read More

Discussion

Builders also viewed

See more projects on Devfolio