Skip to content

Feat/fraud detection system#305

Merged
Smartdevs17 merged 3 commits intoSmartdevs17:mainfrom
shaaibu7:feat/fraud-detection-system
Apr 29, 2026
Merged

Feat/fraud detection system#305
Smartdevs17 merged 3 commits intoSmartdevs17:mainfrom
shaaibu7:feat/fraud-detection-system

Conversation

@shaaibu7
Copy link
Copy Markdown
Contributor

@shaaibu7 shaaibu7 commented Apr 24, 2026

Implement subscription fraud detection system

Summary

This PR adds a fraud detection workflow for subscription services, covering backend scoring primitives and a mobile fraud operations UI.

What Changed

  • Added a new Soroban fraud contract in contracts/fraud
  • Implemented multi-signal risk scoring:
    • velocity checks for rapid subscription creation
    • anomalous usage pattern detection
    • chargeback prediction
  • Added fraud actions:
    • approve
    • flag
    • block
  • Added manual review case support and fraud report generation
  • Added shared fraud types to the contract type crate
  • Added a persistent fraud store for the React Native app
  • Added a dedicated Fraud Dashboard screen
  • Wired the Fraud Dashboard into app navigation and Settings

UI / UX

  • New fraud dashboard shows:
    • total checks
    • blocked / flagged counts
    • average risk
    • velocity, anomaly, and chargeback alerts
    • manual review queue
    • merchant-level fraud analytics
    • top-risk subscriptions
  • Added controls for:
    • approve
    • flag
    • block
    • recalculating fraud signals

Backend Notes

  • Added a new contract workspace member for fraud detection
  • Fixed the contracts workspace manifest so the new crate compiles cleanly
  • Fraud reporting is exposed through:
    • assess_risk(subscriber)
    • flag_subscription(subscription_id)
    • get_fraud_report(merchant_id)

Testing

  • cargo test --manifest-path fraud/Cargo.toml --no-run passed
  • Added store-level test coverage for fraud queue and review actions

Notes

  • jest is not installed in this environment, so the new React Native test could not be executed locally here
  • tsc --noEmit is currently blocked by existing repository-wide dependency/type issues outside this feature

closes #194

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 24, 2026

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

@Smartdevs17
Copy link
Copy Markdown
Owner

⚠️ Merge conflicts detected

Hi @shaaibu7,

This PR has merge conflicts that must be resolved before it can be merged.

To fix:

  1. Sync with the latest main branch: git fetch origin && git merge origin/main
  2. Resolve the conflicts in your code
  3. Push the resolved changes

Once resolved, the PR will be automatically merged on the next run.


🤖 Drips Wave Review Agent

@shaaibu7
Copy link
Copy Markdown
Contributor Author

@Smartdevs17 conflicts resolved

@Smartdevs17 Smartdevs17 merged commit b41117c into Smartdevs17:main Apr 29, 2026
7 of 21 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 subscription fraud detection system

2 participants