Skip to content

feat(transactions): enforce KYC tier transaction limits#364

Open
No-bodyq wants to merge 2 commits into
Nexacore-Org:mainfrom
No-bodyq:issue-308-kyc-tier-limits
Open

feat(transactions): enforce KYC tier transaction limits#364
No-bodyq wants to merge 2 commits into
Nexacore-Org:mainfrom
No-bodyq:issue-308-kyc-tier-limits

Conversation

@No-bodyq
Copy link
Copy Markdown
Contributor

Description

  • add UserKycTier model and persisted kycTier on users
    • add DB-backed transaction_limits configuration per KYC tier
    • seed default tier limits in migration
    • add TransactionLimitService with DB SUM aggregation and USD normalization
    • enforce limit checks before deposit, withdrawal, and swap creation
    • return 422 with DAILY_LIMIT_EXCEEDED / MONTHLY_LIMIT_EXCEEDED / SINGLE_TX_LIMIT_EXCEEDED and remainingAllowance
    • add admin CRUD endpoints for tier limits:
    • GET /admin/transaction-limits
    • POST /admin/transaction-limits
    • PATCH /admin/transaction-limits/:tier
    • add user endpoint GET /users/me/transaction-limits
    • set user kycTier during KYC approval based on submitted documents

Related Issue

Closes #308

Type of Change

  • New feature
  • - [x] Test

Testing Steps

  • npm test -- --runInBand
    • result: 35 suites passed, 202 tests passed

Checklist

  • code follows project standards
  • - [x] self-review completed
  • - [x] tests pass locally

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@No-bodyq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Wave 200pts] Implement KYC tier-based transaction limits — daily/monthly caps enforced at transaction creation with admin config

1 participant