fix(community-tax): ExemptionDirectory skips buy, sell, and transfer tax (M-5) #609
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#609
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent / related
Audit
INTERNAL_KIMIK3_1787468843M-5. Template #592. Create Token copy #593 SKU hint “Manager-chosen wallets skip tax.” SKU init #605.Product decision (2026-08-23): exempted users skip transfer, buy, and sell — not transfer-only.
Columbus-5 11611 migrate.
Current codebase
ExemptionDirectorySKU unlocksMANAGER_EXEMPT. Settings batchadd_exempt/remove_exempt(50 UST1). Manager cannot remove protocol-exempt / listed pairs / router / AutoLP / factory.tax.rs:is_manager_exemptis used only viais_transfer_exemptin the Transfer branch.MANAGER_EXEMPT.communityTaxSku.ts: “Manager-chosen wallets skip tax.”Protocol exemptions (pair, router, factory, self, AutoLP) stay separate and are not removable (T592-9).
Why this is needed
The paid SKU and UI promise “skip tax.” Holders and market-makers who are added to the directory still pay buy/sell extra-debit / outbound split. That is a billing/integrity miss and breaks the obvious use (treasury ops, market-maker wallet, airdrop claimer) unless they only ever
Transfer.Constraints / guardrails
trading_enabled, cooldown, ormax_walletunless a later spec says so.RegisterListedPair.remove_exemptstill cannot target protocol entries (CannotRemoveProtocolExempt).Relevant files
smartcontracts/contracts/community-tax-token/src/tax.rs(classify,is_manager_exempt,is_transfer_exempt)smartcontracts/contracts/community-tax-token/src/invoice.rs(add_exempt/remove_exempt)frontend-dapp/src/utils/communityTaxSku.ts(hint — already matches the new behavior)frontend-dapp/src/pages/ManageTokenPage.tsxaudit_poc.rs(add coverage; no existing M-5 PoC)Recommended direction
In
classify:fromortoisis_manager_exemptand the would-be kind is Sell / Buy / Transfer → Honest (0 bps), same as transfer exemption today.Acceptance criteria
Send+Swapto a listed pair pays no sell extra-debit; pair still creditedamount.Transferto an exempt wallet pays no buy split; user creditedamount.Test plan — all paths
add_exemptrejected.TaxPreviewHonest.TaxPreviewmatches execute for exempt sell/buy.Test plan — attack / abuse
buy_bps/sell_bps(M-4). Exemption is an explicit list — acceptable. Do not allow permissionless self-add.add_exemptthenremove_exemptto strip protocol status — must still hitCannotRemoveProtocolExempt/ ignore as protocol.trading_enabled=false, skip cooldown, exceed max_wallet) — must fail. Guards stay on.TaxPreviewso an exempt manager connected wallet is not over-debited.Verification
cargo test -p cl8y-community-tax-token.amount.marked as related to #592
marked as related to #593
marked as related to #605
mentioned in commit
391af48f53mentioned in merge request !1124
mentioned in merge request !1122
mentioned in issue #605
mentioned in commit
c5d00f67bementioned in commit
084123b5c4mentioned in issue #611
marked as related to #611
Merge !1124 — E609-1–E609-7 and #609 acceptance passed after integrating !1122+!1123 (
make verify-issue-6096/6).Merge problems found and fixed on this branch before merge:
tax.rsneeded bothis_manager_directory_tax_skip(#609) andis_cooldown_subject(#608);record_trade_blocksmust use economictrade_kindplusself_addr.clean()pair-seed Transfer taxed treasury 2e6 until the pair was listed first.add_exemptof a listed pair is now rejected as protocol (#605); the old add-then-remove test was updated.Still ops, not a code defect: live 11611 instances still charge buy/sell on manager-exempt wallets until CMM migrate. LocalTerra Manage Token swap QA is on #611.
mentioned in issue #606
mentioned in commit
666e985db3mentioned in issue #612
mentioned in issue #622
mentioned in issue #623
mentioned in issue #625
mentioned in issue #603
mentioned in issue #626
mentioned in issue #633
mentioned in merge request !1137
mentioned in issue #635
marked as related to #635