Security upgrade: incident-driven CW20 protections and wallet security portal #3

Open
opened 2026-10-31 01:57:04 +00:00 by PlasticDigits · 2 comments
Owner

Coordinate all six requested token protections, a public Rust/TypeScript/PostgreSQL portal deployed to Coolify, incident research and independent review. Track dependency order, worker links, exact interfaces, defaults, migration coverage and rollout evidence.

Required acceptance

  • Per-wallet adjustable default rate limits, delayed relaxation/opt-out; opt-in transfer locks and delayed unlock.
  • One shared controller call pauses every enrolled upgraded token, including delegated debit paths.
  • Blacklist and independent pause-only automation role, governance unpause and delayed key rotation.
  • Governance-only asset recovery with >=30-day delay, usable while blacklisted/paused, evidence and dispute controls.
  • Multiple verified assigned wallets, delayed changes, email/Telegram timer-start notifications with deduplication.
  • Public portal repository, Rust API + TypeScript UI + PostgreSQL and verified Coolify deployment.
  • Incident and CEX/bank/DeFi ownership-verification research published; independent adversarial review and migration plan.

Implementation architecture: shared controller state is queried at token execution time, avoiding unbounded fleet message fanout. Existing contracts gain enforcement only after authorized migration. Inventory immutable/third-party-admin contracts and disclose uncovered assets. No global-pause claim for unmigrated contracts or native coins.

Working rules

User authorizes implementation and worker coordination. Trusted CL8Y governance is an explicit trust assumption; separate containment, unpause, recovery authorization, execution and key rotation. No social account alone establishes asset ownership. Never publish PII, secrets or private incident operations. Work in small reviewable increments, with bounded focused security tests; no broad soak runs or very long scripts. Publish commits/PRs and factual evidence. Keep acceptance open until actually met; source success does not establish live deployment. No automatic closing keywords in PR descriptions before full acceptance.

Tracked work and worker ownership

Work Issue Worker Dependency / order
Shared security controller: fleet pause, blacklist, least-privilege responders and key rotation cw20-mintable #4 thr_n4vtxxfcb7 Versioned shared interface first; controller and wallet internals can then progress independently.
Wallet rate limits, delayed security changes and opt-in transfer locks cw20-mintable #5 thr_n4vtxxfcb7 Controller ABI before global guard integration; local wallet state may proceed independently.
Timelocked multisig asset recovery during pause and blacklist with dispute controls cw20-mintable #6 thr_n4vtxxfcb7 Controller authority and wallet reservation state stable first; research informs adjudication before release.
Migration, protocol compatibility and independent security review of token fleet cw20-mintable #7 thr_n4vtxxfcb7 Controller, wallet and recovery implementation, followed by independent review of pinned artifacts; deploy reviewed controller before migrating verified token inventory.
Rust/PostgreSQL wallet security service: signed identity, delayed assignments and chain reconciliation cl8y-wallet-security #1 thr_wur9hgwhec Independent foundation now; publish API types early. Integrate actual contract ABI once stable.
TypeScript security dashboard: verified wallets, settings, timers and recovery visibility cl8y-wallet-security #2 thr_wur9hgwhec API types before final integration; scaffold alongside backend. Real on-chain signing follows stable contract ABI.
Email and Telegram warnings on security timer starts with deduplication and low-noise delivery cl8y-wallet-security #3 thr_wur9hgwhec Backend schema and finalized chain-event types before durable outbox integration. Parallel with frontend after foundation.
Coolify deployment: Rust API, TypeScript web, PostgreSQL and notification worker cl8y-wallet-security #4 thr_wur9hgwhec Deployable backend/UI, private PostgreSQL and independent auth/deployment review; enable contract/notification features only with verified live prerequisites.
Research: October wallet-compromise incident, rescued funds, ownership verification and further defenses cw20-mintable #8 thr_q67g8guhi6 Independent immediately; send early adjudication requirements to contract and portal leads.

Initial defaults for implementation evaluation

Setting Proposed default Weakening rule
Wallet outgoing rate 10% protected opening balance per rolling 24h 24h old-delay minimum before relaxation or opt-out; no inbound/settings reset bypass
Security/assignment changes 24h delay Existing delay governs shortening; replacement restarts
Transfer lock Opt-in only; 48h unlock delay Existing delay governs shortening; relock/cancel safe
Authority activation/rotation 48h proposal and candidate acceptance Immediate compromised responder revocation; privilege activation delayed
Asset recovery At least 30 days No early execution or administrative/user timer bypass

Rate-limit defaults are engineering targets subject to documented protocol compatibility analysis, not already deployed policy. No implicit exemption for every contract/minter. Protocol exemptions require explicit reviewed governance action and delayed changes. Containment remains distinct from recovery authorization; guardian/recovery-wallet assignments require separate proofs and old-delay handling. A compromised signing key or social account cannot become sufficient proof of historical rightful ownership.

Current execution status

Updated 2026-11-01 after resumed coordination. Contract source PR14, research PR13, and the independently reviewed portal/provider/backup source are merged. Contracts have 91 source tests, separate independent reviews, target-compatible optimized artifacts and actual local-Wasm evidence. On-chain security-v1 coverage remains 0/35; source completion is not live activation.

The Rust/TypeScript/PostgreSQL portal is live at https://security.cl8y.com, running immutable application source 4fbe039 / schema6. The API and advancing worker are healthy; email is enabled for opted-in users after an actual three-message owned verification/timer/contact-change trial. The temporary receiver and its token are retired; the normal sender remains enabled, nonadmin and restricted to the verified gateway source IP. Final email evidence, runtime evidence.

Encrypted offhost capture/readback/anonymous-denial and fresh-vault offline restore are verified, including all three SMTP sent/first-attempt rows, full timers/contact/event/outbox metadata and scratch authentication invalidation. Backup evidence. Native daily script automation auto_cqn_6q-vhlg is enabled at 03:20 UTC after an independently accepted native-context run; credentials stay in the authorized operator process. This schedule depends on the BB/operator host, VPN and credentials. WG is currently active but not enabled for boot; reboot-safe availability and a <=24-hour RPO are not claimed (documented daily phase drift can reach 49 hours plus outage).

Remaining external activation capabilities: dedicated portal Telegram bot token/authorized creation identity and its reviewed egress activation; actual unlocked authorized governance quorum and verified separate role/issuer/protocol transition for token migration. No chain transaction or security-v1 token migration occurred. No user monitoring or secret-in-chat task is assigned. Parent thr_4rw76j9ker owns coordination; original implementation threads are completed/read-only and replacement reviewers handled the resumed work, avoiding concurrent resource writers.

Incident baseline

Source: case overview, findings, recovery follow-up. Unauthorized accepted signatures began October 15 UTC; mechanism unresolved. The reviewed flows did not identify a contract takeover/exploit. At recorded recovery snapshots: 10.154338 vFDUSD recovered; Penguin #1509 returned to designated recovery address; 25,452.503948354102807429 CL8Y paid from existing reserves as compensation, while attacker-held CL8Y remained blacklisted. Recovery custody does not establish final victim delivery. These are dated records, not current holdings. No actor/nation-state attribution inferred.

Proposed additional defenses from research #8

These separately scoped follow-ups are proposed additional work, distinct from the original mandatory acceptance above. Research delivery does not establish their implementation or close production acceptance.

Research report/source receipts: PR #13, research progress. Documentation publication does not establish production deployment.

Coordinate all six requested token protections, a public Rust/TypeScript/PostgreSQL portal deployed to Coolify, incident research and independent review. Track dependency order, worker links, exact interfaces, defaults, migration coverage and rollout evidence. ## Required acceptance - [ ] Per-wallet adjustable default rate limits, delayed relaxation/opt-out; opt-in transfer locks and delayed unlock. - [ ] One shared controller call pauses every enrolled upgraded token, including delegated debit paths. - [ ] Blacklist and independent pause-only automation role, governance unpause and delayed key rotation. - [ ] Governance-only asset recovery with >=30-day delay, usable while blacklisted/paused, evidence and dispute controls. - [ ] Multiple verified assigned wallets, delayed changes, email/Telegram timer-start notifications with deduplication. - [x] Public portal repository, Rust API + TypeScript UI + PostgreSQL and verified Coolify deployment. - [x] Incident and CEX/bank/DeFi ownership-verification research published; independent adversarial review and migration plan. Implementation architecture: shared controller state is queried at token execution time, avoiding unbounded fleet message fanout. Existing contracts gain enforcement only after authorized migration. Inventory immutable/third-party-admin contracts and disclose uncovered assets. No global-pause claim for unmigrated contracts or native coins. ## Working rules User authorizes implementation and worker coordination. Trusted CL8Y governance is an explicit trust assumption; separate containment, unpause, recovery authorization, execution and key rotation. No social account alone establishes asset ownership. Never publish PII, secrets or private incident operations. Work in small reviewable increments, with bounded focused security tests; no broad soak runs or very long scripts. Publish commits/PRs and factual evidence. Keep acceptance open until actually met; source success does not establish live deployment. No automatic closing keywords in PR descriptions before full acceptance. ## Tracked work and worker ownership | Work | Issue | Worker | Dependency / order | | --- | --- | --- | --- | | Shared security controller: fleet pause, blacklist, least-privilege responders and key rotation | [cw20-mintable #4](https://git.cl8y.com/code/cw20-mintable/issues/4) | `thr_n4vtxxfcb7` | Versioned shared interface first; controller and wallet internals can then progress independently. | | Wallet rate limits, delayed security changes and opt-in transfer locks | [cw20-mintable #5](https://git.cl8y.com/code/cw20-mintable/issues/5) | `thr_n4vtxxfcb7` | Controller ABI before global guard integration; local wallet state may proceed independently. | | Timelocked multisig asset recovery during pause and blacklist with dispute controls | [cw20-mintable #6](https://git.cl8y.com/code/cw20-mintable/issues/6) | `thr_n4vtxxfcb7` | Controller authority and wallet reservation state stable first; research informs adjudication before release. | | Migration, protocol compatibility and independent security review of token fleet | [cw20-mintable #7](https://git.cl8y.com/code/cw20-mintable/issues/7) | `thr_n4vtxxfcb7` | Controller, wallet and recovery implementation, followed by independent review of pinned artifacts; deploy reviewed controller before migrating verified token inventory. | | Rust/PostgreSQL wallet security service: signed identity, delayed assignments and chain reconciliation | [cl8y-wallet-security #1](https://git.cl8y.com/code/cl8y-wallet-security/issues/1) | `thr_wur9hgwhec` | Independent foundation now; publish API types early. Integrate actual contract ABI once stable. | | TypeScript security dashboard: verified wallets, settings, timers and recovery visibility | [cl8y-wallet-security #2](https://git.cl8y.com/code/cl8y-wallet-security/issues/2) | `thr_wur9hgwhec` | API types before final integration; scaffold alongside backend. Real on-chain signing follows stable contract ABI. | | Email and Telegram warnings on security timer starts with deduplication and low-noise delivery | [cl8y-wallet-security #3](https://git.cl8y.com/code/cl8y-wallet-security/issues/3) | `thr_wur9hgwhec` | Backend schema and finalized chain-event types before durable outbox integration. Parallel with frontend after foundation. | | Coolify deployment: Rust API, TypeScript web, PostgreSQL and notification worker | [cl8y-wallet-security #4](https://git.cl8y.com/code/cl8y-wallet-security/issues/4) | `thr_wur9hgwhec` | Deployable backend/UI, private PostgreSQL and independent auth/deployment review; enable contract/notification features only with verified live prerequisites. | | Research: October wallet-compromise incident, rescued funds, ownership verification and further defenses | [cw20-mintable #8](https://git.cl8y.com/code/cw20-mintable/issues/8) | `thr_q67g8guhi6` | Independent immediately; send early adjudication requirements to contract and portal leads. | ## Initial defaults for implementation evaluation | Setting | Proposed default | Weakening rule | | --- | --- | --- | | Wallet outgoing rate | 10% protected opening balance per rolling 24h | 24h old-delay minimum before relaxation or opt-out; no inbound/settings reset bypass | | Security/assignment changes | 24h delay | Existing delay governs shortening; replacement restarts | | Transfer lock | Opt-in only; 48h unlock delay | Existing delay governs shortening; relock/cancel safe | | Authority activation/rotation | 48h proposal and candidate acceptance | Immediate compromised responder revocation; privilege activation delayed | | Asset recovery | At least 30 days | No early execution or administrative/user timer bypass | Rate-limit defaults are engineering targets subject to documented protocol compatibility analysis, not already deployed policy. No implicit exemption for every contract/minter. Protocol exemptions require explicit reviewed governance action and delayed changes. Containment remains distinct from recovery authorization; guardian/recovery-wallet assignments require separate proofs and old-delay handling. A compromised signing key or social account cannot become sufficient proof of historical rightful ownership. ## Current execution status Updated 2026-11-01 after resumed coordination. Contract source [PR14](https://git.cl8y.com/code/cw20-mintable/pulls/14), research [PR13](https://git.cl8y.com/code/cw20-mintable/pulls/13), and the independently reviewed portal/provider/backup source are merged. Contracts have 91 source tests, separate independent reviews, target-compatible optimized artifacts and actual local-Wasm evidence. **On-chain security-v1 coverage remains 0/35**; source completion is not live activation. The Rust/TypeScript/PostgreSQL portal is live at https://security.cl8y.com, running immutable application source `4fbe039` / schema6. The API and advancing worker are healthy; email is enabled for opted-in users after an actual three-message owned verification/timer/contact-change trial. The temporary receiver and its token are retired; the normal sender remains enabled, nonadmin and restricted to the verified gateway source IP. [Final email evidence](https://git.cl8y.com/code/cl8y-wallet-security/pulls/16), [runtime evidence](https://git.cl8y.com/code/cl8y-wallet-security/pulls/19). Encrypted offhost capture/readback/anonymous-denial and fresh-vault offline restore are verified, including all three SMTP sent/first-attempt rows, full timers/contact/event/outbox metadata and scratch authentication invalidation. [Backup evidence](https://git.cl8y.com/code/cl8y-wallet-security/pulls/20). Native daily script automation `auto_cqn_6q-vhlg` is enabled at 03:20 UTC after an independently accepted native-context run; credentials stay in the authorized operator process. This schedule depends on the BB/operator host, VPN and credentials. WG is currently active but not enabled for boot; reboot-safe availability and a <=24-hour RPO are **not** claimed (documented daily phase drift can reach 49 hours plus outage). Remaining external activation capabilities: dedicated portal Telegram bot token/authorized creation identity and its reviewed egress activation; actual unlocked authorized governance quorum and verified separate role/issuer/protocol transition for token migration. No chain transaction or security-v1 token migration occurred. No user monitoring or secret-in-chat task is assigned. Parent `thr_4rw76j9ker` owns coordination; original implementation threads are completed/read-only and replacement reviewers handled the resumed work, avoiding concurrent resource writers. ## Incident baseline Source: [case overview](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/incidents/20261016_001/README.md), [findings](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/incidents/20261016_001/FINDINGS.md), [recovery follow-up](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/incidents/20261016_001/RECOVERY_UPDATE_20261018.md). Unauthorized accepted signatures began October 15 UTC; mechanism unresolved. The reviewed flows did not identify a contract takeover/exploit. At recorded recovery snapshots: 10.154338 vFDUSD recovered; Penguin #1509 returned to designated recovery address; 25,452.503948354102807429 CL8Y paid from existing reserves as compensation, while attacker-held CL8Y remained blacklisted. Recovery custody does not establish final victim delivery. These are dated records, not current holdings. No actor/nation-state attribution inferred. ## Proposed additional defenses from research #8 These separately scoped follow-ups are proposed additional work, distinct from the original mandatory acceptance above. Research delivery does not establish their implementation or close production acceptance. - [ ] [code/cl8y-wallet-security #6: Private recovery case evidence, independent adjudication and appeal workflow](https://git.cl8y.com/code/cl8y-wallet-security/issues/6) - [ ] [code/cl8y-wallet-security #7: Specify optional delayed first-use recipients with routed-transfer coverage](https://git.cl8y.com/code/cl8y-wallet-security/issues/7) - [ ] [code/cw20-mintable #9: Inventory expiring allowances and add scoped approval/revocation guidance](https://git.cl8y.com/code/cw20-mintable/issues/9) - [ ] [code/cw20-mintable #10: Specify exceptional bridge payout claim invalidation and prevent duplicate settlement](https://git.cl8y.com/code/cw20-mintable/issues/10) - [ ] [code/cw20-mintable #11: Evaluate native-asset spending wallet protection on Terra Classic](https://git.cl8y.com/code/cw20-mintable/issues/11) - [ ] [code/cw20-mintable #12: Publish reserve compensation and exchange escalation accounting runbook](https://git.cl8y.com/code/cw20-mintable/issues/12) Research report/source receipts: [PR #13](https://git.cl8y.com/code/cw20-mintable/pulls/13), [research progress](https://git.cl8y.com/code/cw20-mintable/issues/8). Documentation publication does not establish production deployment.
Author
Owner

Contract source milestone complete: PR14 merged as cccb89cb5f2f4f5bdddcbab930e0eca8ec20a3b6, reviewed head 8dc22d9, after independent controller/token reviews, 91 native tests, matching CosmWasm1.5.11 optimized-artifact checks, bounded actual-Wasm smoke and genuine required CI8 success. Final review: #14 (comment) . Research PR13 is merged and research issue8 closed. Portal/API/notification/deployment lead remains active. Whole original acceptance remains open: live security-v1 coverage0/35 inventoried code10184 contracts; no controller deployment or migration transaction has occurred. Actual remaining chain prerequisites are unlocked authorized governance quorum, separate verified role custody, issuer/governance separation where overlapping, full legacy backup and DEX/protocol code-pin/exemption transition. Draft artifacts are review candidates, not a live release. No extra builds or broad testing requested; future work proceeds on real changed state/capability.

Contract source milestone complete: PR14 merged as `cccb89cb5f2f4f5bdddcbab930e0eca8ec20a3b6`, reviewed head `8dc22d9`, after independent controller/token reviews, 91 native tests, matching CosmWasm1.5.11 optimized-artifact checks, bounded actual-Wasm smoke and genuine required CI8 success. Final review: https://git.cl8y.com/code/cw20-mintable/pulls/14#issuecomment-65428 . Research PR13 is merged and research issue8 closed. Portal/API/notification/deployment lead remains active. Whole original acceptance remains open: live security-v1 coverage0/35 inventoried code10184 contracts; no controller deployment or migration transaction has occurred. Actual remaining chain prerequisites are unlocked authorized governance quorum, separate verified role custody, issuer/governance separation where overlapping, full legacy backup and DEX/protocol code-pin/exemption transition. Draft artifacts are review candidates, not a live release. No extra builds or broad testing requested; future work proceeds on real changed state/capability.
Author
Owner

Portal milestone: https://security.cl8y.com is live; source PR5 merged at c07314ae53b6122fef667aa30de838b3a278f3d4. Running workload source e44569e45b15dbee4b0347dff742f92bd85bedb2, immutable OCI digest 07b476118ac7ca8a8af9653471026d02c0e615ace174231bd50aea06392b607e, separately reviewed configuration hook b8aa303154b25d3017816c258b0daeb8954b7b26. Parent independently read HTTPS /healthz and /api/v1/status: HTTP200, migration5, matching source/advancing worker, CSP/no-store/HSTS/nosniff/no-referrer; source PR and independent live/storage/owned-proof receipts are recorded in portal PR5/OpsPR8. Whole acceptance remains open. Contract source PR14/research PR13 are merged; on-chain security-v1 coverage remains0/35 pending authorized signing/role/protocol transition. Live delivery remains disabled: scoped Mailu sender enrollment is available and now provisioned DISABLED with TESTNET-only token, SMTP adapter PR9 under independent review; this is not unavailable email credentials or a delivery receipt. Provider worker thr_ywz2dcyd3p owns #3 continuation (gateway/verified egress, scoped enablement, owned delivery, independent Telegram provisioning); deployment worker thr_tj2burwn8b owns #4 continuation (offhost encrypted restore and contact-key custody proof), coordinated by lead thr_wur9hgwhec. Portal issues1–4 remain open for remaining factual acceptance, no real-recipient test messages or chain transactions performed.

Portal milestone: https://security.cl8y.com is live; source PR5 merged at `c07314ae53b6122fef667aa30de838b3a278f3d4`. Running workload source `e44569e45b15dbee4b0347dff742f92bd85bedb2`, immutable OCI digest `07b476118ac7ca8a8af9653471026d02c0e615ace174231bd50aea06392b607e`, separately reviewed configuration hook `b8aa303154b25d3017816c258b0daeb8954b7b26`. Parent independently read HTTPS /healthz and /api/v1/status: HTTP200, migration5, matching source/advancing worker, CSP/no-store/HSTS/nosniff/no-referrer; source PR and independent live/storage/owned-proof receipts are recorded in portal PR5/OpsPR8. Whole acceptance remains open. Contract source PR14/research PR13 are merged; on-chain security-v1 coverage remains0/35 pending authorized signing/role/protocol transition. Live delivery remains disabled: scoped Mailu sender enrollment is available and now provisioned DISABLED with TESTNET-only token, SMTP adapter PR9 under independent review; this is not unavailable email credentials or a delivery receipt. Provider worker `thr_ywz2dcyd3p` owns #3 continuation (gateway/verified egress, scoped enablement, owned delivery, independent Telegram provisioning); deployment worker `thr_tj2burwn8b` owns #4 continuation (offhost encrypted restore and contact-key custody proof), coordinated by lead `thr_wur9hgwhec`. Portal issues1–4 remain open for remaining factual acceptance, no real-recipient test messages or chain transactions performed.
Sign in to join this conversation.
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/cw20-mintable#3
No description provided.