How SomniaGuard Works

A real-time on-chain intelligence system that detects and flags bot farms and Sybil attacks on Somnia Network quest rewards.

STEP 01

Quest Claim On-chain

A user calls claimQuest() on the QuestRegistry contract deployed on Somnia Testnet. The transaction emits a QuestClaimed event.

STEP 02

Reactivity Push

Somnia Reactivity detects the event and pushes it via WebSocket in real-time — no polling needed. Events arrive within milliseconds.

STEP 03

Risk Analysis

The heuristic engine scores each wallet on 4 factors: wallet age, claim velocity, rapid-claim bursts, and address cluster patterns.

STEP 04

Dashboard Alert

Results stream to the live dashboard via SSE. Wallets are tagged SAFE, SUSPICIOUS, or FLAGGED with detailed risk breakdowns.

Risk Scoring Engine

Wallets are scored 0-100. Scores ≥ 70 = FLAGGED, ≥ 40 = SUSPICIOUS.

New Wallet Detection

30 pts

Flags wallets less than 7 days old — common trait of bot-created accounts.

Low Activity Analysis

25 pts

Single-claim wallets with no history signal disposable bot accounts.

Rapid Claim Detection

40 pts

Detects 3+ claims within a 60-second window — automated scripting signature.

Address Cluster Matching

50 pts

Identifies wallets with sequential address suffixes (< 5 hex distance) — Sybil farm pattern.

Tech Stack

Somnia Network
L1 Blockchain
Somnia Reactivity SDK
Real-time event streaming
Solidity
Smart contracts
Next.js 14
Full-stack framework
viem
EVM client library
Server-Sent Events
Backend → Frontend stream

Ready to see it in action?

Launch the dashboard, simulate claims, and watch Sybil detection in real-time.

Launch Dashboard