fix(swap): fund routed token taxes from gross budgets #1383
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!1383
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1381-route-local-tax"
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?
CL8Y→ALPHA→UST1→USTR could quote successfully while requiring a separate ALPHA wallet balance to fund a middle-hop tax. Funding protocol v1 collects configured taxes from each route's own gross budgets, delivers the exact economic input declared to each pair, and quotes the executable net result. Traders fund the offered asset and network fees only.
Refs #1381. Production rollout/live acceptance remains pending AC9.
Implementation
Validation
make verify-issue-1381: PASS=13 / FAIL=0 / SKIP=1. Contract/indexer/frontend checks and retests passed: 884 contract, 513 indexer, 268 targeted frontend tests. Clippy, changed-source formatting, frontend types/lint/build, schema generation, secret scan and commit hooks passed. Frontend lint has five existing warnings.Actual LocalTerra stores/migrations and eleven execution/rollback scenarios passed, including mixed 18/6 decimals, zero intermediate balances, multiple tax tokens, first/final taxes, router dust, exact feature invoice payment, native wrap/unwrap and atomic failures. The three-hop multi-tax measurement was 4,530,025 gas. Results and evidence explain wider-suite reruns and evidence limits.
Issue acceptance checklist
Agent review instructions
Follow the agent checklist and RT1381 invariants. Use an isolated worktree, dedicated Postgres DB, current optimized artifacts and LocalTerra. Run
make verify-issue-1381; provideVERIFY_ISSUE_1381_LEGACY_ARTIFACTSandVERIFY_ISSUE_1381_WRAP_STACK_ENVfor migration/native checks.An agent may skip a check it cannot complete, record its concrete reason through
VERIFY_ISSUE_1381_SKIP_*_REASON, and mark overall verification PASS with explicit skips. Executed failures remain FAIL; skipped criteria stay unverified. The historical shared-stack Layer B suite and physical wallet/reporter replay were not rerun. Follow the coordinated rollout runbook when authorized signing custody becomes available; source verification does not establish production deployment.