Skip to content

feat(fraud): implement AI-assisted fraud detection for campaign listings - #1304

Open
devogechukwu wants to merge 1 commit into
Fundable-Protocol:mainfrom
devogechukwu:feat/ai-fraud-detection-listing
Open

devogechukwu wants to merge 1 commit into
Fundable-Protocol:mainfrom
devogechukwu:feat/ai-fraud-detection-listing

Conversation

@devogechukwu

Copy link
Copy Markdown

Summary of Changes

Implements AI-assisted fraud detection for campaign listings before they go live, satisfying all acceptance criteria:

  1. Automated Review on Campaign Publish:

    • Evaluates campaign metadata, duration, tree targets, and textual risk indicators upon submission (POST /api/campaigns).
    • Restricts campaign listing activation (PATCH /api/campaigns/[id]) if flagged until manual admin review is completed.
  2. Manual Review Queue:

    • Added in-memory queue management for flagged listings with risk scores and evidence flags.
    • Added endpoints:
      • GET /api/admin/fraud/review-queue: view and filter pending/reviewed items.
      • POST /api/admin/fraud/review-queue/[id]/decision: approve or reject campaigns with admin audit logging.
  3. False Positive Rate Monitoring & Quarterly Model Retraining:

    • Tracks evaluations, flagged count, approved count (false positives), rejected count (true positives), and calculates falsePositiveRate.
    • Implements 90-day quarterly retraining interval checks (isQuarterlyRetrainingDue) and versioned retraining logs (retrainModel).
    • Added endpoints:
      • GET /api/admin/fraud/metrics: view live model metrics and retraining due status.
      • POST /api/admin/fraud/retrain: trigger scheduled or manual model retraining.
  4. Tests:

    • Unit tests for automated listing review, manual review queue, false positive rate calculation, and quarterly retraining.
    • API route tests for campaign publishing and admin fraud review endpoints.

Closes #1263

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@devogechukwu 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

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 14b9ff6d-341d-4f03-943f-5b028b722d8f
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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 AI-assisted fraud detection for campaign listings

1 participant