You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LLM이 EVM opcode trace를 분석하여 공격을 탐지할 수 있는지 검증하는 Phase 0 PoC를 완료했다.
13개 fixture (공격 3 + 정상 10)에 대해 100% 정확도를 달성하여, PRD 기준 80%를 크게 초과했다.
월 운영 비용은 캐시 적용 시 $67-250 범위로 $150 예산 내 운영이 가능하다.
Test Results
Accuracy: 13/13 (100.0%)
Fixture
Expected
Got
Confidence
Type
Cost
attack_flash_loan_euler
attack
attack
0.85-0.95
FlashLoan
$0.017
attack_price_manipulation_balancer
attack
attack
0.80-0.85
PriceManipulation
$0.012
attack_reentrancy_dao
attack
attack
0.90-0.95
Reentrancy
$0.015
normal_contract_deploy_factory
benign
benign
0.95
-
$0.019
normal_contract_deploy_simple
benign
benign
1.00
-
$0.012
normal_defi_liquidity_add
benign
benign
0.95
-
$0.019
normal_defi_swap_multi_hop
benign
benign
0.95
-
$0.022
normal_defi_swap_uniswap
benign
benign
0.95
-
$0.022
normal_eth_transfer_contract
benign
benign
1.00
-
$0.010
normal_eth_transfer_large
benign
benign
1.00
-
$0.009
normal_eth_transfer_simple
benign
benign
1.00
-
$0.008
normal_multi_call_batch
benign
benign
0.90
-
$0.021
normal_multi_call_governance
benign
benign
0.95
-
$0.018
Key Observations
Attack detection: 3/3 공격 패턴 모두 정탐. AttackType 분류도 정확.
False positive rate: 0%. 정상 TX 10개 모두 정확히 benign으로 분류.
Confidence calibration: 공격은 0.80-0.95, 정상은 0.90-1.00. 적절한 분리.
가장 어려운 케이스: normal_multi_call_batch (confidence 0.90) — 2개 revert 포함하여 공격과 유사하나 정확히 판별.
Cost Analysis
2-Tier Model Comparison
Metric
gemini-3-flash
gemini-3-pro
Role
Screening (fast)
Deep analysis
Accuracy
13/13 (100%)
13/13 (100%)
Total cost (13 req)
$0.206
$0.113
Avg cost/req
$0.016
$0.009
Avg cost/req (cached)
$0.0007
TBD
Input tokens (total)
32,428
32,428
Output tokens (total)
7,262
7,283
Note: gemini-3-pro is cheaper per request than flash — likely LiteLLM proxy pricing.
# 1. Set environment variablesexport LITELLM_API_KEY=<your-key>export LITELLM_BASE_URL=https://api.ai.tokamak.network
# 2. Run PoC tests
cargo test --features ai_agent poc_test -- --ignored --nocapture
# 3. Run all tests (non-API)
cargo test --features ai_agent