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.
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.
From wallet to enforcement in 3 steps
AI Scores Every Wallet
4-layer pipeline: Attribution override, OFAC sanctions screening, graph proximity analysis, and Groq AI behavioral enhancement.
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.
Enforcement Is Automatic
DeFi protocols inherit AegisGuard. The onlyCompliant modifier blocks non-compliant wallets. No custom logic needed.
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.
Attribution
Known clean addresses are instantly whitelisted with score 1. Prevents false positives on verified infrastructure.
Result
Score 1, STOP
Sanctions
Real-time OFAC SDN screening. Any match = immediate score 10 CRITICAL. No override possible.
Result
Score 10, STOP
Graph Analysis
Traces hop distance to known malicious actors. 1 hop = HIGH risk, 4+ hops = LOW risk. Last 2000 blocks.
Result
Base score
AI Enhancement
LLM detects behavioral patterns: rapid movement, dormant activation, clustering. Adjusts score ±2 points.
Result
Adjust ±2
final = (graph × 0.6) + (AI × 0.4)Clamped 1-10, written on-chain to AegisRiskScore.sol
2 lines of Solidity. That's it.
Inherit AegisGuard and add the modifier. Your protocol now has AI-powered compliance enforcement.
import "./AegisGuard.sol"; contract MyDEX is AegisGuard { constructor() AegisGuard(AEGIS_ADDRESS) {} function deposit() external payable onlyCompliant // <-- this is it { // your logic here } }
// 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
Risk levels & enforcement
Two enforcement levels: strict (onlyCompliant) blocks HIGH+, soft (onlyNotCritical) blocks CRITICAL only.
| Score | Level | Compliant | deposit() | swap() |
|---|---|---|---|---|
| 10 | CRITICAL | No | Blocked | Blocked |
| 7 - 9 | HIGH | No | Blocked | Allowed |
| 4 - 6 | MEDIUM | Yes | Allowed | Allowed |
| 1 - 3 | LOW | Yes | Allowed | Allowed |