Skip to content

Comments

Reset KYC level for users with expired AML and no reactivation#3095

Merged
TaprootFreak merged 2 commits intodevelopfrom
fix/reset-expired-aml-kyc-level
Jan 31, 2026
Merged

Reset KYC level for users with expired AML and no reactivation#3095
TaprootFreak merged 2 commits intodevelopfrom
fix/reset-expired-aml-kyc-level

Conversation

@TaprootFreak
Copy link
Collaborator

@TaprootFreak TaprootFreak commented Jan 31, 2026

Summary

  • Adds migration to reset KycLevel from 30+ to 20 for users with expired AML verification
  • Affects 318 users who have amlListExpiredDate set but no amlListReactivatedDate and no DfxApproval after expiry
  • Excludes 43 users who have a completed DfxApproval after their expiry date (they legitimately re-verified)

Background

Analysis found 361 users with:

  • kycLevel >= 30
  • amlListExpiredDate IS NOT NULL
  • amlListReactivatedDate IS NULL

Of these:

  • 43 users have a completed DfxApproval in kyc_step after their amlListExpiredDate → these users legitimately re-verified and should keep their KycLevel (the missing amlListReactivatedDate is a separate bug)
  • 318 users have no reactivation at all → these should have KycLevel reset to 20

Changes

  • migration/1769200000000-ResetExpiredAmlKycLevel.js: Sets KycLevel to 20 for affected users, excluding those with DfxApproval after expiry

Test plan

  • Verify query returns 318 users
  • Run migration on staging
  • Verify KycLevel is set to 20 for all 318 affected users
  • Verify 43 users with DfxApproval after expiry are NOT affected

Users with KycLevel >= 30 who have amlListExpiredDate set but no
amlListReactivatedDate should not have elevated KYC levels, as their
AML verification has expired and was never renewed.

This migration sets their KycLevel back to 20 (basic level).

Affected users: 359
Users who have a completed DfxApproval after their amlListExpiredDate
have legitimately re-verified - they should keep their KycLevel.

The amlListReactivatedDate not being set is a separate bug to fix.

Updated counts:
- Total with expired AML, no reactivation date: 361
- Excluded (have DfxApproval after expiry): 43
- Affected by this migration: 318
@TaprootFreak TaprootFreak marked this pull request as ready for review January 31, 2026 20:15
@TaprootFreak TaprootFreak merged commit 3679e2f into develop Jan 31, 2026
7 checks passed
@TaprootFreak TaprootFreak deleted the fix/reset-expired-aml-kyc-level branch January 31, 2026 20:15
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.

1 participant