Use verified treasury custody for native listing markets #1442
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!1442
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-1437-treasury-custody"
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?
Production readback before the GeckoTerminal submission showed zero native funds at the mapper: its configured treasury is the actual custodian. The original #1437 rule therefore withheld every native listing market. This correction derives the backing address from the pinned mapper's historical Config.treasury at the event and predecessor heights, requires canonical equal identities and exact served-height headers, and reconciles gross wrap inflow / withdraw_amount outflow while keeping projected principal fee-exclusive.
An additive migration records custody_address without rewriting applied history. The latest unproven observation suppresses older backing, and NULL or different-treasury principal cannot inflate current feeds. Historical LCD requests also carry height in the URL: live probes proved a proxy otherwise reused an earlier response for a different height header. Virtual requests remain SQL-only and preserve response/accounting isolation.
Refs #1437. Required for the approved production deployment and regular GeckoTerminal submission following #1441.
Verification: make verify-issue-1437 PASS13/FAIL0/SKIP0; library577,API11,ingestion5 passed and retested using the same executables. #685/#646/#684/#694/#631 and #1395 passed. Independent assembled-source review, normal commit hooks and secret scanning passed. Original migration is byte-identical; only the additive source-provenance migration is new.
Live read-only evidence established canonical treasury custody and demonstrated matching historical Config headers after adding a height-specific URL key. No wallet/chain transaction or production DB mutation was made by this patch. The existing database roles and credentials stay intact for the separately controlled rollout.
Agent review: follow docs/qa/issue-1437/README.md and skills/AGENTS_LISTING_VIRTUAL_PAIRS.md. Run make verify-issue-1437 in a disposable worktree/Postgres database, complete runnable checks, and record genuinely unavailable items as explicit SKIP with PASS WITH SKIPS. Executed implementation failures must be fixed and retested; source PASS is not deployment proof.