Feature: Governance-controlled trading blacklist (compliance / incident response) #308
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#308
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?
Current codebase
Fee-discount blacklist (Tier 255) exists today — governance assigns wallets to tier 255 for 0% fee discount (full fees still apply). See
smartcontracts/contracts/fee-discount/,docs/security-model.md,TiersPage.tsx.This is not a trading ban. Swaps, LP, limits, and cancels still execute.
No governance-controlled blocklist for tokens, pairs, or accounts that halts protocol interaction for compliance / incident response.
Factory has pause per pair (
is_paused) but not wallet-level or token-level global bans.Why this is needed
Compliance and security incidents require fast, governance-controlled ability to:
Tier 255 alone is insufficient — it only removes fee discounts.
Constraints / guardrails
Relevant files
smartcontracts/contracts/factory/src/contract.rssmartcontracts/contracts/pair/src/contract.rssmartcontracts/contracts/router/src/contract.rssmartcontracts/contracts/fee-discount/src/contract.rssmartcontracts/packages/dex-common/docs/security-model.md,docs/architecture.mdRecommended direction
wallet,token,pair; action matrix.assert_not_blacklistedin pair/router entrypoints:swap,hybrid,provide_liquidity,withdraw_liquidityplace_limit_order*,cancel_limit_order*,claim_expired*,update_limit_order*Sendhooks and escrow releases cannot route value out for banned wallets.BlacklistWallet,UnblacklistWallet,BlacklistToken,BlacklistPair(batch optional).Acceptance criteria
Test plan (all paths)
Attack / abuse / hack vectors
Verification criteria
make test-contractsmatrix for blacklist.mentioned in commit
2714307e16mentioned in commit
7c2efdbecdImplementation complete — see !786.
Summary: Factory-level trading blacklist (wallet / token / pair) with pair + router guards, integration tests, dApp UX, indexer
GET /api/v1/compliance/blacklist-check, ADR 0003 + security-model update.Verification:
cargo test -p cl8y-dex-tests blacklist_and full lib suite (369 tests) PASS;make lint-frontendPASS;cargo checkin indexer PASS.Issue left open pending MR merge and on-chain migration (factory 1.5.0 / pair 1.8.0).
mentioned in merge request !786
mentioned in commit
a46a9ccb77mentioned in merge request !798
mentioned in merge request !818
mentioned in issue #694