feat: governance trading blacklist (compliance / incident response) (#308) #786

Merged
PlasticDigits merged 9 commits from cursor/gitlab-issue-workflow-7e7d into main 2026-06-05 10:55:13 +00:00
PlasticDigits commented 2026-06-05 10:03:34 +00:00 (Migrated from gitlab.com)

Summary

Implements GitLab #308: a governance-controlled trading blacklist on the factory (wallets, CW20 tokens, pairs). Tier 255 fee-discount blacklist is unchanged and does not stop trading.

MR fix (f895768): Merged main (resolved SwapPage.tsx import conflict — kept useTradingBlacklist, dropped removed MevPostureNotice); fixed pre-commit (cargo fmt, clippy on pair blacklist guards, #[cfg(test)] on blacklist_tests).

  • Factory 1.5.0: BlacklistWallet/Token/Pair + unban msgs; BlacklistCheck query; storage maps + events
  • Pair 1.8.0 / router: early guards on swap, hybrid, LP, limits, cancel/claim, multihop (fail-open if factory lacks query for legacy/test doubles)
  • Tests: blacklist_tests.rs matrix (wallet/token/pair, router, unban, auth)
  • dApp: useTradingBlacklist, banners + disabled CTAs on Trade/Swap/Pool; SwapPage probes all route hops (local BFS, native, indexer-solved multihop)
  • Indexer: GET /api/v1/compliance/blacklist-check (LCD proxy)
  • Docs: ADR 0003, security-model.md

Acceptance checklist

Criterion Verification Result
Blacklisted wallet cannot swap, LP, place/cancel/claim limits cd smartcontracts && cargo test -p cl8y-dex-tests blacklist_ PASS
Blacklisted token/pair blocks trades (both directions) same PASS
Non-governance cannot mutate lists non_governance_cannot_blacklist_wallet PASS
Governance can unban and restore functionality wallet_blacklist_blocks_swap_lp_limits_and_unban_restores PASS
Router multihop rejects tainted paths router_multihop_rejects_blacklisted_wallet PASS
dApp surfaces block reason when wallet blacklisted Trade/Swap/Pool UI + useTradingBlacklist hook PASS
SwapPage probes indexer multihop hops for token/pair blacklist npm test -- --run SwapPage PASS
Security model doc updated docs/security-model.md + ADR 0003 PASS
Full contract suite cargo test -p cl8y-dex-tests --lib (370 tests) PASS
Frontend lint make lint-frontend PASS
Indexer compile cd indexer && cargo check PASS
Indexer lib tests cd indexer && cargo test --lib (113 tests) PASS
Merge with main git merge origin/main (SwapPage conflict resolved) PASS

Third-party verification

cd smartcontracts && cargo test -p cl8y-dex-tests blacklist_
cd smartcontracts && cargo test -p cl8y-dex-tests --lib
make lint-frontend
cd indexer && cargo check && cargo test --lib

After deploy: governance BlacklistWallet on test wallet → confirm swap rejected on LCD; UnblacklistWallet → swap succeeds.

Follow-ups

  • Migrate/upload factory 1.5.0 + pair 1.8.0 on deployed environments before relying on enforcement in production
  • Legal/compliance copy review for production incident messaging (dApp strings are draft-safe)

Closes #308


Note

High Risk
Changes core trading authorization across factory, all pairs, and the router; incorrect guards or fail-open behavior could block legitimate users or miss blocked paths until contract upgrades are deployed.

Overview
Adds a governance-controlled trading blacklist on the factory (wallets, CW20 tokens, registered pairs) so compliance can halt protocol interaction without destroying balances—distinct from fee-discount Tier 255, which only removes discounts.

On-chain: Factory 1.5.0 stores three maps and exposes governance Blacklist* / Unblacklist* executes plus BlacklistCheck. Pair 1.8.0 and the router call that query before swaps, LP, limit actions, and multihop paths; pair guards also honor optional router trader. Pre-1.5.0 factories fail open on missing query. Integration tests cover auth, dimensions, router, and unban.

Off-chain: New useTradingBlacklist + factory LCD client; Trade, Swap (route token/pair probe), and Pool show alerts and disable CTAs; limit expired claims use separate “Trading restricted” copy. Indexer adds GET /api/v1/compliance/blacklist-check. Docs: ADR 0003 and security-model section; tx errors humanize “Trading blacklist”.

Reviewed by Cursor Bugbot for commit 878937a6b4. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Implements GitLab [#308](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/308): a **governance-controlled trading blacklist** on the factory (wallets, CW20 tokens, pairs). Tier 255 fee-discount blacklist is unchanged and does not stop trading. **MR fix (f895768):** Merged `main` (resolved `SwapPage.tsx` import conflict — kept `useTradingBlacklist`, dropped removed `MevPostureNotice`); fixed pre-commit (`cargo fmt`, clippy on pair blacklist guards, `#[cfg(test)]` on `blacklist_tests`). - **Factory 1.5.0**: `BlacklistWallet/Token/Pair` + unban msgs; `BlacklistCheck` query; storage maps + events - **Pair 1.8.0** / **router**: early guards on swap, hybrid, LP, limits, cancel/claim, multihop (fail-open if factory lacks query for legacy/test doubles) - **Tests**: `blacklist_tests.rs` matrix (wallet/token/pair, router, unban, auth) - **dApp**: `useTradingBlacklist`, banners + disabled CTAs on Trade/Swap/Pool; SwapPage probes all route hops (local BFS, native, indexer-solved multihop) - **Indexer**: `GET /api/v1/compliance/blacklist-check` (LCD proxy) - **Docs**: [ADR 0003](docs/adr/0003-governance-trading-blacklist.md), [security-model.md](docs/security-model.md) ## Acceptance checklist | Criterion | Verification | Result | |-----------|--------------|--------| | Blacklisted wallet cannot swap, LP, place/cancel/claim limits | `cd smartcontracts && cargo test -p cl8y-dex-tests blacklist_` | PASS | | Blacklisted token/pair blocks trades (both directions) | same | PASS | | Non-governance cannot mutate lists | `non_governance_cannot_blacklist_wallet` | PASS | | Governance can unban and restore functionality | `wallet_blacklist_blocks_swap_lp_limits_and_unban_restores` | PASS | | Router multihop rejects tainted paths | `router_multihop_rejects_blacklisted_wallet` | PASS | | dApp surfaces block reason when wallet blacklisted | Trade/Swap/Pool UI + `useTradingBlacklist` hook | PASS | | SwapPage probes indexer multihop hops for token/pair blacklist | `npm test -- --run SwapPage` | PASS | | Security model doc updated | `docs/security-model.md` + ADR 0003 | PASS | | Full contract suite | `cargo test -p cl8y-dex-tests --lib` (370 tests) | PASS | | Frontend lint | `make lint-frontend` | PASS | | Indexer compile | `cd indexer && cargo check` | PASS | | Indexer lib tests | `cd indexer && cargo test --lib` (113 tests) | PASS | | Merge with main | `git merge origin/main` (SwapPage conflict resolved) | PASS | ## Third-party verification ```bash cd smartcontracts && cargo test -p cl8y-dex-tests blacklist_ cd smartcontracts && cargo test -p cl8y-dex-tests --lib make lint-frontend cd indexer && cargo check && cargo test --lib ``` After deploy: governance `BlacklistWallet` on test wallet → confirm swap rejected on LCD; `UnblacklistWallet` → swap succeeds. ## Follow-ups - Migrate/upload factory 1.5.0 + pair 1.8.0 on deployed environments before relying on enforcement in production - Legal/compliance copy review for production incident messaging (dApp strings are draft-safe) Closes #308 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **High Risk** > Changes core trading authorization across factory, all pairs, and the router; incorrect guards or fail-open behavior could block legitimate users or miss blocked paths until contract upgrades are deployed. > > **Overview** > Adds a **governance-controlled trading blacklist** on the factory (wallets, CW20 tokens, registered pairs) so compliance can halt protocol interaction without destroying balances—distinct from fee-discount Tier 255, which only removes discounts. > > **On-chain:** Factory **1.5.0** stores three maps and exposes governance `Blacklist*` / `Unblacklist*` executes plus `BlacklistCheck`. Pair **1.8.0** and the router call that query before swaps, LP, limit actions, and multihop paths; pair guards also honor optional router `trader`. Pre-1.5.0 factories **fail open** on missing query. Integration tests cover auth, dimensions, router, and unban. > > **Off-chain:** New `useTradingBlacklist` + factory LCD client; Trade, Swap (route token/pair probe), and Pool show alerts and disable CTAs; limit expired claims use separate “Trading restricted” copy. Indexer adds **`GET /api/v1/compliance/blacklist-check`**. Docs: ADR 0003 and security-model section; tx errors humanize “Trading blacklist”. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 878937a6b4eda86f98b5249dab2adfda6d6175df. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
PlasticDigits commented 2026-06-05 10:03:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #308

mentioned in issue #308
ghost1 commented 2026-06-05 10:03:48 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:04:01 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:05:10 +00:00 (Migrated from gitlab.com)
Stale Security Review comment
Stale Security Review comment
Stale Security Review comment
Stale Security Review comment

Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit 9d8c9962c5. Configure here.

<details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes and found 1 potential issue.<!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issue. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9d8c9962c514484de2bfea10532dd68a86728dcb. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> </details> </details> </details> </details>
ghost1 commented 2026-06-05 10:05:12 +00:00 (Migrated from gitlab.com)

Swap page skips token blacklist

High Severity

SwapPage calls useTradingBlacklist with a tokens property that the hook does not accept, so fromToken and toToken are never passed into getTradingBlacklistCheck. Under strict TypeScript this fails tsc -b; if it compiled, the Swap UI would only honor wallet-level blocks, not token or pair blacklist signals that Trade and Pool already probe.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9d8c9962c5. Configure here.

### Swap page skips token blacklist **High Severity** <!-- DESCRIPTION START --> `SwapPage` calls `useTradingBlacklist` with a `tokens` property that the hook does not accept, so `fromToken` and `toToken` are never passed into `getTradingBlacklistCheck`. Under strict TypeScript this fails `tsc -b`; if it compiled, the Swap UI would only honor wallet-level blocks, not token or pair blacklist signals that Trade and Pool already probe. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: 67c42f9d-15b7-4b2b-89c5-5525e617eb02 --> <!-- LOCATIONS START frontend-dapp/src/pages/SwapPage.tsx#L124-L129 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjIxODM1M2ViLWQxODYtNGYwMy1iZWYxLWYzODE3MGEyMmQ2NiIsImVuY3J5cHRpb25LZXkiOiIyY1JEbzkzdkN4ZnhjYy1RNTZSNVJXVDk4RUE1bXN4QlJ6bnkxelF0YU00IiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjIxODM1M2ViLWQxODYtNGYwMy1iZWYxLWYzODE3MGEyMmQ2NiIsImVuY3J5cHRpb25LZXkiOiIyY1JEbzkzdkN4ZnhjYy1RNTZSNVJXVDk4RUE1bXN4QlJ6bnkxelF0YU00IiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiI5ZDhjOTk2MmM1MTQ0ODRkZTJiZmVhMTA1MzJkZDY4YTg2NzI4ZGNiIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9d8c9962c514484de2bfea10532dd68a86728dcb. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
PlasticDigits commented 2026-06-05 10:06:14 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: 9d8c9962c514484de2bfea10532dd68a86728dcb

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router guards (incl. fail-open for legacy factory), dApp useTradingBlacklist UX gates, indexer GET /api/v1/compliance/blacklist-check, tests and docs.

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff.

Area Assessment
Factory mutations ensure_governance on all Blacklist* / Unblacklist* executes; addresses validated; pair must be registered
Pair/router enforcement User paths gated before swap/LP/limits; trader included on CW20 swap hooks; router probes wallet + route tokens/pairs
Fail-open on missing BlacklistCheck Intentional for legacy/test factories; not an unprivileged bypass in production (factory address is chain-configured)
dApp UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink)
Indexer compliance proxy Single LCD smart-query to configured factory only (no SSRF); LCD errors mapped via internal_err (generic 500 body)
Prior MR security comments none to reconcile

Note (below medium): blacklist-check accepts unbounded comma-separated tokens/pairs (one LCD call, O(n) factory loop). Consider caps or lcd_heavy throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.

## Security review (automated) **Commit reviewed:** `9d8c9962c514484de2bfea10532dd68a86728dcb` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router guards (incl. fail-open for legacy factory), dApp `useTradingBlacklist` UX gates, indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff. | Area | Assessment | |------|------------| | Factory mutations | `ensure_governance` on all `Blacklist*` / `Unblacklist*` executes; addresses validated; pair must be registered | | Pair/router enforcement | User paths gated before swap/LP/limits; `trader` included on CW20 swap hooks; router probes wallet + route tokens/pairs | | Fail-open on missing `BlacklistCheck` | Intentional for legacy/test factories; not an unprivileged bypass in production (factory address is chain-configured) | | dApp | UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink) | | Indexer compliance proxy | Single LCD smart-query to configured factory only (no SSRF); LCD errors mapped via `internal_err` (generic 500 body) | | Prior MR security comments | none to reconcile | **Note (below medium):** `blacklist-check` accepts unbounded comma-separated `tokens`/`pairs` (one LCD call, O(n) factory loop). Consider caps or `lcd_heavy` throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.
ghost1 commented 2026-06-05 10:06:38 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 96229f04 - fix: pass token0/token1 to useTradingBlacklist on Swap page

Compare with previous version

added 1 commit <ul><li>96229f04 - fix: pass token0/token1 to useTradingBlacklist on Swap page</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836406264&start_sha=9d8c9962c514484de2bfea10532dd68a86728dcb)
ghost1 commented 2026-06-05 10:06:53 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
ghost1 commented 2026-06-05 10:06:55 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-06-05 10:08:18 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: 96229f0429885ef1e89a727a4ff95346e456a5de

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router guards (incl. fail-open for legacy factory), dApp useTradingBlacklist UX gates, indexer GET /api/v1/compliance/blacklist-check, tests and docs. Re-reviewed after SwapPage token-probe fix (96229f04).

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff.

Area Assessment
Factory mutations ensure_governance on all Blacklist* / Unblacklist* executes; addresses validated; pair blacklist requires PAIR_ADDR_REGISTERED
Pair/router enforcement User paths gated before swap/LP/limits; CW20 Receive checks token_sender and optional trader; router probes wallet + route tokens/pairs
Fail-open on missing BlacklistCheck Intentional for legacy/test factories; not an unprivileged bypass when production factory is chain-configured
dApp UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink). SwapPage now passes token0/token1 correctly
Indexer compliance proxy Single LCD smart-query to configured factory_address only (no SSRF); LCD errors mapped via internal_err (generic 500 body)
Prior MR security comments 9d8c9962 review (0 findings) still applies; no new attack paths in 96229f04 fix commit

Note (below medium): blacklist-check accepts unbounded comma-separated tokens/pairs (one LCD call, O(n) factory loop) and sits on the standard API rate limit rather than lcd_heavy. Consider input caps or lcd_heavy throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.

## Security review (automated) **Commit reviewed:** `96229f0429885ef1e89a727a4ff95346e456a5de` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router guards (incl. fail-open for legacy factory), dApp `useTradingBlacklist` UX gates, indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. Re-reviewed after SwapPage token-probe fix (`96229f04`). **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff. | Area | Assessment | |------|------------| | Factory mutations | `ensure_governance` on all `Blacklist*` / `Unblacklist*` executes; addresses validated; pair blacklist requires `PAIR_ADDR_REGISTERED` | | Pair/router enforcement | User paths gated before swap/LP/limits; CW20 `Receive` checks `token_sender` and optional `trader`; router probes wallet + route tokens/pairs | | Fail-open on missing `BlacklistCheck` | Intentional for legacy/test factories; not an unprivileged bypass when production factory is chain-configured | | dApp | UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink). SwapPage now passes `token0`/`token1` correctly | | Indexer compliance proxy | Single LCD smart-query to configured `factory_address` only (no SSRF); LCD errors mapped via `internal_err` (generic 500 body) | | Prior MR security comments | `9d8c9962` review (0 findings) still applies; no new attack paths in `96229f04` fix commit | **Note (below medium):** `blacklist-check` accepts unbounded comma-separated `tokens`/`pairs` (one LCD call, O(n) factory loop) and sits on the standard API rate limit rather than `lcd_heavy`. Consider input caps or `lcd_heavy` throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.
ghost1 commented 2026-06-05 10:08:21 +00:00 (Migrated from gitlab.com)
Stale Security Review comment
Stale Security Review comment
Stale Security Review comment

Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit 96229f0429. Configure here.

<details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes and found 1 potential issue.<!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issue. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 96229f0429885ef1e89a727a4ff95346e456a5de. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> </details> </details> </details>
ghost1 commented 2026-06-05 10:08:21 +00:00 (Migrated from gitlab.com)

Swap omits pair blacklist probe

Medium Severity

The Swap page’s useTradingBlacklist call only sends the connected wallet and the two swap tokens to BlacklistCheck, not the direct pool address or multihop pair list. When governance blacklists a pool but leaves its CW20s off the token list, the factory reports blocked: false and the swap button stays enabled until the transaction fails on-chain.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 96229f0429. Configure here.

### Swap omits pair blacklist probe **Medium Severity** <!-- DESCRIPTION START --> The Swap page’s `useTradingBlacklist` call only sends the connected wallet and the two swap tokens to `BlacklistCheck`, not the direct pool address or multihop pair list. When governance blacklists a pool but leaves its CW20s off the token list, the factory reports `blocked: false` and the swap button stays enabled until the transaction fails on-chain. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: e19bc57c-b3f0-4f46-9ad9-17b77a59e928 --> <!-- LOCATIONS START frontend-dapp/src/pages/SwapPage.tsx#L124-L130 frontend-dapp/src/hooks/useTradingBlacklist.ts#L15-L34 LOCATIONS END --> <details> <summary>Additional Locations (1)</summary> - [`frontend-dapp/src/hooks/useTradingBlacklist.ts#L15-L34`](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-//blob/96229f0429885ef1e89a727a4ff95346e456a5de/frontend-dapp/src/hooks/useTradingBlacklist.ts#L15-L34) </details> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmYyMzZlMTU0LWE1NTktNDI5NC05MDZlLTM3OWZiNmRjMDcyMSIsImVuY3J5cHRpb25LZXkiOiJEM2dSQm9od0RHN29DSEhzVjhPMl9lN1R6YkdPTmlHb20wYXVUdUVZQ1M4IiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmYyMzZlMTU0LWE1NTktNDI5NC05MDZlLTM3OWZiNmRjMDcyMSIsImVuY3J5cHRpb25LZXkiOiJEM2dSQm9od0RHN29DSEhzVjhPMl9lN1R6YkdPTmlHb20wYXVUdUVZQ1M4IiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiI5NjIyOWYwNDI5ODg1ZWYxZTg5YTcyN2E0ZmY5NTM0NmU0NTZhNWRlIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 96229f0429885ef1e89a727a4ff95346e456a5de. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:10:27 +00:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836414286&start_sha=96229f0429885ef1e89a727a4ff95346e456a5de#ff226ea5910d031e89984595b3aaa7d046edce87_130_125)
ghost1 commented 2026-06-05 10:10:27 +00:00 (Migrated from gitlab.com)

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836414286&start_sha=96229f0429885ef1e89a727a4ff95346e456a5de#ff226ea5910d031e89984595b3aaa7d046edce87_130_125)
ghost1 commented 2026-06-05 10:10:27 +00:00 (Migrated from gitlab.com)

added 1 commit

  • eeda468f - fix(frontend): include swap route pairs in trading blacklist probe

Compare with previous version

added 1 commit <ul><li>eeda468f - fix(frontend): include swap route pairs in trading blacklist probe</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836414286&start_sha=96229f0429885ef1e89a727a4ff95346e456a5de)
ghost1 commented 2026-06-05 10:10:38 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
ghost1 commented 2026-06-05 10:10:40 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:12:05 +00:00 (Migrated from gitlab.com)
Stale Security Review comment
Stale Security Review comment

Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit eeda468f17. Configure here.

<details> <summary>Stale Security Review comment</summary> <details> <summary>Stale Security Review comment</summary> <!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes and found 1 potential issue.<!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issue. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eeda468f170cec3b9baf20fd5a6ec0b5051614df. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> </details> </details>
ghost1 commented 2026-06-05 10:12:06 +00:00 (Migrated from gitlab.com)

Swap page incomplete blacklist probe

Medium Severity

The swap page’s useTradingBlacklist call only sends the selected fromToken/toToken and pair addresses derived from the local BFS route or nativeRouteInfo. It ignores hop tokens and pools on indexer-solved multihop paths, so a blacklisted intermediate CW20 or pair can leave the swap CTA enabled while the router rejects the tx on-chain.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eeda468f17. Configure here.

### Swap page incomplete blacklist probe **Medium Severity** <!-- DESCRIPTION START --> The swap page’s `useTradingBlacklist` call only sends the selected `fromToken`/`toToken` and pair addresses derived from the local BFS `route` or `nativeRouteInfo`. It ignores hop tokens and pools on indexer-solved multihop paths, so a blacklisted intermediate CW20 or pair can leave the swap CTA enabled while the router rejects the tx on-chain. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: abd06333-2b9e-43b1-91f8-461d7b758a22 --> <!-- LOCATIONS START frontend-dapp/src/pages/SwapPage.tsx#L196-L226 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjI3ODVkNzRjLTU2NDUtNGZjNy1iZWM1LTlmZGM5M2JhYTNjZSIsImVuY3J5cHRpb25LZXkiOiJTX1gtcmR3Wk41d1JUaWJJTmE2a2VXdGhldzVHM1MxLVRXZHdaX0FPZllzIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjI3ODVkNzRjLTU2NDUtNGZjNy1iZWM1LTlmZGM5M2JhYTNjZSIsImVuY3J5cHRpb25LZXkiOiJTX1gtcmR3Wk41d1JUaWJJTmE2a2VXdGhldzVHM1MxLVRXZHdaX0FPZllzIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiJlZWRhNDY4ZjE3MGNlYzNiOWJhZjIwZmQ1YTZlYzBiNTA1MTYxNGRmIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit eeda468f170cec3b9baf20fd5a6ec0b5051614df. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
PlasticDigits commented 2026-06-05 10:12:46 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: eeda468f170cec3b9baf20fd5a6ec0b5051614df

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router guards (incl. fail-open for legacy factory), dApp useTradingBlacklist UX gates (incl. SwapPage multihop pair probe in eeda468f), indexer GET /api/v1/compliance/blacklist-check, tests and docs.

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff.

Area Assessment
Factory mutations ensure_governance on all Blacklist* / Unblacklist* executes; addresses validated; pair blacklist requires PAIR_ADDR_REGISTERED
Pair/router enforcement User paths gated before swap/LP/limits; CW20 Receive checks token_sender and optional trader; router probes wallet + route tokens/pairs
Fail-open on missing BlacklistCheck Intentional for legacy/test factories; not an unprivileged bypass when production factory is chain-configured
dApp UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink); eeda468f closes pair-only Swap UX gap without weakening chain checks
Indexer compliance proxy Single LCD smart-query to configured factory address (no user-controlled contract target / SSRF); errors sanitized via internal_err

Prior Bugbot threads on SwapPage token/pair probe gaps are UX completeness issues; on-chain enforcement remains intact — not rated medium+ for this security review.

## Security review (automated) **Commit reviewed:** `eeda468f170cec3b9baf20fd5a6ec0b5051614df` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router guards (incl. fail-open for legacy factory), dApp `useTradingBlacklist` UX gates (incl. SwapPage multihop pair probe in `eeda468f`), indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff. | Area | Assessment | |------|------------| | Factory mutations | `ensure_governance` on all `Blacklist*` / `Unblacklist*` executes; addresses validated; pair blacklist requires `PAIR_ADDR_REGISTERED` | | Pair/router enforcement | User paths gated before swap/LP/limits; CW20 `Receive` checks `token_sender` and optional `trader`; router probes wallet + route tokens/pairs | | Fail-open on missing `BlacklistCheck` | Intentional for legacy/test factories; not an unprivileged bypass when production factory is chain-configured | | dApp | UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink); `eeda468f` closes pair-only Swap UX gap without weakening chain checks | | Indexer compliance proxy | Single LCD smart-query to configured factory address (no user-controlled contract target / SSRF); errors sanitized via `internal_err` | Prior Bugbot threads on SwapPage token/pair probe gaps are UX completeness issues; on-chain enforcement remains intact — not rated medium+ for this security review.
ghost1 commented 2026-06-05 10:23:48 +00:00 (Migrated from gitlab.com)

changed this line in version 4 of the diff

changed this line in [version 4 of the diff](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836440894&start_sha=eeda468f170cec3b9baf20fd5a6ec0b5051614df#ff226ea5910d031e89984595b3aaa7d046edce87_226_197)
ghost1 commented 2026-06-05 10:23:48 +00:00 (Migrated from gitlab.com)

added 1 commit

  • ccbb211a - fix(swap): include indexer route ops in blacklist probe

Compare with previous version

added 1 commit <ul><li>ccbb211a - fix(swap): include indexer route ops in blacklist probe</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836440894&start_sha=eeda468f170cec3b9baf20fd5a6ec0b5051614df)
ghost1 commented 2026-06-05 10:24:00 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:24:01 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
PlasticDigits commented 2026-06-05 10:25:56 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: ccbb211a8e8a4199cfb93759a6aa1b17675f2ef6

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router guards (incl. fail-open for legacy factory), dApp useTradingBlacklist UX gates (incl. SwapPage multihop/indexer route probe in ccbb211), indexer GET /api/v1/compliance/blacklist-check, tests and docs.

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization.

  • On-chain: ensure_governance gates all Blacklist* / Unblacklist* executes; BlacklistCheck is read-only with addr_validate on inputs. Pair guards cover swap/LP/limits (incl. optional trader); router probes wallet + hop tokens/pairs. Fail-open when factory lacks BlacklistCheck is a deployment-compat behavior, not an attacker-controlled bypass once factory 1.5.0 is live.
  • Indexer: blacklist-check proxies only the configured FACTORY_ADDRESS (no caller-controlled upstream URL). LCD failures map to generic internal_err bodies (no URL/path leakage). Endpoint is on the standard rate-limited router (single LCD query per request).
  • dApp: Blacklist messages are static copy; React text nodes (no dangerouslySetInnerHTML). Prior SwapPage probe gaps (token/pair/indexer-hop coverage) were fixed in 96229f0, eeda468, and ccbb211; remaining UI gaps would not bypass on-chain enforcement.

No medium, high, or critical vulnerabilities with a plausible exploit path were identified on this diff.

## Security review (automated) **Commit reviewed:** `ccbb211a8e8a4199cfb93759a6aa1b17675f2ef6` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router guards (incl. fail-open for legacy factory), dApp `useTradingBlacklist` UX gates (incl. SwapPage multihop/indexer route probe in `ccbb211`), indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization. - **On-chain:** `ensure_governance` gates all `Blacklist*` / `Unblacklist*` executes; `BlacklistCheck` is read-only with `addr_validate` on inputs. Pair guards cover swap/LP/limits (incl. optional `trader`); router probes wallet + hop tokens/pairs. Fail-open when factory lacks `BlacklistCheck` is a deployment-compat behavior, not an attacker-controlled bypass once factory 1.5.0 is live. - **Indexer:** `blacklist-check` proxies only the configured `FACTORY_ADDRESS` (no caller-controlled upstream URL). LCD failures map to generic `internal_err` bodies (no URL/path leakage). Endpoint is on the standard rate-limited router (single LCD query per request). - **dApp:** Blacklist messages are static copy; React text nodes (no `dangerouslySetInnerHTML`). Prior SwapPage probe gaps (token/pair/indexer-hop coverage) were fixed in `96229f0`, `eeda468`, and `ccbb211`; remaining UI gaps would not bypass on-chain enforcement. No medium, high, or critical vulnerabilities with a plausible exploit path were identified on this diff.
ghost1 commented 2026-06-05 10:45:03 +00:00 (Migrated from gitlab.com)

added 39 commits

  • ccbb211a...74c04491 - 38 commits from branch main
  • f8957689 - Merge origin/main into cursor/gitlab-issue-workflow-7e7d

Compare with previous version

added 39 commits <ul><li>ccbb211a...74c04491 - 38 commits from branch <code>main</code></li><li>f8957689 - Merge origin/main into cursor/gitlab-issue-workflow-7e7d</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836484259&start_sha=ccbb211a8e8a4199cfb93759a6aa1b17675f2ef6)
PlasticDigits commented 2026-06-05 10:45:14 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:45:16 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:47:20 +00:00 (Migrated from gitlab.com)
Stale Security Review comment

Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.

Reviewed by Cursor Bugbot for commit f8957689f7. Configure here.

<details> <summary>Stale Security Review comment</summary> <!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes and found 2 potential issues.<!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issues. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8957689f77f737838c37fe9bb76029bd3d3367d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> </details>
ghost1 commented 2026-06-05 10:47:21 +00:00 (Migrated from gitlab.com)

Blacklist hook fails open

Medium Severity

useTradingBlacklist sets blocked only when cached data has blocked === true. While the factory query is loading, or after it errors, blocked stays false and pages treat trading as allowed. Compliance UX can briefly or persistently show enabled CTAs for wallets or routes that are actually blacklisted until a successful refetch.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8957689f7. Configure here.

### Blacklist hook fails open **Medium Severity** <!-- DESCRIPTION START --> `useTradingBlacklist` sets `blocked` only when cached data has `blocked === true`. While the factory query is loading, or after it errors, `blocked` stays false and pages treat trading as allowed. Compliance UX can briefly or persistently show enabled CTAs for wallets or routes that are actually blacklisted until a successful refetch. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: 821ab143-fe12-449a-93da-fbd01b706da0 --> <!-- LOCATIONS START frontend-dapp/src/hooks/useTradingBlacklist.ts#L49-L52 frontend-dapp/src/pages/SwapPage.tsx#L728-L731 LOCATIONS END --> <details> <summary>Additional Locations (1)</summary> - [`frontend-dapp/src/pages/SwapPage.tsx#L728-L731`](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-//blob/f8957689f77f737838c37fe9bb76029bd3d3367d/frontend-dapp/src/pages/SwapPage.tsx#L728-L731) </details> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjZjZmNiYTVlLTE1NGItNDAyYy1iODBmLWQzMWFiMjVmZDhlNyIsImVuY3J5cHRpb25LZXkiOiJPVHBJNkNzN0NCa01JUUhHYklEX3lQaHNFTGFRQzZXT3RCdEF5UEtPRU1ZIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjZjZmNiYTVlLTE1NGItNDAyYy1iODBmLWQzMWFiMjVmZDhlNyIsImVuY3J5cHRpb25LZXkiOiJPVHBJNkNzN0NCa01JUUhHYklEX3lQaHNFTGFRQzZXT3RCdEF5UEtPRU1ZIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiJmODk1NzY4OWY3N2Y3Mzc4MzhjMzdmZTliYjc2MDI5YmQzZDMzNjdkIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8957689f77f737838c37fe9bb76029bd3d3367d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:47:22 +00:00 (Migrated from gitlab.com)

Blacklist shown as pair paused

Low Severity

LimitOrderMyPlacementsPanel receives isPairPaused={isTradeBlocked}, which combines pause and trading blacklist. Claim actions show “Unavailable (pair paused)” when the user is blocked by governance blacklist, not because the pool is paused, which misstates the restriction despite the separate blacklist banner above.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f8957689f7. Configure here.

### Blacklist shown as pair paused **Low Severity** <!-- DESCRIPTION START --> `LimitOrderMyPlacementsPanel` receives `isPairPaused={isTradeBlocked}`, which combines pause and trading blacklist. Claim actions show “Unavailable (pair paused)” when the user is blocked by governance blacklist, not because the pool is paused, which misstates the restriction despite the separate blacklist banner above. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: d037ca1e-501b-49e2-b026-7cc33faf23ed --> <!-- LOCATIONS START frontend-dapp/src/components/trade/TradeOrderTicket.tsx#L983-L984 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmJjMjQ0ZWJmLWI0ZjEtNDdhMC1hNTliLWJmYjVhYTFlZjc4NCIsImVuY3J5cHRpb25LZXkiOiJxbkJTMXF2MXdoN3ZsWnpuT2YzeDVGQUVOTnY5Nm1Zc0JvSC12TDRhN2pFIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OmJjMjQ0ZWJmLWI0ZjEtNDdhMC1hNTliLWJmYjVhYTFlZjc4NCIsImVuY3J5cHRpb25LZXkiOiJxbkJTMXF2MXdoN3ZsWnpuT2YzeDVGQUVOTnY5Nm1Zc0JvSC12TDRhN2pFIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiJmODk1NzY4OWY3N2Y3Mzc4MzhjMzdmZTliYjc2MDI5YmQzZDMzNjdkIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f8957689f77f737838c37fe9bb76029bd3d3367d. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:48:55 +00:00 (Migrated from gitlab.com)

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836490988&start_sha=f8957689f77f737838c37fe9bb76029bd3d3367d#aa7c1dde0fbc33ab5dacfa4fa0d8a6bed0154bbe_52_51)
ghost1 commented 2026-06-05 10:48:55 +00:00 (Migrated from gitlab.com)

changed this line in version 6 of the diff

changed this line in [version 6 of the diff](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836490988&start_sha=f8957689f77f737838c37fe9bb76029bd3d3367d#895a0feabe05f732c7eca30737814de701a03bda_984_983)
ghost1 commented 2026-06-05 10:48:56 +00:00 (Migrated from gitlab.com)

added 1 commit

  • b162fb0e - fix(frontend): fail-closed trading blacklist and correct claim copy

Compare with previous version

added 1 commit <ul><li>b162fb0e - fix(frontend): fail-closed trading blacklist and correct claim copy</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836490988&start_sha=f8957689f77f737838c37fe9bb76029bd3d3367d)
ghost1 commented 2026-06-05 10:49:09 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:49:15 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
PlasticDigits commented 2026-06-05 10:50:07 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: b162fb0e2f7717bb915fa164caae47ab6705dac6

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router guards (incl. documented fail-open for legacy factory), dApp useTradingBlacklist UX gates (incl. SwapPage multihop probes, fail-closed pending/error in b162fb0), indexer GET /api/v1/compliance/blacklist-check, tests and docs. Re-reviewed after merge with main and post-Bugbot fixes (96229f04, eeda468f, ccbb211a, b162fb0).

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff.

Area Assessment
Factory mutations ensure_governance on all Blacklist* / Unblacklist* executes; addresses validated; pair blacklist requires PAIR_ADDR_REGISTERED
Pair/router enforcement User paths gated before swap/LP/limits; CW20 Receive checks token_sender and optional trader; router probes wallet + route tokens/pairs; router always sets trader = sender on multihop
Fail-open on missing BlacklistCheck Intentional for legacy/test factories (ADR 0003); not an unprivileged bypass when production factory is chain-configured
dApp UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink); b162fb0 fail-closes while probe pending/errored
Indexer compliance proxy Single LCD smart-query to configured factory_address only (no user-controlled contract target / SSRF); LCD errors mapped via internal_err (generic 500 body)
Prior MR security comments Bugbot SwapPage probe gaps fixed in 96229f04/eeda468f/ccbb211a; on-chain enforcement was intact throughout — UX-only

Note (below medium): blacklist-check accepts unbounded comma-separated tokens/pairs (one LCD call, O(n) factory loop) and sits on the standard API rate limit rather than lcd_heavy. Consider input caps or lcd_heavy throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.

## Security review (automated) **Commit reviewed:** `b162fb0e2f7717bb915fa164caae47ab6705dac6` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router guards (incl. documented fail-open for legacy factory), dApp `useTradingBlacklist` UX gates (incl. SwapPage multihop probes, fail-closed pending/error in `b162fb0`), indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. Re-reviewed after merge with `main` and post-Bugbot fixes (`96229f04`, `eeda468f`, `ccbb211a`, `b162fb0`). **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and LCD/API abuse. No exploitable medium+ issues identified on this diff. | Area | Assessment | |------|------------| | Factory mutations | `ensure_governance` on all `Blacklist*` / `Unblacklist*` executes; addresses validated; pair blacklist requires `PAIR_ADDR_REGISTERED` | | Pair/router enforcement | User paths gated before swap/LP/limits; CW20 `Receive` checks `token_sender` and optional `trader`; router probes wallet + route tokens/pairs; router always sets `trader = sender` on multihop | | Fail-open on missing `BlacklistCheck` | Intentional for legacy/test factories (ADR 0003); not an unprivileged bypass when production factory is chain-configured | | dApp | UI disable is advisory; on-chain guards enforce; messages are static strings (no XSS sink); `b162fb0` fail-closes while probe pending/errored | | Indexer compliance proxy | Single LCD smart-query to configured `factory_address` only (no user-controlled contract target / SSRF); LCD errors mapped via `internal_err` (generic 500 body) | | Prior MR security comments | Bugbot SwapPage probe gaps fixed in `96229f04`/`eeda468f`/`ccbb211a`; on-chain enforcement was intact throughout — UX-only | **Note (below medium):** `blacklist-check` accepts unbounded comma-separated `tokens`/`pairs` (one LCD call, O(n) factory loop) and sits on the standard API rate limit rather than `lcd_heavy`. Consider input caps or `lcd_heavy` throttling if abuse becomes noisy — availability hardening only, not authz/funds impact.
PlasticDigits commented 2026-06-05 10:50:59 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: b162fb0e2f7717bb915fa164caae47ab6705dac6

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router enforcement (incl. fail-open when factory lacks query), dApp useTradingBlacklist fail-closed UX (b162fb0), SwapPage multihop/indexer route probes, indexer GET /api/v1/compliance/blacklist-check, tests and docs.

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization.

  • On-chain: All Blacklist* / Unblacklist* executes call ensure_governance; BlacklistCheck validates addresses before map lookups. Pair gate_trading_blacklist covers swap (CW20 sender + optional trader), provide liquidity, and limit cancel/claim/update; router checks the CW20 sender and enumerates hop tokens/pairs. Fail-open on missing factory query is intentional for unmigrated factories and does not grant non-governance list mutation.
  • Indexer: blacklist-check proxies a single wasm smart query to configured factory_address only (no caller-controlled contract target). LCD failures use internal_err (generic 500 body). Global rate limiting applies.
  • dApp: useTradingBlacklist treats pending/error as blocked (b162fb0); addresses are filtered to terra1 prefixes before query. SwapPage derives tokens and pair addresses from local/native/indexer-solved routes. UI messages are static strings (no HTML injection). Claim CTAs use claimsDisabled separately from pair pause.

Security review: no medium+ findings on this diff.

Prior Bugbot threads (fail-open hook, incomplete Swap probes) are addressed in b162fb0 and earlier commits on this branch; not re-reported.

## Security review (automated) **Commit reviewed:** `b162fb0e2f7717bb915fa164caae47ab6705dac6` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router enforcement (incl. fail-open when factory lacks query), dApp `useTradingBlacklist` fail-closed UX (`b162fb0`), SwapPage multihop/indexer route probes, indexer `GET /api/v1/compliance/blacklist-check`, tests and docs. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization. - **On-chain:** All `Blacklist*` / `Unblacklist*` executes call `ensure_governance`; `BlacklistCheck` validates addresses before map lookups. Pair `gate_trading_blacklist` covers swap (CW20 sender + optional `trader`), provide liquidity, and limit cancel/claim/update; router checks the CW20 `sender` and enumerates hop tokens/pairs. Fail-open on missing factory query is intentional for unmigrated factories and does not grant non-governance list mutation. - **Indexer:** `blacklist-check` proxies a single wasm smart query to configured `factory_address` only (no caller-controlled contract target). LCD failures use `internal_err` (generic 500 body). Global rate limiting applies. - **dApp:** `useTradingBlacklist` treats pending/error as blocked (`b162fb0`); addresses are filtered to `terra1` prefixes before query. SwapPage derives tokens and pair addresses from local/native/indexer-solved routes. UI messages are static strings (no HTML injection). Claim CTAs use `claimsDisabled` separately from pair pause. **Security review: no medium+ findings on this diff.** Prior Bugbot threads (fail-open hook, incomplete Swap probes) are addressed in `b162fb0` and earlier commits on this branch; not re-reported.
ghost1 commented 2026-06-05 10:51:36 +00:00 (Migrated from gitlab.com)

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit b162fb0e2f. Configure here.

<!-- BUGBOT_REVIEW --> Cursor Bugbot has reviewed your changes and found 1 potential issue. <!-- BUGBOT_FIX_ALL --> <a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTplYzJhNGNlZS0yOTYzLTQ1MmEtOGYxYS1iNGY4ZTQ2NDhhNjUiLCJlbmNyeXB0aW9uS2V5IjoiSkNyNkZ2Yk9RMzk4WFI3b1FxN0VPUmpQM3NNUk1vbERPTUNBenpZbklEYyIsImJyYW5jaCI6ImN1cnNvci9naXRsYWItaXNzdWUtd29ya2Zsb3ctN2U3ZCIsInJlcG9Pd25lciI6IlBsYXN0aWNEaWdpdHMiLCJyZXBvTmFtZSI6ImNsOHktZGV4LXRlcnJhY2xhc3NpYyJ9fQ" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix All in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a> <!-- /BUGBOT_FIX_ALL --> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_BEGIN --> <sup>Bugbot Autofix is [ON](https://www.cursor.com/dashboard/bugbot). A cloud agent has been kicked off to fix the reported issue. <!-- BUGBOT_AUTOFIX_AGENT_LINK --></sup> <!-- BUGBOT_AUTOFIX_REVIEW_FOOTNOTE_END --> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b162fb0e2f7717bb915fa164caae47ab6705dac6. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:51:38 +00:00 (Migrated from gitlab.com)

Query errors block trading incorrectly

Medium Severity

useTradingBlacklist sets blocked when the factory BlacklistCheck query is pending or errored, not only when data.blocked is true. Swap, pool, trade, and expired-limit claim CTAs then show “Trading restricted” and disable actions even for users who are not blacklisted, including during LCD outages or transient query failures.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b162fb0e2f. Configure here.

### Query errors block trading incorrectly **Medium Severity** <!-- DESCRIPTION START --> `useTradingBlacklist` sets `blocked` when the factory `BlacklistCheck` query is pending or errored, not only when `data.blocked` is true. Swap, pool, trade, and expired-limit claim CTAs then show “Trading restricted” and disable actions even for users who are not blacklisted, including during LCD outages or transient query failures. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: d317ddd1-3407-48cf-9dc0-1097c6311b6d --> <!-- LOCATIONS START frontend-dapp/src/hooks/useTradingBlacklist.ts#L50-L52 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjM2MzA5NDgwLWZmMWItNDc3Zi05YjFlLWRhZmRkNjlmNDk2NCIsImVuY3J5cHRpb25LZXkiOiJycS1TbUZib3JFV05UQkhsRlVGTVFpbTZwbjY2MlV4Sks2Q1VuRmZBdU1NIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-cursor-light.png"><img alt="Fix in Cursor" width="115" height="28" src="https://cursor.com/assets/images/fix-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjM2MzA5NDgwLWZmMWItNDc3Zi05YjFlLWRhZmRkNjlmNDk2NCIsImVuY3J5cHRpb25LZXkiOiJycS1TbUZib3JFV05UQkhsRlVGTVFpbTZwbjY2MlV4Sks2Q1VuRmZBdU1NIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy03ZTdkIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjY4LCJjb21taXRTaGEiOiJiMTYyZmIwZTJmNzcxN2JiOTE1ZmExNjRjYWFlNDdhYjY3MDVkYWM2IiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/fix-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/fix-in-web-light.png"><img alt="Fix in Web" width="99" height="28" src="https://cursor.com/assets/images/fix-in-web-dark.png"></picture></a></div> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit b162fb0e2f7717bb915fa164caae47ab6705dac6. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:52:54 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 878937a6 - fix: only block trading when blacklist query returns blocked true

Compare with previous version

added 1 commit <ul><li>878937a6 - fix: only block trading when blacklist query returns blocked true</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/68/diffs?diff_id=1836498237&start_sha=b162fb0e2f7717bb915fa164caae47ab6705dac6)
ghost1 commented 2026-06-05 10:53:07 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 10:53:08 +00:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
PlasticDigits commented 2026-06-05 10:55:13 +00:00 (Migrated from gitlab.com)

mentioned in commit a46a9ccb77

mentioned in commit a46a9ccb77f4eb8890017606d978bcec4c1f2b87
PlasticDigits (Migrated from gitlab.com) merged commit a46a9ccb77 into main 2026-06-05 10:55:13 +00:00
PlasticDigits commented 2026-06-05 10:55:36 +00:00 (Migrated from gitlab.com)

Security review (automated)

Commit reviewed: 878937a6b4eda86f98b5249dab2adfda6d6175df

Scope: Governance trading blacklist (#308) — factory Blacklist* / BlacklistCheck, pair/router on-chain guards (incl. documented fail-open when factory lacks query), dApp useTradingBlacklist UX gates (re-reviewed after 878937a fail-open-on-pending/error fix), indexer GET /api/v1/compliance/blacklist-check, integration tests, docs.

Outcome: FINDINGS: 0 medium+

Inline threads: none

Summary

Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization. Traced attacker-controlled inputs (query params, CW20 hook trader, multihop route tokens/pairs) to enforcement sinks.

On-chain: Factory blacklist mutations are gated by ensure_governance. BlacklistCheck only evaluates caller-supplied addresses (no full-list enumeration). Pair guards run before swap, LP, limit place/cancel/claim/update, and check both cw20_msg.sender and optional trader. Router multihop collects hop tokens/pairs and checks sender. Fail-open when the factory query is missing is documented for pre-1.5.0 factories; on upgraded deployments the query succeeds and blocks apply.

Indexer: /api/v1/compliance/blacklist-check proxies a single LCD smart-query to the configured factory address (no user-controlled contract target → no SSRF). Params are serialized into the query body; global API rate limiting applies.

dApp: useTradingBlacklist blocks CTAs only when data.blocked === true (878937a). Pending/error states no longer deny service to non-blacklisted users; on-chain enforcement remains authoritative, so this is a UX availability choice, not a trading bypass.

Prior Bugbot threads (SwapPage probe gaps, fail-closed pending state) were addressed in earlier commits; the latest diff does not reintroduce exploitable paths.

Security review: no medium+ findings on this diff.

## Security review (automated) **Commit reviewed:** `878937a6b4eda86f98b5249dab2adfda6d6175df` **Scope:** Governance trading blacklist (#308) — factory `Blacklist*` / `BlacklistCheck`, pair/router on-chain guards (incl. documented fail-open when factory lacks query), dApp `useTradingBlacklist` UX gates (re-reviewed after `878937a` fail-open-on-pending/error fix), indexer `GET /api/v1/compliance/blacklist-check`, integration tests, docs. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none ### Summary Reviewed added/modified paths for authz bypass, injection, SSRF/XSS, secret leakage, and unsafe deserialization. Traced attacker-controlled inputs (query params, CW20 hook `trader`, multihop route tokens/pairs) to enforcement sinks. **On-chain:** Factory blacklist mutations are gated by `ensure_governance`. `BlacklistCheck` only evaluates caller-supplied addresses (no full-list enumeration). Pair guards run before swap, LP, limit place/cancel/claim/update, and check both `cw20_msg.sender` and optional `trader`. Router multihop collects hop tokens/pairs and checks `sender`. Fail-open when the factory query is missing is documented for pre-1.5.0 factories; on upgraded deployments the query succeeds and blocks apply. **Indexer:** `/api/v1/compliance/blacklist-check` proxies a single LCD smart-query to the configured factory address (no user-controlled contract target → no SSRF). Params are serialized into the query body; global API rate limiting applies. **dApp:** `useTradingBlacklist` blocks CTAs only when `data.blocked === true` (`878937a`). Pending/error states no longer deny service to non-blacklisted users; on-chain enforcement remains authoritative, so this is a UX availability choice, not a trading bypass. Prior Bugbot threads (SwapPage probe gaps, fail-closed pending state) were addressed in earlier commits; the latest diff does not reintroduce exploitable paths. Security review: no medium+ findings on this diff.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!786
No description provided.