HashKey Chain Testnet

The AI-Powered Risk & Compliance Layer for HashKey Chain

4-layer AI scoring pipeline. On-chain enforcement. Any DeFi protocol integrates in 2 lines of Solidity.

Features

Everything you need to enforce compliance

AI-powered risk scoring, on-chain enforcement, and composable integration — all built natively for HashKey Chain.

Wallet Risk Scoring

4-layer AI pipeline scores every wallet 1-10. Attribution, sanctions, graph analysis, and AI behavioral enhancement.

Sanctions Screening

Real-time OFAC SDN screening. Sanctioned addresses are instantly flagged as CRITICAL (score 10) and blocked.

Payment Risk Assessment

End-to-end A-to-B payment risk checks. Both sender and receiver scored. Returns block, flag, or allow recommendation.

On-Chain Enforcement

AegisGuard modifier blocks non-compliant wallets automatically. No off-chain middleware. Pure on-chain enforcement.

Graph Proximity Analysis

Hop distance methodology traces connections to known malicious actors. 1 hop = HIGH risk, 4+ hops = LOW risk.

Composable by Design

2 lines of Solidity to integrate. Inherit AegisGuard, add onlyCompliant modifier. Works with any DeFi protocol.

How It Works

From wallet to enforcement in 3 steps

01

AI Scores Every Wallet

4-layer pipeline: Attribution override, OFAC sanctions screening, graph proximity analysis, and Groq AI behavioral enhancement.

02

Score Written On-Chain

Risk score (1-10), flags, reasoning, and hop distance are written to AegisRiskScore.sol on HashKey Chain. Cached in Neon DB.

03

Enforcement Is Automatic

DeFi protocols inherit AegisGuard. The onlyCompliant modifier blocks non-compliant wallets. No custom logic needed.

Scoring Pipeline

4 layers of AI-powered risk analysis

Each wallet passes through 4 sequential layers. Early layers can short-circuit — sanctioned wallets never reach the AI layer.

L1

Attribution

Known clean addresses are instantly whitelisted with score 1. Prevents false positives on verified infrastructure.

Result

Score 1, STOP

L2

Sanctions

Real-time OFAC SDN screening. Any match = immediate score 10 CRITICAL. No override possible.

Result

Score 10, STOP

L3

Graph Analysis

Traces hop distance to known malicious actors. 1 hop = HIGH risk, 4+ hops = LOW risk. Last 2000 blocks.

Result

Base score

L4

AI Enhancement

LLM detects behavioral patterns: rapid movement, dormant activation, clustering. Adjusts score ±2 points.

Result

Adjust ±2

Final Score
final = (graph × 0.6) + (AI × 0.4)

Clamped 1-10, written on-chain to AegisRiskScore.sol

For Developers

2 lines of Solidity. That's it.

Inherit AegisGuard and add the modifier. Your protocol now has AI-powered compliance enforcement.

MyDEX.sol
import "./AegisGuard.sol";

contract MyDEX is AegisGuard {
  constructor() AegisGuard(AEGIS_ADDRESS) {}

  function deposit()
    external payable
    onlyCompliant  // <-- this is it
  {
    // your logic here
  }
}
REST API
// Read risk profile
GET /v1/risk/:wallet

// Run full AI scoring pipeline
POST /v1/risk/analyze
// body: { "wallet": "0x..." }

// Payment risk A → B
POST /v1/risk/payment
// body: { "from": "0x...", "to": "0x..." }

// Scoring audit trail
GET /v1/risk/:wallet/history
Score System

Risk levels & enforcement

Two enforcement levels: strict (onlyCompliant) blocks HIGH+, soft (onlyNotCritical) blocks CRITICAL only.

ScoreLevelCompliantdeposit()swap()
10CRITICALNoBlockedBlocked
7 - 9HIGHNoBlockedAllowed
4 - 6MEDIUMYesAllowedAllowed
1 - 3LOWYesAllowedAllowed