Security: no anomaly checklist with thresholds for small TVL incident scenarios [SEC-G02] #435
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#435
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
No document defines anomaly thresholds or response actions for the small-TVL scenarios listed in SEC-G02. The
blacklist-decision.mdrunbook defines when to apply blacklist controls after an exploit is confirmed, but it does not define proactive thresholds (e.g., single wallet drains >X% pool in one block, LP add/remove cycle profit exceeding Y%, route slippage deviation beyond Z%). The incident template lists triage checks but no anomaly detection criteria or automatic escalation triggers.What Was Checked
docs/runbooks/blacklist-decision.md: covers confirmed-evidence criteria for wallet/token/pair blacklist. No proactive anomaly thresholds defined.docs/templates/incident-dex-indexer.md: triage section checks contract pause state, tx codes, indexer DB/LCD reachability. No anomaly pattern checklist.docs/security-posture.md: mentions "monitoring" as a requirement but specifies no thresholds or commands.Expected (per checklist)
The incident runbook must include a simple anomaly checklist covering at minimum: single wallet drains more than a defined percentage of a pool in one session; repeated add/remove cycles with profit; sudden deviation in route slippage beyond an expected band; many failed txs from one address in a short window; LCD-heavy route flood. Each entry must include a defined threshold and a response action (investigate, pair pause, rate limit increase, blacklist escalation).
Actual
No anomaly checklist exists. The current runbooks are reactive (applied after confirmed exploitation). There is no proactive anomaly detection guide for operators monitoring a live small-TVL system.
Evidence
docs/runbooks/blacklist-decision.md: confirmed-evidence only, no proactive thresholdsdocs/templates/incident-dex-indexer.md: no anomaly pattern sectiondocs/security-posture.mdlines 68-72: TVL band table references monitoring but specifies no thresholdsSuggested Fix
Add an anomaly checklist section to
docs/templates/incident-dex-indexer.md(or a newdocs/runbooks/anomaly-signals.md) covering: (1) single wallet LP withdraw or swap draining more than a defined percentage of pool reserves in one session -- trigger: pair pause; (2) repeated add/remove cycles by one wallet within a short window -- trigger: investigate for sandwich or pool drain profit; (3) route slippage on a quote exceeding an expected band relative to reserves -- trigger: check reserve consistency; (4) many failed txs from one address (error codes) in a rolling window -- trigger: rate-limit review or wallet investigation; (5) spike in LCD-heavy endpoint 429s -- trigger: rate limit review. Each entry must include a defined threshold and a first response action.Verification Checklist
Labels
security,pre-launchCc: @PlasticDigits
mentioned in issue #381
mentioned in merge request !966
Ran the #435 ladder against issue-435-anomaly-signals-sec-g02.
Checklist maps:
One honest flag: the threshold numbers are operator-judgement for a bootstrap-TVL launch, not calibrated against live volume yet — fine as a starting runbook, worth a tune once there's real flow.
Docs-only, no contract/indexer change. Verified on my side — @PlasticDigits good to merge !966 and close.
mentioned in commit
8de9d708e1mentioned in merge request !969
mentioned in commit
69f9902458mentioned in merge request !970
Verification — #435 (SEC-G02)
Result: PASS — all acceptance criteria met on
mainafter merge of !966.What was verified
docs/runbooks/anomaly-signals.mdrows A1–A5 cover all five SEC-G02 scenarios with numeric thresholdspython3 scripts/check_anomaly_signals_docs.py→ OKdocs/templates/incident-dex-indexer.mdTriage section links to anomaly runbook; also cross-linked fromsecurity-posture.md(bootstrap TVL row) andblacklist-decision.mdCommands run
Manual review: opened
anomaly-signals.md(A1 >15% reserve / 1 blk or 10 min → pair pause; A2 ≥3 cycles / 30 min net >0.5% TVL → investigate; A3 >30% slippage or >5% vs simulate → reserve check; A4 ≥10 failed wasm / 15 min → rate-limit review; A5 >20% 429 over 5 min or one IP >50% → rate limit review), incident template Triage link, and security-posture bootstrap row.Follow-ups
Threshold numbers are operator-judgement for bootstrap TVL — revisit when sustained protocol TVL crosses ~$5M (noted in runbook). No contract/indexer changes required for this doc-only issue.