Core — Smart Contract Use Cases

Derived from FSD Use Cases (v0 — expand when Doc05 Excel exists)

A. Document controlA. Kiểm soát tài liệu

Doc IDCPG-UC-CPG-Core_UC_SmartContract
VersionPhiên bản1.0
StatusTrạng tháiDraft
OwnerCPG BA / Architecture
AudienceĐối tượngBA, QA, Product, Frontend, Backend
ClassificationPhân loạiInternal
Effective dateNgày hiệu lực01/12/2026
Related docs Core SmartContract TC · CPG-Core_FSD_SmartContract

B. Version historyB. Lịch sử phiên bản

Version Date Author ChangesThay đổi
1.0 01/12/2026 Khoa Trinh Version 1.0

C. Table of contentsC. Mục lục

D. ContentD. Nội dung

Catalog

UC ID Name Linked TC count Categories
UC-REF-01 Deposit REGISTERED/PENDING; refundWallet \= KYC whitelist 1 Function
UC-PAUSE-01 Critical issue; \~100k clones 1 Function
UC-RESCUE-01 Unsupported token balance on clone 1 Function
UC-GOV-01 Need new beneficiary 1 Function
UC-FLUSH-01 VA paused 1 Function
UC-SETTLE-01 FW paused 1 Function
UC-NEG-01 Existing depositId 1 Function
UC-REF-02 source tagged exchange 1 Function
UC-PAUSE-02 Single VA or FW clone 1 Function
UC-GOV-02 Need new refund wallet 1 Function
UC-NEG-02 Token not allowlisted 1 Function
UC-REF-03 Refund ticket open 1 Function
UC-NEG-03 VA paused 1 Function

Use cases

UC-REF-01 — Deposit REGISTERED/PENDING; refundWallet \= KYC whitelist

  • Actor: Operator + Compliance
  • Goal: Deposit REGISTERED/PENDING; refundWallet \= KYC whitelist
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — Deposit REGISTERED/PENDING; refundWallet \= KYC whitelist (Function)

Representative main flow

Approve; refund(id, false)

Expected outcome

DepositRefunded to whitelist; status REFUNDED

Failure

Wrong wallet → fix via approved setRefundWallet first

UC-PAUSE-01 — Critical issue; \~100k clones

  • Actor: Incident responder
  • Goal: Critical issue; \~100k clones
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — Critical issue; \~100k clones (Function)

Representative main flow

Trigger factory/orchestrated pause

Expected outcome

Fund-moving calls stop ≤5 min

Failure

Per-clone-only today may miss SLO: gap

UC-RESCUE-01 — Unsupported token balance on clone

  • Actor: Approvers + privileged role
  • Goal: Unsupported token balance on clone
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — Unsupported token balance on clone (Function)

Representative main flow

Dual approve; rescueToken

Expected outcome

Tokens recovered to approved to

Failure

Not available until Planned API ships

UC-GOV-01 — Need new beneficiary

  • Actor: FW signers
  • Goal: Need new beneficiary
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — Need new beneficiary (Function)

Representative main flow

propose(SET_BENEFICIARY); second approve

Expected outcome

BeneficiaryUpdated

Failure

1 signer only → not executed

UC-FLUSH-01 — VA paused

  • Actor: Operator
  • Goal: VA paused
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — VA paused (Function)

Representative main flow

Call flush

Expected outcome

Revert (paused)

Failure

—

UC-SETTLE-01 — FW paused

  • Actor: Settlement manager
  • Goal: FW paused
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — FW paused (Function)

Representative main flow

Call settleBatch

Expected outcome

Revert (paused)

Failure

cancelTransaction still works

UC-NEG-01 — Existing depositId

  • Actor: Operator
  • Goal: Existing depositId
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-001 — Existing depositId (Function)

Representative main flow

registerDeposit same id

Expected outcome

DuplicateDeposit

Failure

—

UC-REF-02 — source tagged exchange

  • Actor: Operator + Compliance
  • Goal: source tagged exchange
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-002 — source tagged exchange (Function)

Representative main flow

Reject toSource=true; refund(id, false)

Expected outcome

Funds to refundWallet only

Failure

If toSource=true broadcast: policy breach (on-chain still allows today)

UC-PAUSE-02 — Single VA or FW clone

  • Actor: Admin / FW signers
  • Goal: Single VA or FW clone
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-002 — Single VA or FW clone (Function)

Representative main flow

VA pause() or FW SET_PAUSED

Expected outcome

That clone lifecycle blocked per §3.3

Failure

FW needs 2 signers

UC-GOV-02 — Need new refund wallet

  • Actor: VA admins (target)
  • Goal: Need new refund wallet
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-002 — Need new refund wallet (Function)

Representative main flow

≥2 approvals then update

Expected outcome

RefundWalletUpdated

UC-NEG-02 — Token not allowlisted

  • Actor: Operator
  • Goal: Token not allowlisted
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-002 — Token not allowlisted (Function)

Representative main flow

registerDeposit

Expected outcome

TokenNotSupported

Failure

—

UC-REF-03 — Refund ticket open

  • Actor: Dual approvers + Operator
  • Goal: Refund ticket open
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-003 — Refund ticket open (Function)

Representative main flow

Approver A+B; then OPERATOR tx

Expected outcome

Audit trail + on-chain event

Failure

Missing approval → no broadcast

UC-NEG-03 — VA paused

  • Actor: Operator
  • Goal: VA paused
  • Source: Derived from FSD CPG-Core_FSD_SmartContract

Linked test cases

  • SC-003 — VA paused (Function)

Representative main flow

refund

Expected outcome

Revert (paused)

Failure

—

E. ReferencesE. Tham chiếu