Skip to main content
Challenge

Low-Latency Payment Routing and Fraud Risk Engine with Mastra AI

Modern payment orchestrators face strict sub-100ms latency budgets while routing cross-border payments through optimal processing rails. Build an intelligent real-time payment routing and fraud risk decision engine using Mastra AI and BentoML, maintaining under 80ms P99 latency while reducing transaction failure rates by 25%.

CybersecurityHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Deploy a high-performance microservice architecture pairing Mastra AI agent workflows with BentoML model serving to calculate real-time route quality and risk scores dynamically.

Delivery guide

How work is evaluated

Evaluation

Evaluates P99 pipeline execution latency and optimal payment rail selection.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

Latency SLA Test

P99 latency must remain under 80ms across 1,000 requests.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

routing_efficiency

Cost optimization ratio relative to default routing • target: 0.25 • range: 0.15-0.5

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Construct Mastra AI workflow graphs for condition-based payment path evaluation

  • Serve low-latency fraud risk classifiers using BentoML model runners

  • Implement real-time fallback routing logic under network degradation constraints

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic multi-processor routing telemetry dataset detailing transaction success rates, latencies, and interchange fees.

Challenge setup

Evaluates P99 pipeline execution latency and optimal payment rail selection.

Challenge input

JSON payment request with source currency, target currency, amount, and card network

Mastra AI

Assigned agent framework for TypeScript workflows.

BentoML

Assigned high-performance model serving framework.

Evaluated output

JSON route decision with selected processor, fee estimate, and processing time (ms)

Evaluation checks
  • P99 latency must remain under 80ms across 1,000 requests.
  • Cost optimization ratio relative to default routing • target: 0.25 • range: 0.15-0.5
Configured evaluation evidence
  • Benchmark: PayRoute-Bench
  • Routing Efficiency target: 0.25
  • 1 public reference case
Configured runtime
  • Docker execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Mastra AI · Required
  • BentoML · Optional
  • BentoML Cloud · Optional
Orchestration
  • Mastra AI · Required

Evaluation contract

  • Latency SLA Test · Weight 1
  • routing_efficiency · Weight 1

Metrics

  • routing_efficiency · Target 0.25

Benchmarks

  • PayRoute-Bench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON payment request with source currency, target currency, amount, and card network

    Output: JSON route decision with selected processor, fee estimate, and processing time (ms)

    Execution harness: Docker

Evaluation tools

  • Mastra AI · Workflow Engine
  • BentoML · Model Inference Serving

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Low-Latency Payment Routing and Fraud Risk Engine with Mastra AI