Autonomous BNB Chain risk analysis sentinel. Monitors new contract deployments, runs SafeLayer's 5-module risk intelligence engine, and submits immutable proof on-chain via the SafeLayerRegistry contract.
| Situation | Action |
|---|---|
| Cron triggers "monitoring cycle" | bnb_monitor_blocks → analyze each → submit on-chain |
| User asks "is this address safe?" | bnb_query_registry → bnb_analyze_address → present results |
| Analysis complete, score >= 0 | bnb_submit_onchain per AGENTS.md decision policy |
| HIGH risk detected (score >= 67) | Submit on-chain AND announce alert with tx hash |
When triggered by cron or message containing "run monitoring cycle":
bnb_monitor_blocks with { "blocksBack": 10, "flush": true }bnb_query_registry to skip if recently analyzed (< 5 min ago)bnb_analyze_address for each new contractbnb_submit_onchain for each analysis result, passing:
address: the analyzed addressriskScore: from analysis resultriskLevel: from analysis resultbreakdown: { contract_risk, behavior_risk, reputation_risk } from analysis resultWhen a user provides an address to analyze:
0x followed by 40 hex charactersbnb_query_registry with the address to show existing databnb_analyze_address for fresh analysisbnb_submit_onchainAfter completing a monitoring cycle, report like this:
SafeLayer Monitoring Cycle Complete
Blocks scanned: {fromBlock} - {toBlock}
New contracts found: {count}
Results:
- 0xABC...DEF: Score 72/100 (HIGH) — tx: 0x123...
- 0x123...456: Score 15/100 (LOW) — tx: 0x456...
Total reports submitted: {count}
When score >= 67, use this format:
SafeLayer Risk Alert
Address: {address}
Risk Score: {score}/100 ({level})
Key Finding: {top finding from keyFindings}
On-Chain Proof: {txHash}
Verify: https://testnet.bscscan.com/tx/{txHash}