Skip to content

feat: #416 Implement Fraud Detection#476

Merged
LaGodxy merged 1 commit into
MettaChain:mainfrom
Chinonso-Peter:main
Apr 24, 2026
Merged

feat: #416 Implement Fraud Detection#476
LaGodxy merged 1 commit into
MettaChain:mainfrom
Chinonso-Peter:main

Conversation

@Chinonso-Peter
Copy link
Copy Markdown
Contributor

Implemented #416 end to end.

The backend now has a dedicated fraud subsystem centered in src/fraud/fraud.service.ts (line 1) with new Prisma models and a migration in prisma/schema.prisma (line 1) and migration.sql (line 1). It persists fraud alerts and investigation notes, detects patterns like excessive failed logins, shared IPs across accounts, multiple IPs on one account, new-device logins, token reuse, rapid listing bursts, duplicate property addresses, and high-value listings from very new accounts, and sends alert emails when FRAUD_ALERT_RECIPIENTS is configured.

Admin investigation tooling is wired through src/admin/admin.controller.ts (line 1) and src/admin/admin.service.ts (line 1): list alerts, summary view, alert details, review/update status, add notes, block a user from an alert, and manually scan users or properties. Enforcement is hooked into src/auth/auth.service.ts (line 1) and src/properties/properties.service.ts (line 1), so suspicious auth/property activity creates alerts automatically, and critical cases like token reuse can auto-block the

closes #416

@Chinonso-Peter
Copy link
Copy Markdown
Contributor Author

@LaGodxy please review

@LaGodxy LaGodxy merged commit d848291 into MettaChain:main Apr 24, 2026
4 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.

Implement Fraud Detection

2 participants