Skip to content

feat: add sanctions and velocity compliance checks#80

Merged
anonfedora merged 2 commits intoFracverse:masterfrom
CMI-James-OD:compliance-velocity-sanctions-69
Feb 25, 2026
Merged

feat: add sanctions and velocity compliance checks#80
anonfedora merged 2 commits intoFracverse:masterfrom
CMI-James-OD:compliance-velocity-sanctions-69

Conversation

@CMI-James
Copy link
Contributor

Description
Added sanctions screening and rolling 24h velocity checks to payments, transfers, and withdrawals so
compliance violations fail fast.

Closes #69

Changes proposed
What were you told to do?

  • Build sanctions screening + velocity guard that rejects flagged accounts and over-limit volumes.
  • Prevent payments/withdrawals/transfers from progressing if compliance checks fail.
  • Track each user’s 24h volume via Redis sorted set and throw 403 when exceeding $1k.

What did I do?

  • Implemented parsing amount to stroops, Redis sorted-set maintenance, and total calculation with
    ApiError feedback in server/src/services/compliance.service.ts.
  • Hooked compliance guard into payment creation, transfer, and anchor withdrawal flows so userId
    sanctions/velocity are verified before transaction construction.
  • Ensured requests surface 403 errors on violations by throwing ApiError and left logging for
    failure reasons.

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

@CMI-James
Copy link
Contributor Author

@anonfedora
kindly review

@CMI-James
Copy link
Contributor Author

@anonfedora conflict resolved

@anonfedora anonfedora merged commit 20f841a into Fracverse:master Feb 25, 2026
3 checks passed
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.

[COMPLIANCE] Sanctions & Velocity Controls

2 participants