docs: pause freezes user escrow retrieval with no governance force-refund path [SEC-I03] (F-03) #457
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#457
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?
Summary
By design, pausing a pair also blocks
CancelLimitOrder,CancelLimitOrders,ClaimExpiredLimitOrder, andClaimExpiredLimitOrders. Users with resting or expiry-parked limit orders cannot retrieve escrowed funds for the duration of the pause. Governance hasSweepPairfor excess balances but no mechanism to force-refund outstanding limit order escrow to individual depositors. This is a documented design choice but creates a user protection concern during prolonged pauses that is not currently surfaced in operator runbooks.What Was Checked
smartcontracts/contracts/pair/src/contract.rslines 593-594:assert_not_pausedcalled beforeReceivedispatch.smartcontracts/contracts/pair/src/contract.rslines 640-678:CancelLimitOrder,CancelLimitOrders,ClaimExpiredLimitOrder,ClaimExpiredLimitOrdersall guarded byassert_not_paused.docs/runbooks/emergency-commands.md: pause runbook does not mention the escrow retrieval freeze or the absence of a force-refund path.Expected (per checklist)
Operator runbooks document that pausing a pair also locks all user limit order escrow, state how long a pause is expected to last, and describe what options governance has (none currently for per-user escrow refund). If prolonged pauses are anticipated, consider whether a governance-callable emergency force-refund path is warranted.
Actual
The escrow freeze consequence of pair pause is not mentioned in
docs/runbooks/emergency-commands.mdor any other operator-facing runbook. An operator pausing a pair under time pressure may not be aware that users with limit orders lose access to their funds for the duration.Suggested Fix
Add a note to the "Pause a pair" section of
docs/runbooks/emergency-commands.mdstating: pausing a pair also blocks all limit order cancel and claim operations for the duration. Users with resting or expired limit orders cannot retrieve escrowed funds while the pair is paused. Governance has no force-refund path for individual limit order escrow;SweepPaironly affects excess balances. If the team decides to add a governance-callable emergency force-refund path, open a separate implementation issue.Verification Checklist
docs/runbooks/emergency-commands.md"Pause a pair" section notes that limit order cancel and claim are also blocked during pauseCc: @PlasticDigits
mentioned in issue #452
mentioned in issue #381
mentioned in merge request !986
Added the runbook note. The "Pause a pair" section in
emergency-commands.mdalready listed that cancel/claim are blocked, but didn't surface the user-protection consequence: pausing freezes all resting/expiry-parked limit-order escrow for the duration, and there's no governance force-refund path (SweepPair only moves excess balance, not a depositor's locked order).New callout in that section:
check_emergency_commands_docs.pypasses. Covers checklist items 1 and 2; item 3 (the force-refund path itself) stays a separate decision/implementation issue if you want it.MR !986, branch
qa/457-pause-escrow-docs, commit62209b1f. Needs review/merge @PlasticDigits — leaving open for verification.mentioned in commit
a1d92b622aVerification — #457 (SEC-I03 F-03)
Result: PASS — all acceptance criteria satisfied on
mainvia merged MR !986 (62209b1f).Checklist
docs/runbooks/emergency-commands.md§1 callout (lines 136–141): blocksCancelLimitOrder(s)andClaimExpiredLimitOrder(s); section intro lists "limit placement/cancel/claim"SweepPaironly moves excess balance, not locked order escrowHow verified
make check-emergency-commands-docs→OK: emergency-commands cookbook covers SEC-B11 operations, SEC-G07 unpause prerequisite checklist, and is cross-linkeddocs/runbooks/emergency-commands.md§1 — user-escrow consequence callout links #457 and user incident FAQsmartcontracts/contracts/pair/src/contract.rs—assert_not_pausedbeforeReceive(L593),CancelLimitOrder/CancelLimitOrders(L640, L650),ClaimExpiredLimitOrder/ClaimExpiredLimitOrders(L660, L670);execute_set_pauseddocstring (L1962–L1965) documents resting escrow freeze until unpausemain; no additional repo changes requiredFollow-ups (optional)
If prolonged pauses become an operational pattern, consider a dedicated implementation issue for a governance-callable emergency per-order escrow refund (as noted in the runbook callout).