Benchmark MAX_EXPIRED_PARKS_PER_SWAP vs gas ceiling (GitLab #309) #794

Merged
PlasticDigits merged 3 commits from cursor/gitlab-issue-workflow-f6fa into main 2026-06-05 10:55:52 +00:00
PlasticDigits commented 2026-06-05 10:38:34 +00:00 (Migrated from gitlab.com)

Summary

Closes the evidence gap from GitLab #289 / #309: benchmark MAX_EXPIRED_PARKS_PER_SWAP (15) against Terra Classic max gas and tx size on optimized wasm, add regression tests, and document results.

Outcome: retain 15 — isolated worst case at the cap is ~855k gas_used (≪ 12M headroom under the 15M dApp ceiling). MAX_SCAN_STEPS (500) remains the binding traversal budget on deep expired prefixes; skipped head orders are cheap (~3.7k gas) and clear on the next swap.

Merge resolution (2026-06-05): Rebased onto main — Makefile conflict resolved by keeping verify-issue-309 alongside main's verify-issue-313, verify-issue-295, and setup-cloud-localterra targets.

Issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/309

Closes #309

Changes

  • scripts/qa/verify-issue-309.sh + make verify-issue-309 — LocalTerra sweep N=1..30, records gas/events/tx bytes
  • Integration tests: cap-at-N, pool-only (no parks), event-count sweep
  • docs/limit-orders.md § Expired-park benchmark — methodology + results table
  • Cross-links in AGENTS_TERRACLASSIC_GAS.md, contracts-security-audit.md L5, pair.rs comment

Acceptance checklist

Criterion Verification Result
Merge conflicts resolved glab mr view 76 → can_be_merged PASS
Benchmark methodology documented docs/limit-orders.md#expired-park-benchmark-gitlab-309 PASS
Chosen cap justified with gas + event table Same section (LocalTerra optimized wasm 2026-06-05) PASS
Frontend offline gas formula uses constant (15) hybridBookWalkLimits.ts unchanged value; hybridSwapGas tests PASS
Integration test: swap at cap + cap+5 behavior limit_order_tests::{hybrid_walk_at_cap_*, expired_parks_benchmark_*, hybrid_walk_pool_only_*} PASS
Docs/skills updated limit-orders, AGENTS_TERRACLASSIC_GAS, contracts-security-audit PASS
Bugbot: tx_bytes missing → fail verify-issue-309.sh L291–292 PASS
make test-contracts make test-contracts (366 integration + unit) PASS
make test-frontend (gas helper) npx vitest run hybridSwapGas.test.ts (9/9) PASS
Live benchmark make verify-issue-309 (28/28 checks; prior run on optimized wasm) PASS

Verification for third parties

make test-contracts
cd frontend-dapp && npx vitest run src/services/terraclassic/__tests__/hybridSwapGas.test.ts
# Live stack (optimized wasm):
make start && make build-optimized && make deploy-local
make verify-issue-309

Governance note

Cap unchanged — no pair wasm redeploy required for this MR (comment/doc/test only in dex-common).

## Summary Closes the evidence gap from GitLab #289 / #309: benchmark `MAX_EXPIRED_PARKS_PER_SWAP` (15) against Terra Classic max gas and tx size on **optimized wasm**, add regression tests, and document results. **Outcome:** retain **15** — isolated worst case at the cap is ~855k `gas_used` (≪ 12M headroom under the 15M dApp ceiling). `MAX_SCAN_STEPS` (500) remains the binding traversal budget on deep expired prefixes; skipped head orders are cheap (~3.7k gas) and clear on the next swap. **Merge resolution (2026-06-05):** Rebased onto `main` — `Makefile` conflict resolved by keeping `verify-issue-309` alongside main's `verify-issue-313`, `verify-issue-295`, and `setup-cloud-localterra` targets. Issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/309 Closes #309 ## Changes - `scripts/qa/verify-issue-309.sh` + `make verify-issue-309` — LocalTerra sweep N=1..30, records gas/events/tx bytes - Integration tests: cap-at-N, pool-only (no parks), event-count sweep - `docs/limit-orders.md` § Expired-park benchmark — methodology + results table - Cross-links in `AGENTS_TERRACLASSIC_GAS.md`, `contracts-security-audit.md` L5, `pair.rs` comment ## Acceptance checklist | Criterion | Verification | Result | |-----------|--------------|--------| | Merge conflicts resolved | `glab mr view 76` → `can_be_merged` | PASS | | Benchmark methodology documented | `docs/limit-orders.md#expired-park-benchmark-gitlab-309` | PASS | | Chosen cap justified with gas + event table | Same section (LocalTerra optimized wasm 2026-06-05) | PASS | | Frontend offline gas formula uses constant (15) | `hybridBookWalkLimits.ts` unchanged value; hybridSwapGas tests | PASS | | Integration test: swap at cap + cap+5 behavior | `limit_order_tests::{hybrid_walk_at_cap_*, expired_parks_benchmark_*, hybrid_walk_pool_only_*}` | PASS | | Docs/skills updated | limit-orders, AGENTS_TERRACLASSIC_GAS, contracts-security-audit | PASS | | Bugbot: tx_bytes missing → fail | `verify-issue-309.sh` L291–292 | PASS | | `make test-contracts` | `make test-contracts` (366 integration + unit) | PASS | | `make test-frontend` (gas helper) | `npx vitest run hybridSwapGas.test.ts` (9/9) | PASS | | Live benchmark | `make verify-issue-309` (28/28 checks; prior run on optimized wasm) | PASS | ## Verification for third parties ```bash make test-contracts cd frontend-dapp && npx vitest run src/services/terraclassic/__tests__/hybridSwapGas.test.ts # Live stack (optimized wasm): make start && make build-optimized && make deploy-local make verify-issue-309 ``` ## Governance note Cap unchanged — **no pair wasm redeploy required** for this MR (comment/doc/test only in `dex-common`).
PlasticDigits commented 2026-06-05 10:38:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #309

mentioned in issue #309
ghost1 commented 2026-06-05 10:38:43 +00:00 (Migrated from gitlab.com)

changed the description

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

changed the description

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

Security review

Commit reviewed: 00e6467733db9258901b991f1a1c15198ddb7d22
Scope: MR !794 — benchmark / regression / documentation for MAX_EXPIRED_PARKS_PER_SWAP (GitLab #309). Files: scripts/qa/verify-issue-309.sh, limit_order_tests.rs (3 new tests), docs/limit-orders.md, AGENTS_TERRACLASSIC_GAS.md, contracts-security-audit.md, comment-only updates in dex-common/pair.rs and hybridBookWalkLimits.ts, Makefile target.

Outcome: FINDINGS: 0 medium+

Inline threads: none (no medium+ findings on this diff)

Summary

This MR adds evidence and automation around an existing on-chain cap (MAX_EXPIRED_PARKS_PER_SWAP = 15). No wasm logic, constant value, auth path, or user-facing runtime behavior changes.

Reviewed attack surfaces relevant to the diff:

Area Assessment
On-chain pair / orderbook No logic changes. Constant and cap behavior unchanged; new tests only assert existing L5 bounded-work semantics.
verify-issue-309.sh LocalTerra dev/QA script (docker + terrad). Env overrides feed numeric sweep values through jq --argjson / bash arithmetic; no eval, no remote user input, no secret logging. Not a production attack surface.
Frontend hybridBookWalkLimits.ts Comment-only; MAX_EXPIRED_PARKS_PER_SWAP value unchanged.
Docs / skills Informational cross-links and benchmark table; no executable production code.

Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff.

Security review: no medium+ findings on this diff.

## Security review **Commit reviewed:** `00e6467733db9258901b991f1a1c15198ddb7d22` **Scope:** MR !794 — benchmark / regression / documentation for `MAX_EXPIRED_PARKS_PER_SWAP` (GitLab #309). Files: `scripts/qa/verify-issue-309.sh`, `limit_order_tests.rs` (3 new tests), `docs/limit-orders.md`, `AGENTS_TERRACLASSIC_GAS.md`, `contracts-security-audit.md`, comment-only updates in `dex-common/pair.rs` and `hybridBookWalkLimits.ts`, `Makefile` target. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none (no medium+ findings on this diff) ### Summary This MR adds evidence and automation around an **existing** on-chain cap (`MAX_EXPIRED_PARKS_PER_SWAP = 15`). No wasm logic, constant value, auth path, or user-facing runtime behavior changes. Reviewed attack surfaces relevant to the diff: | Area | Assessment | |------|------------| | On-chain pair / orderbook | **No logic changes.** Constant and cap behavior unchanged; new tests only assert existing L5 bounded-work semantics. | | `verify-issue-309.sh` | LocalTerra dev/QA script (docker + terrad). Env overrides feed numeric sweep values through `jq --argjson` / bash arithmetic; no eval, no remote user input, no secret logging. Not a production attack surface. | | Frontend `hybridBookWalkLimits.ts` | Comment-only; `MAX_EXPIRED_PARKS_PER_SWAP` value unchanged. | | Docs / skills | Informational cross-links and benchmark table; no executable production code. | Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff. **Security review: no medium+ findings on this diff.**
ghost1 commented 2026-06-05 10:40:07 +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 00e6467733. 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=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aToyNTVhNzVlYy1hM2FkLTRmOWMtODUxOC00MjJlNzBiYTBkNGQiLCJlbmNyeXB0aW9uS2V5IjoiRy1hSEpxcC1GYVdhZllGUEZJWmV1ckJnal9YWUgwem5KRTF4YUFkVDZtbyIsImJyYW5jaCI6ImN1cnNvci9naXRsYWItaXNzdWUtd29ya2Zsb3ctZjZmYSIsInJlcG9Pd25lciI6IlBsYXN0aWNEaWdpdHMiLCJyZXBvTmFtZSI6ImNsOHktZGV4LXRlcnJhY2xhc3NpYyJ9fQ" 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 00e6467733db9258901b991f1a1c15198ddb7d22. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:40:08 +00:00 (Migrated from gitlab.com)

Missing failure when tx bytes absent

Low Severity

The sweep case treats missing tx_bytes as success: when tx_serialized_bytes returns nothing, neither pass nor fail runs for the tx-size acceptance criterion. gas_used correctly fails as unavailable, so a broken tx query can still yield a passing run while skipping the documented 1 048 576-byte check.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 00e6467733. Configure here.

### Missing failure when tx bytes absent **Low Severity** <!-- DESCRIPTION START --> The sweep case treats missing `tx_bytes` as success: when `tx_serialized_bytes` returns nothing, neither pass nor fail runs for the tx-size acceptance criterion. `gas_used` correctly fails as unavailable, so a broken tx query can still yield a passing run while skipping the documented 1 048 576-byte check. <!-- DESCRIPTION END --> <!-- BUGBOT_BUG_ID: 3f4ca7e8-4113-4390-8738-6b5e2416eba8 --> <!-- LOCATIONS START scripts/qa/verify-issue-309.sh#L286-L291 LOCATIONS END --> <div><a href="https://cursor.com/open?link=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjQxMDhjYjY4LWZlZmYtNDBiMi04OTE2LWEyODFhYjY1YTdiZiIsImVuY3J5cHRpb25LZXkiOiJ2VVAyQ2RrdUhwYVJCa0JxSW1iZUJNMFMzdE1sMmpiNy1vMC1rSnljRXBRIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy1mNmZhIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIn19" 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=eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjQxMDhjYjY4LWZlZmYtNDBiMi04OTE2LWEyODFhYjY1YTdiZiIsImVuY3J5cHRpb25LZXkiOiJ2VVAyQ2RrdUhwYVJCa0JxSW1iZUJNMFMzdE1sMmpiNy1vMC1rSnljRXBRIiwiYnJhbmNoIjoiY3Vyc29yL2dpdGxhYi1pc3N1ZS13b3JrZmxvdy1mNmZhIiwicmVwb093bmVyIjoiUGxhc3RpY0RpZ2l0cyIsInJlcG9OYW1lIjoiY2w4eS1kZXgtdGVycmFjbGFzc2ljIiwicHJOdW1iZXIiOjc2LCJjb21taXRTaGEiOiIwMGU2NDY3NzMzZGI5MjU4OTAxYjk5MWYxYTFjMTUxOThkZGI3ZDIyIiwicHJvdmlkZXIiOiJnaXRsYWIiLCJob3N0bmFtZSI6ImdpdGxhYi5jb20ifX0" 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 00e6467733db9258901b991f1a1c15198ddb7d22. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
ghost1 commented 2026-06-05 10:41:43 +00:00 (Migrated from gitlab.com)

added 1 commit

  • f3a0334c - Fail sweep case when tx_bytes is unavailable

Compare with previous version

added 1 commit <ul><li>f3a0334c - Fail sweep case when tx_bytes is unavailable</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/76/diffs?diff_id=1836478583&start_sha=00e6467733db9258901b991f1a1c15198ddb7d22)
ghost1 commented 2026-06-05 10:41:55 +00:00 (Migrated from gitlab.com)

changed the description

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

resolved all threads

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

Security review

Commit reviewed: f3a0334c5c4b9fe1e081db9835bf219fb8e05a0a
Scope: MR !794 — benchmark / regression / documentation for MAX_EXPIRED_PARKS_PER_SWAP (GitLab #309). Files: scripts/qa/verify-issue-309.sh, limit_order_tests.rs (3 new tests), docs/limit-orders.md, AGENTS_TERRACLASSIC_GAS.md, contracts-security-audit.md, comment-only updates in dex-common/pair.rs and hybridBookWalkLimits.ts, Makefile target.

Outcome: FINDINGS: 0 medium+

Inline threads: none (no medium+ findings on this diff)

Delta since prior review (00e6467)

Latest commit tightens QA integrity in verify-issue-309.sh: when tx_serialized_bytes returns nothing, the sweep case now records a failure instead of silently skipping the tx-size check. This is a test-harness hardening change, not a production attack surface.

Summary

This MR adds evidence and automation around an existing on-chain cap (MAX_EXPIRED_PARKS_PER_SWAP = 15). No wasm logic, constant value, auth path, or user-facing runtime behavior changes.

Reviewed attack surfaces relevant to the diff:

Area Assessment
On-chain pair / orderbook No logic changes. Constant and cap behavior unchanged; new tests only assert existing L5 bounded-work semantics.
verify-issue-309.sh LocalTerra dev/QA script (docker + terrad). Env overrides feed numeric sweep values through jq --argjson / bash arithmetic; no eval, no remote user input, no secret logging. Not a production attack surface.
Frontend hybridBookWalkLimits.ts Comment-only; MAX_EXPIRED_PARKS_PER_SWAP value unchanged.
Docs / skills Informational cross-links and benchmark table; no executable production code.

Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff.

Security review: no medium+ findings on this diff.

## Security review **Commit reviewed:** `f3a0334c5c4b9fe1e081db9835bf219fb8e05a0a` **Scope:** MR !794 — benchmark / regression / documentation for `MAX_EXPIRED_PARKS_PER_SWAP` (GitLab #309). Files: `scripts/qa/verify-issue-309.sh`, `limit_order_tests.rs` (3 new tests), `docs/limit-orders.md`, `AGENTS_TERRACLASSIC_GAS.md`, `contracts-security-audit.md`, comment-only updates in `dex-common/pair.rs` and `hybridBookWalkLimits.ts`, `Makefile` target. **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none (no medium+ findings on this diff) ### Delta since prior review (`00e6467`) Latest commit tightens QA integrity in `verify-issue-309.sh`: when `tx_serialized_bytes` returns nothing, the sweep case now records a failure instead of silently skipping the tx-size check. This is a test-harness hardening change, not a production attack surface. ### Summary This MR adds evidence and automation around an **existing** on-chain cap (`MAX_EXPIRED_PARKS_PER_SWAP = 15`). No wasm logic, constant value, auth path, or user-facing runtime behavior changes. Reviewed attack surfaces relevant to the diff: | Area | Assessment | |------|------------| | On-chain pair / orderbook | **No logic changes.** Constant and cap behavior unchanged; new tests only assert existing L5 bounded-work semantics. | | `verify-issue-309.sh` | LocalTerra dev/QA script (docker + terrad). Env overrides feed numeric sweep values through `jq --argjson` / bash arithmetic; no eval, no remote user input, no secret logging. Not a production attack surface. | | Frontend `hybridBookWalkLimits.ts` | Comment-only; `MAX_EXPIRED_PARKS_PER_SWAP` value unchanged. | | Docs / skills | Informational cross-links and benchmark table; no executable production code. | Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff. **Security review: no medium+ findings on this diff.**
ghost1 commented 2026-06-05 10:45:41 +00:00 (Migrated from gitlab.com)

added 39 commits

  • f3a0334c...74c04491 - 38 commits from branch main
  • 6463af2b - Merge origin/main into cursor/gitlab-issue-workflow-f6fa — resolve Makefile conflict

Compare with previous version

added 39 commits <ul><li>f3a0334c...74c04491 - 38 commits from branch <code>main</code></li><li>6463af2b - Merge origin/main into cursor/gitlab-issue-workflow-f6fa — resolve Makefile conflict</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/76/diffs?diff_id=1836485461&start_sha=f3a0334c5c4b9fe1e081db9835bf219fb8e05a0a)
ghost1 commented 2026-06-05 10:45:53 +00:00 (Migrated from gitlab.com)

changed the description

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

changed the description

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

Security review

Commit reviewed: 6463af2bb561e031a2693d2f5f38e9133c5cdd7e
Scope: MR !794 vs main — benchmark / regression / documentation for MAX_EXPIRED_PARKS_PER_SWAP (GitLab #309). Eight files: scripts/qa/verify-issue-309.sh, limit_order_tests.rs (3 new tests), docs/limit-orders.md, skills/AGENTS_TERRACLASSIC_GAS.md, contracts-security-audit.md, comment-only updates in dex-common/pair.rs and hybridBookWalkLimits.ts, Makefile (verify-issue-309 target).

Outcome: FINDINGS: 0 medium+

Inline threads: none (no medium+ findings on this diff)

Delta since prior review (f3a0334)

Latest commit merges origin/main and resolves the Makefile conflict (adds verify-issue-309 alongside existing verify-issue-* targets). No new production code paths, auth changes, or on-chain constant changes beyond what was already reviewed on f3a0334.

Summary

This MR adds evidence and automation around an existing on-chain cap (MAX_EXPIRED_PARKS_PER_SWAP = 15). Wasm logic and the constant value are unchanged.

Area Assessment
On-chain pair / orderbook No logic changes. New integration tests assert existing L5 bounded-work semantics (cap-at-15, pool-only, N sweep).
verify-issue-309.sh LocalTerra dev/QA only (docker + terrad). Env overrides feed numeric sweep values through jq --argjson / bash arithmetic; no eval, no remote user input, no secret logging. tx_bytes missing now fails the case (lines 287–293). Not a production attack surface.
Frontend hybridBookWalkLimits.ts Comment-only; constant 15 unchanged.
Docs / skills Informational cross-links and benchmark table.

Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff.

Security review: no medium+ findings on this diff.

## Security review **Commit reviewed:** `6463af2bb561e031a2693d2f5f38e9133c5cdd7e` **Scope:** MR !794 vs `main` — benchmark / regression / documentation for `MAX_EXPIRED_PARKS_PER_SWAP` (GitLab #309). Eight files: `scripts/qa/verify-issue-309.sh`, `limit_order_tests.rs` (3 new tests), `docs/limit-orders.md`, `skills/AGENTS_TERRACLASSIC_GAS.md`, `contracts-security-audit.md`, comment-only updates in `dex-common/pair.rs` and `hybridBookWalkLimits.ts`, `Makefile` (`verify-issue-309` target). **Outcome:** `FINDINGS: 0` medium+ **Inline threads:** none (no medium+ findings on this diff) ### Delta since prior review (`f3a0334`) Latest commit merges `origin/main` and resolves the `Makefile` conflict (adds `verify-issue-309` alongside existing `verify-issue-*` targets). No new production code paths, auth changes, or on-chain constant changes beyond what was already reviewed on `f3a0334`. ### Summary This MR adds evidence and automation around an **existing** on-chain cap (`MAX_EXPIRED_PARKS_PER_SWAP = 15`). Wasm logic and the constant value are unchanged. | Area | Assessment | |------|------------| | On-chain pair / orderbook | **No logic changes.** New integration tests assert existing L5 bounded-work semantics (cap-at-15, pool-only, N sweep). | | `verify-issue-309.sh` | LocalTerra dev/QA only (docker + terrad). Env overrides feed numeric sweep values through `jq --argjson` / bash arithmetic; no `eval`, no remote user input, no secret logging. `tx_bytes` missing now fails the case (lines 287–293). Not a production attack surface. | | Frontend `hybridBookWalkLimits.ts` | Comment-only; constant **15** unchanged. | | Docs / skills | Informational cross-links and benchmark table. | Prior security properties (park cap, scan-step budget, owner-only cancel, pause gates, hint side validation) are unchanged and not weakened by this diff. **Security review: no medium+ findings on this diff.**
PlasticDigits commented 2026-06-05 10:55:52 +00:00 (Migrated from gitlab.com)

mentioned in commit c0d8ad6c49

mentioned in commit c0d8ad6c498756ef6b685bb726b04ab86f42effe
PlasticDigits (Migrated from gitlab.com) merged commit c0d8ad6c49 into main 2026-06-05 10:55:52 +00:00
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!794
No description provided.