feat(indexer): tax-aware route/solve ranking for community tax CW20 #1131
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!1131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue/615-tax-aware-route-ranking"
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
GET /api/v1/route/solveby catalognet_out, keep hop LCD/DB sims 1:1 (H-01 / T592-1).token_intax first-hop stays eligible.min_return.COMMUNITY_TAX_OPTION2_CODE_IDS/COMMUNITY_TAX_OPTION2_DATA_HASHES.skills/AGENTS_INDEXER_TAX_AWARE_ROUTING.md(R615-1–R615-8).make verify-issue-615.Closes #615
Acceptance (#615)
net_out; hop LCD/DB sims unchanged.token_in(option-2 wasm only, env/code-id/hash pin).token_intax: same leftover on remaining paths; winner is max askraw_out/net_out.token_outtax:estimated_amount_out_netis buy-split; You Receive uses net;min_returnstays pre-tax.trader→ 0 bps; unknown/LCD fail-closed (keep catalog bps).COMMUNITY_TAX_OPTION2_*flip (documented in #607 playbook + R615-5).make verify-issue-607still green; newmake verify-issue-615(docs + indexer lib + frontend helpers, first pass + retest).docs/route-solver.md+ ADR 0002 amendment +docs/indexer-invariants.md+AGENTS.mdcross-links.Not in this MR
feat/607-router-tax-option-2; do not merge that here). Ranking only.data_hash; hash pin is env-only.buy_bps, and retailpool_only(#596).TaxPreviewon every hop (catalog snapshot + optionalIsProtocolExemptonly).Follow-up
After CMM migrate / option-2 wasm: set
COMMUNITY_TAX_OPTION2_CODE_IDS(e.g.11611) orCOMMUNITY_TAX_OPTION2_DATA_HASHES. Ranking then skips middle TAX hops. Wasm must actually tax hops — the env only changes ranking.Test plan
make verify-issue-615(includesverify-issue-607, indexercommunity_tax_rank/ cache / merge_picks, frontend net helpers)net_out == raw_outmentioned in issue #615
added 8 commits
main574793b4- Merge origin/main into issue/615-tax-aware-route-rankingCompare with previous version
mentioned in commit
2d9b573b6fmentioned in issue #616
mentioned in issue #611