feat(indexer): DeFiLlama UTC-day volume and fees API (#631) #1143

Merged
PlasticDigits merged 3 commits from 631-feat-list-cl8y-dex-dex-cl8y-com-on-defillama-tvl-volume-fees- into main 2026-08-25 06:25:17 +00:00
PlasticDigits commented 2026-08-25 06:06:29 +00:00 (Migrated from gitlab.com)

Summary

  • Add GET /api/v1/defillama/daily?timestamp= as a UTC calendar-day rollup (hybrid L10 volume, PFee/L7 fees, #562 gem exclude). GET is O(1) + 60s cache; invalid timestamp → 400; missing day → 404; idle → "0"; activity + unpriced → null.
  • Vendor Llama adapter copies under scripts/defillama/ (TVL is factory Pool {} raw balances only — never indexer USD or CG liquidity_in_usd).
  • Document methodology and invariants in docs/DEFILLAMA.md, docs/indexer-invariants.md, and skills/AGENTS_DEFILLAMA.md. Regression: make verify-issue-631.

Related to #631. Does not close the issue: upstream DefiLlama / dimension-adapter GitHub PRs and the Coolify live daily check remain operator follow-ups.

Test plan

  • make verify-issue-631 (docs + gem lockstep + lib + integration + node helpers) — passed twice
  • Coolify deploy: yesterday UTC GET https://indexer.dex.cl8y.com/api/v1/defillama/daily?timestamp=<00:00_utc>
  • File upstream PRs from scripts/defillama/ (node test.js projects/cl8y-dex, pnpm test dexs cl8y-dex, pnpm test fees cl8y-dex)
  • After Llama merge: protocol page shows Terra Classic + dex.cl8y.com
## Summary - Add `GET /api/v1/defillama/daily?timestamp=` as a UTC calendar-day rollup (hybrid **L10** volume, PFee/L7 fees, `#562` gem exclude). GET is O(1) + 60s cache; invalid timestamp → 400; missing day → 404; idle → `"0"`; activity + unpriced → `null`. - Vendor Llama adapter copies under `scripts/defillama/` (TVL is factory `Pool {}` raw balances only — never indexer USD or CG `liquidity_in_usd`). - Document methodology and invariants in `docs/DEFILLAMA.md`, `docs/indexer-invariants.md`, and `skills/AGENTS_DEFILLAMA.md`. Regression: `make verify-issue-631`. Related to #631. Does **not** close the issue: upstream DefiLlama / dimension-adapter GitHub PRs and the Coolify live daily check remain operator follow-ups. ## Test plan - [x] `make verify-issue-631` (docs + gem lockstep + lib + integration + node helpers) — passed twice - [ ] Coolify deploy: yesterday UTC `GET https://indexer.dex.cl8y.com/api/v1/defillama/daily?timestamp=<00:00_utc>` - [ ] File upstream PRs from `scripts/defillama/` (`node test.js projects/cl8y-dex`, `pnpm test dexs cl8y-dex`, `pnpm test fees cl8y-dex`) - [ ] After Llama merge: protocol page shows Terra Classic + `dex.cl8y.com`
PlasticDigits commented 2026-08-25 06:09:27 +00:00 (Migrated from gitlab.com)

marked this merge request as ready

marked this merge request as **ready**
PlasticDigits commented 2026-08-25 06:09:27 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-25 06:09:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #631

mentioned in issue #631
PlasticDigits commented 2026-08-25 06:17:54 +00:00 (Migrated from gitlab.com)

Filed the upstream Llama adapters (operator follow-up from this MR):

After Coolify ships the daily route, confirm yesterday UTC, then mark #8987 ready and paste pnpm test dexs cl8y-dex / pnpm test fees cl8y-dex.

Filed the upstream Llama adapters (operator follow-up from this MR): - TVL: https://github.com/DefiLlama/DefiLlama-Adapters/pull/20676 — live `node test.js` → **terra \$13.28k** (cLUNC→uluna, cUSTC→uusd). Unpriced CW20s (UST1/USTR/CL8Y/gems) omitted on Llama's side. - Volume + fees (draft): https://github.com/DefiLlama/dimension-adapters/pull/8987 — version 1 UTC-day fetch. Kept draft because `GET https://indexer.dex.cl8y.com/api/v1/defillama/daily` is still **404** until this MR is on Coolify. After Coolify ships the daily route, confirm yesterday UTC, then mark #8987 ready and paste `pnpm test dexs cl8y-dex` / `pnpm test fees cl8y-dex`.
PlasticDigits commented 2026-08-25 06:25:16 +00:00 (Migrated from gitlab.com)

added 15 commits

  • 315d5c91...d7050d85 - 12 commits from branch main
  • 9f06e241 - feat(indexer): add DeFiLlama UTC-day volume and fees API
  • bfa18802 - docs: link filed DeFiLlama adapter PRs and wrap 1:1 map
  • 796b647e - merge origin/main into feat/631-defillama

Compare with previous version

added 15 commits <ul><li>315d5c91...d7050d85 - 12 commits from branch <code>main</code></li><li>9f06e241 - feat(indexer): add DeFiLlama UTC-day volume and fees API</li><li>bfa18802 - docs: link filed DeFiLlama adapter PRs and wrap 1:1 map</li><li>796b647e - merge origin/main into feat/631-defillama</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/425/diffs?diff_id=1981425118&start_sha=315d5c910cb03ad10ea0013547c767ccc7209153)
PlasticDigits commented 2026-08-25 06:25:17 +00:00 (Migrated from gitlab.com)

mentioned in commit 1ae62ca38f

mentioned in commit 1ae62ca38f7d1fafa07bc0cbb9c0e265d807017d
PlasticDigits (Migrated from gitlab.com) merged commit 1ae62ca38f into main 2026-08-25 06:25:18 +00:00
PlasticDigits commented 2026-08-25 06:29:19 +00:00 (Migrated from gitlab.com)

mentioned in issue #629

mentioned in issue #629
PlasticDigits commented 2026-08-25 06:29:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #638

mentioned in issue #638
PlasticDigits commented 2026-08-25 06:29:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #630

mentioned in issue #630
PlasticDigits commented 2026-08-25 06:30:00 +00:00 (Migrated from gitlab.com)

mentioned in issue #632

mentioned in issue #632
PlasticDigits commented 2026-08-25 06:30:01 +00:00 (Migrated from gitlab.com)

mentioned in issue #627

mentioned in issue #627
PlasticDigits commented 2026-08-25 06:30:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #526

mentioned in issue #526
PlasticDigits commented 2026-08-25 06:52:55 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1146

mentioned in merge request !1146
PlasticDigits commented 2026-08-25 06:53:20 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1147

mentioned in merge request !1147
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!1143
No description provided.