Fix DeFiLlama priced volume, fee scope and historical reconciliation #1448

Merged
PlasticDigits merged 1 commit from fix/issue-1354-reconciliation into main 2026-10-08 05:07:31 +00:00
Owner

Partial priced UTC volume was being returned as null, while transaction-wide gem filtering could erase an ordinary pair's fee. This restores the priced lower bound with completeness counts and scopes fee exclusions to their actual pair/event. It also adds the missing authenticated creation/SKU/settings sources and explicit bounded history repair.

Addresses #1354 and implements the source work tracked by #1209/#1210. Includes the investigation and upstream volume-copy work from #1447; completed #631/#687 stay closed. #1209/#1210 were reopened after docs-only closure to keep production rollout/history acceptance visible.

Changes:

  • Positive partial volume, idle zero/all-unpriced null, exact priced/unpriced counts, and asset completeness.
  • Shared pair/event fee scope with unique legacy resolution and explicit ambiguity; ordinary mixed-hop fees survive.
  • Atomic repeatable daily materialization and consistent GET snapshots. A bounded runtime-only backfill-defillama reaggregates original stamps and preserves old auxiliary asset snapshots, without migrations, guessed marks or upstream writes.
  • Pinned creation and provenance-checked UST1 invoice sources, schema constraints, API/series/DeFiLlama/UI labels, replay uniqueness and infrastructure retries. Historical authenticated fees survive later pin removal.
  • Real captured paid LocalTerra creation/SKU receipts replayed into disposable QA databases twice; no shared chain mutation.
  • Bounded daily read-only drift timer, precise historical readback changes, and crosslinked invariant/agent checklists.

Verified commit: 513270baa32aa88722a68af701ca17f242f02810. Pre-commit formatting, CosmWasm Clippy, TypeScript, staged ESLint/Prettier and gitleaks all passed without bypassing hooks.

Verification and acceptance scope:

  • Available source checks pass with retests; executed failures were corrected and rerun.
  • Accounting/history, actual paid receipt replay, parser/provenance/API/catalog/series/UI and browser regressions.
  • Economic fee fixtures satisfy current oracle prerequisites; Swagger assets rebuilt from the correct checkout.
  • DB1396 real ACL/isolation checks and optional authenticated runtime fixture repeated; exact-event amount regressions.
  • Read-only fee SQL exercised on a marked process-owned migrated QA database.
  • Drift timer active with actual journal/JSON findings. Public diagnostics continue to report five live findings from the undeployed implementation.
  • Production SQL reconciliation and old-day/source replay/repair; current SSH authentication unavailable.
  • Production deployment, corrected upstream fee chart/reload and verified CW20 prices/same-block TVL acceptance.
  • External alert delivery and a real settings-batch paid receipt; settings behavior is fixture-tested.

Overall source verification permits PASS WITH SKIPS for unavailable checks with explicit reasons; it does not establish deployed accounting acceptance or erase diagnostic failures. Two host network probes remain unavailable. Source rollout requires the separate migrator to apply the two additive migrations before the runtime binary starts.

Agent procedure, completed criteria and skip instructions: docs/qa/issue-1354/README.md. Commands, results, resolved failures and bounded followups: verification. Invariants: DeFiLlama skill and fee-ledger/provenance skill.

Partial priced UTC volume was being returned as null, while transaction-wide gem filtering could erase an ordinary pair's fee. This restores the priced lower bound with completeness counts and scopes fee exclusions to their actual pair/event. It also adds the missing authenticated creation/SKU/settings sources and explicit bounded history repair. Addresses #1354 and implements the source work tracked by #1209/#1210. Includes the investigation and upstream volume-copy work from #1447; completed #631/#687 stay closed. #1209/#1210 were reopened after docs-only closure to keep production rollout/history acceptance visible. Changes: - Positive partial volume, idle zero/all-unpriced null, exact priced/unpriced counts, and asset completeness. - Shared pair/event fee scope with unique legacy resolution and explicit ambiguity; ordinary mixed-hop fees survive. - Atomic repeatable daily materialization and consistent GET snapshots. A bounded runtime-only `backfill-defillama` reaggregates original stamps and preserves old auxiliary asset snapshots, without migrations, guessed marks or upstream writes. - Pinned creation and provenance-checked UST1 invoice sources, schema constraints, API/series/DeFiLlama/UI labels, replay uniqueness and infrastructure retries. Historical authenticated fees survive later pin removal. - Real captured paid LocalTerra creation/SKU receipts replayed into disposable QA databases twice; no shared chain mutation. - Bounded daily read-only drift timer, precise historical readback changes, and crosslinked invariant/agent checklists. Verified commit: `513270baa32aa88722a68af701ca17f242f02810`. Pre-commit formatting, CosmWasm Clippy, TypeScript, staged ESLint/Prettier and gitleaks all passed without bypassing hooks. Verification and acceptance scope: - [x] Available source checks pass with retests; executed failures were corrected and rerun. - [x] Accounting/history, actual paid receipt replay, parser/provenance/API/catalog/series/UI and browser regressions. - [x] Economic fee fixtures satisfy current oracle prerequisites; Swagger assets rebuilt from the correct checkout. - [x] DB1396 real ACL/isolation checks and optional authenticated runtime fixture repeated; exact-event amount regressions. - [x] Read-only fee SQL exercised on a marked process-owned migrated QA database. - [x] Drift timer active with actual journal/JSON findings. Public diagnostics continue to report five live findings from the undeployed implementation. - [ ] Production SQL reconciliation and old-day/source replay/repair; current SSH authentication unavailable. - [ ] Production deployment, corrected upstream fee chart/reload and verified CW20 prices/same-block TVL acceptance. - [ ] External alert delivery and a real settings-batch paid receipt; settings behavior is fixture-tested. Overall source verification permits **PASS WITH SKIPS** for unavailable checks with explicit reasons; it does not establish deployed accounting acceptance or erase diagnostic failures. Two host network probes remain unavailable. Source rollout requires the separate migrator to apply the two additive migrations before the runtime binary starts. Agent procedure, completed criteria and skip instructions: [docs/qa/issue-1354/README.md](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/513270baa32aa88722a68af701ca17f242f02810/docs/qa/issue-1354/README.md). Commands, results, resolved failures and bounded followups: [verification](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/513270baa32aa88722a68af701ca17f242f02810/docs/qa/issue-1354/verification.md). Invariants: [DeFiLlama skill](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/513270baa32aa88722a68af701ca17f242f02810/skills/AGENTS_DEFILLAMA.md#live-reconciliation-1354) and [fee-ledger/provenance skill](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/513270baa32aa88722a68af701ca17f242f02810/skills/AGENTS_INDEXER_FEE_LEDGER_HOME.md).
Record DeFiLlama drift checks and sync upstream volume recovery
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
09039309ee
Fix DeFiLlama partial volume and fee reconciliation
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
513270baa3
Add pair-scoped accounting, pinned creation and invoice fees, bounded historical repair, drift monitoring and replay regressions.
PlasticDigits deleted branch fix/issue-1354-reconciliation 2026-10-08 05:07:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/cl8y-dex-terraclassic!1448
No description provided.