fix(protocol): prevent false liquidity collapses from lost coverage #1382
No reviewers
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!1382
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-1380-liquidity-quality"
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?
When reserve or price coverage disappears, Protocol currently publishes incomplete AMM TVL as a complete zero/low value, contaminating charts and percentage baselines. This change publishes explicit quality, original input time, supported-pool membership and a monotonic generation; unavailable values are null and partial sums are labeled lower bounds. Genuine validated zero and real valuation changes remain visible.
Both refresh entry points serialize before reads and atomically publish the headline, per-pair stamps, bounded terminal source observations and all three grains. Baselines require comparable membership. Reserve work has bounded concurrency, deadlines, book walks and response sizes. The frontend exposes quality with keyboard/mobile access and treats unqualified legacy history as unknown. Scoped historical repair preserves original evidence, survives replay after recovery, and never copies today's TVL into history.
Implements #1380. The issue remains open for production release/history acceptance.
Acceptance checklist:
Validation:
verify-issue-569,689,655,664,1263; final results are recorded in the linked receipt.Agent review: follow
docs/qa/issue-1380/README.mdandskills/AGENTS_PROTOCOL_LIQUIDITY_QUALITY.md, record the tested SHA, runmake verify-issue-1380, inspect assertions and the repair evidence, and preserve PASS/FAIL/SKIP separately. An agent may mark overall PASS with explicit skips for unavailable checks when every completed check passes; skipped checks are never counted as completed criteria, and an executed failure remains FAIL.Explicit skips: this PR is not deployed, so production revision/repair/after-evidence is unverified; LocalTerra is running and public reserves were captured/replayed, but an isolated funded live LP-withdrawal/outage control was not performed. These do not block implementation review under the task instruction. Deploy the nullable API and frontend together, apply the SQLx quality migrations, then run the read-only probe with
--expect-quality. No contract migration or production signing is required for this fix.Review links: checklist, verification receipt, agent playbook.