QA: Limit orders (hybrid AMM + FIFO book) #42
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#42
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?
/cc @brouie
QA focus: hybrid AMM + FIFO limit book (Pattern C splits,
max_maker_fills, insert hints). Reference:docs/limit-orders.mdonmain(commit after merge).Deploy / env
ROUTER_ADDRESSset when testing estimated output fromGET /api/v1/route/solve?amount_in=...Pair — limit placement
PlaceLimitOrderescrows token1; order appears in bid list with correctprice(token1 per token0)order_id) matches before newerhint_after_order_id+max_adjust_steps, placement succeeds; stale hint fails clearly or within step bound (product rule)CancelLimitOrderrefunds remaining escrow; head/list consistency via queriesLimitOrder/OrderBookHeadPair — hybrid swap (CW20 hook
Swap+hybrid)pool_input + book_inputequals send amount; wrong sum reverts (HybridSplitMismatch/ documented error)max_maker_fills: with deep book, swap stops after N distinct makers; remainder behavior matches docs (book then pool leg)book_start_hint: optional match hint behaves as documented (bounded walk)hybrid: null/ omitted — behavior matches pre-limit-order swaps (hooks,max_spread, fee discount)book_return_amount,pool_return_amount,limit_book_offer_consumedwhen relevantRouter — multihop
hybridonTerraSwap(or omit for pool-only)traderfor fee discount still applies discount where expectedsimulate_swap_operationson router matches execution for pool-only path (hybrid simulation limits documented indocs/limit-orders.md)Indexer
GET /api/v1/route/solve?token_in=&token_out=returns a path when one exists (≤4 hops),router_operationswithhybrid: nullamount_in+ROUTER_ADDRESS,estimated_amount_outpopulated when LCD/router query succeedsRegression
assigned to @Brouie
Initial review after pull:
Dev security push pulled. 14/14 limit order contract tests pass (up from 4). 283/283 total contract tests (no regressions). New coverage: FIFO ordering, cancel non-owner rejection, split mismatch, max_maker_fills=0, pause guard, router hybrid forwarding, insert steps exceeded. Still need DEX stack for integration + frontend checklist items.
Contract-level checklist verification (from 14/14 tests, no frontend needed):
Remaining (need DEX stack):
Additional contract-level verification:
Remaining (need DEX stack):
Remaining 3 items need deployed contracts but wasm32 target isn't installed on QA server. Can't build/deploy. Need wasm target installed or pre-built artifacts to continue. Blocked items: tx attributes, indexer route/solve, wasm version match.
Remaining 3 items verified:
19/19 checklist complete. Note: ROUTER_ADDRESS was missing from indexer .env — had to add manually. Deploy script should auto-set it.
mentioned in commit
5cae46b5af/cc @brouie
Pushed
5cae46b:scripts/deploy-dex-local.shnow writesROUTER_ADDRESSintoindexer/.envalongsideFACTORY_ADDRESS/FEE_DISCOUNT_ADDRESS, so QA local deploy picks up router simulation forGET /api/v1/route/solve?amount_in=...(estimated_amount_out) without manual env edits.Can you verify the Indexer checkbox on #42 after a fresh local deploy?
verified -- placed bid limit order on EMBER/CORAL pair. tx submitted successfully, indexer picked it up: 'order #1 - bid - 1 - 2026-04-01T05:53:11'. place + cancel UI renders. indexer integration working.
minor UI issue: submitted tx hash overflows its green container box -- text not truncated or wrapped.
mentioned in issue #43