<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: VeritasLab</title>
    <description>The latest articles on DEV Community by VeritasLab (@runecipher137).</description>
    <link>https://dev.to/runecipher137</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3967197%2F6bec0139-3d1f-43a9-ab8a-731458006bfc.jpg</url>
      <title>DEV Community: VeritasLab</title>
      <link>https://dev.to/runecipher137</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/runecipher137"/>
    <language>en</language>
    <item>
      <title>Building a Solana Risk Engine: From Mock Data to Mainnet</title>
      <dc:creator>VeritasLab</dc:creator>
      <pubDate>Wed, 03 Jun 2026 23:14:27 +0000</pubDate>
      <link>https://dev.to/runecipher137/building-a-solana-risk-engine-from-mock-data-to-mainnet-3ao5</link>
      <guid>https://dev.to/runecipher137/building-a-solana-risk-engine-from-mock-data-to-mainnet-3ao5</guid>
      <description>&lt;p&gt;When I started building NexusVeritas, I made a mistake that many developers make.&lt;/p&gt;

&lt;p&gt;I spent far too much time on architecture, specifications, documentation, threat models, and future plans.&lt;/p&gt;

&lt;p&gt;The project looked impressive on paper.&lt;/p&gt;

&lt;p&gt;The codebase, however, barely existed.&lt;/p&gt;

&lt;p&gt;At some point I realized that documentation was no longer the bottleneck. The next milestone wasn't another design document—it was proving that the core engine could actually work.&lt;/p&gt;

&lt;p&gt;Lessons learned while building NexusVeritas, a Solana-first token risk intelligence platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Goal
&lt;/h2&gt;

&lt;p&gt;NexusVeritas is a Solana-first token risk intelligence platform.&lt;/p&gt;

&lt;p&gt;The idea is simple:&lt;/p&gt;

&lt;p&gt;Given a token address, return a deterministic risk score based on observable on-chain signals.&lt;/p&gt;

&lt;p&gt;No hype.&lt;/p&gt;

&lt;p&gt;No sentiment analysis.&lt;/p&gt;

&lt;p&gt;No AI-generated confidence scores.&lt;/p&gt;

&lt;p&gt;Just measurable facts.&lt;/p&gt;

&lt;p&gt;The API response looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MEDIUM"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"reasons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Mint authority enabled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Freeze authority enabled"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Version 0.1 — Mock Everything
&lt;/h2&gt;

&lt;p&gt;The first version was intentionally simple.&lt;/p&gt;

&lt;p&gt;The architecture consisted of:&lt;/p&gt;

&lt;p&gt;Token Address&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Mock Snapshot&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;Risk Engine&lt;/p&gt;

&lt;p&gt;↓&lt;/p&gt;

&lt;p&gt;REST API&lt;/p&gt;

&lt;p&gt;The risk engine already supported:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mint authority analysis&lt;/li&gt;
&lt;li&gt;Freeze authority analysis&lt;/li&gt;
&lt;li&gt;Holder concentration checks&lt;/li&gt;
&lt;li&gt;Risk classes (LOW → CRITICAL)&lt;/li&gt;
&lt;li&gt;Explainable reasons&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this stage the API worked, but every token was evaluated using mock data.&lt;/p&gt;

&lt;p&gt;Useful for testing.&lt;/p&gt;

&lt;p&gt;Useless for real users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 0.2 — Connecting to Solana Mainnet
&lt;/h2&gt;

&lt;p&gt;The first real milestone was integrating Solana RPC.&lt;/p&gt;

&lt;p&gt;I chose Helius because setup was straightforward and the developer experience was excellent.&lt;/p&gt;

&lt;p&gt;The goal was to fetch actual token metadata instead of simulated values.&lt;/p&gt;

&lt;p&gt;The adapter began collecting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mint authority status&lt;/li&gt;
&lt;li&gt;Freeze authority status&lt;/li&gt;
&lt;li&gt;Largest token holders&lt;/li&gt;
&lt;li&gt;Supply information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the first time, the engine was evaluating real tokens on Solana mainnet.&lt;/p&gt;

&lt;p&gt;That changed everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Holder Concentration Analysis
&lt;/h2&gt;

&lt;p&gt;One of the earliest useful signals was holder concentration.&lt;/p&gt;

&lt;p&gt;Using getTokenLargestAccounts, the engine calculates how much of the supply is controlled by the largest holders.&lt;/p&gt;

&lt;p&gt;Example results:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Token&lt;/th&gt;
&lt;th&gt;Top Holder Concentration&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;USDC&lt;/td&gt;
&lt;td&gt;~0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BONK&lt;/td&gt;
&lt;td&gt;~0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WIF&lt;/td&gt;
&lt;td&gt;~44%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PYTH&lt;/td&gt;
&lt;td&gt;~52%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New Pump.fun Tokens&lt;/td&gt;
&lt;td&gt;10–40%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This immediately revealed an important lesson.&lt;/p&gt;

&lt;p&gt;A high concentration isn't automatically malicious.&lt;/p&gt;

&lt;p&gt;Context matters.&lt;/p&gt;

&lt;p&gt;Some legitimate projects naturally have concentrated ownership during early growth stages.&lt;/p&gt;

&lt;p&gt;Because of this, I set the threshold conservatively.&lt;/p&gt;

&lt;p&gt;The goal is reducing false positives, not maximizing alerts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version 0.3 — Token Age Analysis
&lt;/h2&gt;

&lt;p&gt;The next feature seemed easy.&lt;/p&gt;

&lt;p&gt;Estimate token age.&lt;/p&gt;

&lt;p&gt;In reality, it exposed one of the first interesting engineering problems.&lt;/p&gt;

&lt;p&gt;The naive approach was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Query token signatures.&lt;/li&gt;
&lt;li&gt;Find the earliest transaction.&lt;/li&gt;
&lt;li&gt;Calculate age.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It worked perfectly for small tokens.&lt;/p&gt;

&lt;p&gt;Then I tested USDC.&lt;/p&gt;

&lt;p&gt;The result claimed that USDC was only a few minutes old.&lt;/p&gt;

&lt;p&gt;Clearly impossible.&lt;/p&gt;

&lt;p&gt;The reason was simple:&lt;/p&gt;

&lt;p&gt;Large tokens have enormous transaction histories.&lt;/p&gt;

&lt;p&gt;Even requesting hundreds or thousands of signatures doesn't reach the creation event.&lt;/p&gt;

&lt;p&gt;The solution wasn't perfect age detection.&lt;/p&gt;

&lt;p&gt;The solution was reliability detection.&lt;/p&gt;

&lt;p&gt;The engine now marks age calculations as either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reliable&lt;/li&gt;
&lt;li&gt;Unreliable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If confidence is low, age-based penalties are ignored.&lt;/p&gt;

&lt;p&gt;When uncertain, don't guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Hardening
&lt;/h2&gt;

&lt;p&gt;As soon as the API became public-facing, infrastructure concerns appeared.&lt;/p&gt;

&lt;p&gt;The focus shifted toward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input validation&lt;/li&gt;
&lt;li&gt;Fail-safe defaults&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;Rate limiting&lt;/li&gt;
&lt;li&gt;Confidence reporting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One principle guided every decision:&lt;/p&gt;

&lt;p&gt;Security tools should fail safely.&lt;/p&gt;

&lt;p&gt;If data quality is uncertain, the engine should communicate uncertainty instead of pretending to know the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Matters
&lt;/h2&gt;

&lt;p&gt;One lesson became obvious during development.&lt;/p&gt;

&lt;p&gt;The browser extension is not the product.&lt;/p&gt;

&lt;p&gt;The dashboard is not the product.&lt;/p&gt;

&lt;p&gt;Even the API is not the product.&lt;/p&gt;

&lt;p&gt;The product is the risk engine.&lt;/p&gt;

&lt;p&gt;Everything else is simply a way to access it.&lt;/p&gt;

&lt;p&gt;That realization helped prioritize development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Risk Engine&lt;/li&gt;
&lt;li&gt;Solana Adapter&lt;/li&gt;
&lt;li&gt;API&lt;/li&gt;
&lt;li&gt;Extension&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not the other way around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current State
&lt;/h2&gt;

&lt;p&gt;Today NexusVeritas includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Working Solana RPC integration&lt;/li&gt;
&lt;li&gt;Deterministic risk scoring&lt;/li&gt;
&lt;li&gt;Holder concentration analysis&lt;/li&gt;
&lt;li&gt;Token age analysis&lt;/li&gt;
&lt;li&gt;Confidence validation&lt;/li&gt;
&lt;li&gt;Public REST API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture is designed for future multichain expansion, but the current focus remains Solana.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;The next milestone is creator wallet analysis.&lt;/p&gt;

&lt;p&gt;Instead of focusing only on a token, the engine will evaluate the behavior of the wallet that created it.&lt;/p&gt;

&lt;p&gt;Questions like these become possible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has this wallet launched multiple tokens?&lt;/li&gt;
&lt;li&gt;Were previous launches abandoned?&lt;/li&gt;
&lt;li&gt;Is there a pattern of suspicious deployments?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That moves the system one step closer to behavioral security analysis rather than static token inspection.&lt;/p&gt;

&lt;p&gt;And that's where things start getting interesting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/cryptaveritas/nexusveritas-api" rel="noopener noreferrer"&gt;https://github.com/cryptaveritas/nexusveritas-api&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow development updates:&lt;br&gt;
&lt;a href="https://x.com/Runecipher137" rel="noopener noreferrer"&gt;https://x.com/Runecipher137&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>blockchain</category>
      <category>typescript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
