Skip to content

docs(security): document emergency-withdraw timelock and nonce model#1801

Closed
designartvis wants to merge 1 commit into
QuickLendX:mainfrom
designartvis:docs/emergency-withdraw
Closed

docs(security): document emergency-withdraw timelock and nonce model#1801
designartvis wants to merge 1 commit into
QuickLendX:mainfrom
designartvis:docs/emergency-withdraw

Conversation

@designartvis

Copy link
Copy Markdown

Closes #1725

Description

Documents the emergency-withdraw timelock, expiration window, nonce cancellation model, rejection conditions, and operator runbook for QuickLendX contracts.

Type of Change

  • Documentation update
  • Security enhancement

Changes Made

Files Modified

  • quicklendx-contracts/README.md

New Files Added

  • quicklendx-contracts/docs/EMERGENCY_WITHDRAW.md

Key Changes

  • documented the initiate -> unlock -> execute / expire / cancel state machine
  • documented when execute rejects for missing, cancelled, locked, expired, and insufficient-surplus states
  • documented the single pending slot, monotonic nonce, cancellation marker, and public helper entrypoints
  • added an operator runbook using get_pending_emergency_withdraw, emg_time_until_unlock, emg_time_until_expire, and can_exec_emergency

Testing

  • No breaking changes introduced
  • Documentation updated if needed
  • No sensitive data exposed
  • Unit tests pass
  • Integration tests pass

Test Coverage

  • Ran: git diff --check -- quicklendx-contracts/README.md quicklendx-contracts/docs/EMERGENCY_WITHDRAW.md
  • Not run: cargo is unavailable in this local environment (cargo command not found)

Related Issues

Closes #1725

Additional Notes

This is a docs-only change. Function names and rejection paths were checked against src/lib.rs, src/emergency.rs, src/errors.rs, and src/events.rs.

@Baskarayelu

Copy link
Copy Markdown
Contributor

thanks for the contribution! our workflow only merges a PR when its author is assigned to the linked issue — please get assigned to an open issue first, then raise the PR. closing as invalid for now 🙏

@Baskarayelu Baskarayelu closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the emergency-withdraw timelock and nonce-cancellation model in docs/EMERGENCY_WITHDRAW.md

2 participants