Skip to content

Nollyn/AresNexus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ares-Nexus

Build Test Coverage Security Scan .NET Architecture Pattern Orchestration Compliance

Executive Summary

Ares-Nexus is a high-assurance settlement engine designed to eliminate systemic reconciliation risks and ensure 99.99% operational continuity in regulated cross-border payment corridors. Engineered for the Swiss financial market, it provides a high-assurance substrate that bridges the gap between legacy core banking and the modern era of instant, 24/7/365 global liquidity.

System Architecture Overview

AresNexus Architecture

Note: The architecture is strictly divided into a Deterministic Financial Core and a Non-Executive AI Observability Layer, separated by a Data Protection Gateway to ensure Swiss Bank Secrecy and GDPR compliance.

The Business Problem

Current legacy settlement systems suffer from "Dual-Write" fragility and lack of granular auditability, leading to high capital requirements and regulatory friction. Ares-Nexus solves this via Atomic Consistency, Deterministic Execution, and Immutable Event Sourcing, ensuring that every financial instruction is either fully processed or safely rolled back, with a 100% verifiable audit trail.

SLA & Performance Matrix (Simulated Benchmarks)

Metric Target Verification Method
Throughput 10,000 TPS (Transactions Per Second) sustained k6 Load Test (/benchmarks/load-test.sh)
Latency p99 < 50ms for cross-border validation OpenTelemetry Trace Analysis
MTTR (Resilience) < 30s recovery from Message Broker failure with zero data loss Chaos Engineering Simulation (RabbitMQ Kill)
Data Loss Zero (0) data loss during system failure Transactional Outbox + Event Store Integrity

Strategic Value & Risk Mitigation (Business Value Matrix)

Ares-Nexus is architected to address the core challenges of the FINMA 2023/1 circular and DORA (Digital Operational Resilience Act) requirements:

Pattern Technical Implementation Business Risk Mitigated Regulatory Alignment
Deterministic Execution Only the Settlement Core modifies financial state "Ghost" Transactions / Execution Errors FINMA 2023/1 (Operational Risk)
Non-Executive AI AI agents are restricted to the Observability Layer Model Hallucination / AI Misconduct FINMA / EU AI Act
Transactional Outbox Atomic persistence of events and messages Financial Inconsistency (Zero Loss) FINMA 2023/1 (Operational Risk)
Encryption & Tokenization AES-256 + Vault-backed Tokenization Data Privacy (Bank Secrecy) GDPR / Swiss Bank Secrecy
Event Sourcing Immutable Audit Trail (Marten/Postgres) Regulatory Non-Compliance Auditability & Traceability
Idempotency Redis-backed Command Validation Double-Spending / Duplicate Entry Operational Integrity
Decision Gate Deterministic validation of AI recommendations Uncontrolled AI Actions FINMA / DORA
Model Governance Versioned models, reasoning audit trails Lack of AI Transparency EU AI Act / FINMA

This project demonstrates a modern 'Architect-as-Orchestrator' workflow — leveraging AI for rapid delivery while maintaining absolute human-led strategic integrity, ensuring all patterns meet Tier-1 banking standards.

Trustworthy AI Governance

AresNexus follows the "Non-Executive AI (NEAI)" architecture:

  • Observe-Reason-Recommend: Agents (Fraud, Compliance, Risk, Settlement, Ops, Observability) ingest events but NEVER emit financial commands.
  • Deterministic Decision Gate: Every agent recommendation is validated by a policy engine. Actions are rejected if confidence < 85% or if specific safety rules are triggered.
  • PII Sanitization & Tokenization: All financial identifiers are tokenized via the Data Protection Gateway before reaching any AI component.
  • Traceability: Reasoning traces for every AI recommendation are stored in an immutable store for regulatory audit.

Project Structure

  • apps/ai-agents: Secure multi-agent AI system for financial monitoring and advisory.
    • Agents: Fraud, Compliance, Risk, Settlement, Ops, and Observability agents.
    • Core: AI Governance, Data Protection Gateway, and Model Risk Management.
    • Decision Gate: Human-in-the-loop and policy engine for AI recommendations.
  • apps/settlement-core: The primary settlement system.
    • Api: ASP.NET Core Web API providing the transaction interface.
    • Application: Layer containing MediatR commands, handlers, and validators.
    • Domain: Core business logic, aggregate roots (Account), and domain events.
    • Infrastructure: Event Store (Marten/PostgreSQL) and Messaging (RabbitMQ/Redis) adapters.
  • src/Services/ComplianceService: A secondary service (Python-based) for transaction compliance checks.
  • shared: Common libraries.
    • AresNexus.Shared.Kernel: Common DDD primitives, base AggregateRoot, and event interfaces.
  • infrastructure: Deployment and configuration assets.
    • kubernetes: K8s manifests for zero-trust networking and resilient deployments.
  • monitoring: Observability stack configurations.
    • prometheus: Alerting rules and scraping config.
    • grafana: Pre-configured dashboards for settlement monitoring.
  • docs: Comprehensive documentation and Architectural Decision Records (ADRs).

Documentation

For a deeper dive into the architecture and design decisions, please refer to the docs folder.

Strategic & Architecture

Design Decisions

Operations & Infrastructure

Getting Started

Prerequisites

  • .NET 10 SDK
  • Docker (for containerized execution)
  • Kubernetes (local or remote cluster for deployment)

Running the API (Local Development)

  1. Navigate to the API project directory:
    cd src/Services/SettlementService/API
  2. Run the application:
    dotnet run
  3. Access the Scalar API documentation at http://localhost:5136/scalar/v1.

Containerization & Orchestration

The solution is cloud-native and ready for Kubernetes deployment.

Kubernetes Manifests

Located in deploy/kubernetes/:

  • Resilience Manifests: (08-k8s-resilience-manifest.yaml, 09-k8s-resilience-manifest.yaml) Define deployments with anti-affinity rules, resource limits, and health probes (Liveness/Readiness) to ensure zero-downtime rolling updates.
  • Network Policies: (08-k8s-network-policy.yaml, 08b-k8s-network-policy.yaml) Implement a Zero-Trust security model, restricting ingress/egress traffic to only authorized services (e.g., Gateway to API, API to Event Store).

Monitoring Stack

  • Prometheus: Scrapes metrics from /metrics endpoints using OpenTelemetry.
  • Grafana: Provides visual dashboards (see deploy/monitoring/grafana/dashboard-settlement.json).

Features

  • Secure Multi-Agent AI: Distributed advisory agents (Fraud, Risk, Compliance) following the Observe → Reason → Recommend pattern.
  • AI Governance Layer: Full auditability of AI decisions with AgentAuditLogger and DecisionTraceStore.
  • Data Protection Gateway: Automatic PII redaction and financial identifier hashing (IBAN/AccountID) before LLM interaction.
  • Model Risk Management: Automated drift detection and "circuit breaker" safety thresholds for AI models.
  • Event Sourcing: Complete audit trail of all account transactions.
  • Zero-Trust Security: Kubernetes Network Policies for microsegmentation and isolated AI Security Zones.

Seniority Upgrades (Audit-Ready & Resilient)

To meet Swiss Banking Resilience (FINMA & DORA compliance) standards, the following pillars have been implemented:

  1. Atomic Consistency (Transactional Outbox): Atomic persistence of domain events and integration messages within the same database transaction. A dedicated BackgroundService (The Relay) ensures at-least-once delivery to Azure Service Bus, fulfilling FINMA requirements for reliable cross-service communication.
  2. Financial Safety (Strict Idempotency): Mandatory IdempotencyKey (UUID) validation for all transaction commands using a Redis-backed middleware. This prevents duplicate processing of financial instructions, a critical requirement for DORA operational resilience.
  3. Performance (Snapshotting & Upcasting): Automated aggregate snapshotting every 100 events and a robust EventUpcaster base class for schema evolution. This ensures sub-millisecond state recovery and long-term data maintainability.
  4. Security (Field-Level Encryption): AES-256 encryption for sensitive fields (Reference and Metadata) in financial events before they are persisted to the database. This provides defense-in-depth and meets Tier-1 banking standards for data privacy.
  5. Operational Resilience (Kubernetes Hardening): Implementation of ResourceQuota to limit CPU/RAM per namespace and PodDisruptionBudget to ensure 99.99% availability during cluster maintenance and upgrades.
  6. Secure AI Governance (Swiss Compliance): AI agents operate in an isolated Observability Zone, separated from the Core Financial Zone. All AI interactions pass through a Data Protection Gateway (PII redaction) and are governed by a Decision Gate ensuring AI remains advisory-only (Human-in-the-loop).

Quick Start for Evaluators

  1. Clone the repository.
  2. make up: Pulls/Builds everything and starts the infrastructure stack (Postgres, RabbitMQ, Redis, Prometheus, Grafana).
  3. make demo: Sends a basic burst of ISO 20022 transactions.
  4. make demo-portfolio: Executes the full institutional portfolio simulation ($5.5B Portfolio).
  5. Open http://localhost:5001/swagger: Explore the Settlement Core API.
  6. make test: Runs all Unit, Integration, and Architecture tests.

Swiss Tier-1 Compliance

AresNexus is engineered to meet the stringent standards set by FINMA (Swiss Financial Market Supervisory Authority) and DORA (Digital Operational Resilience Act):

  • Traceability: Every financial movement is captured as an immutable event.
  • Integrity: Transactional Outbox ensures that the system state and its external notifications are always in sync.
  • Availability: Kubernetes hardening and graceful degradation patterns ensure the system remains operational under stress.
  • Privacy: Field-level encryption ensures that PII (Personally Identifiable Information) is never stored in plain text.

Regulatory Compliance Map

Regulation Requirement Technical Feature
FINMA 2023/1 (Operational Risk) Proven consistency and auditability Transactional Outbox, Event Sourcing Snapshotting
nFADP / Swiss Data Protection Protect sensitive data in AI/LLM Data Protection Gateway (Redaction/Hashing)
FINMA AI Guidelines Traceability of AI decisions AI Governance Layer (AuditLogger/DecisionTraceStore)
GDPR / Swiss Bank Secrecy Protect PII at rest/in-transit AES-256 Field-Level Encryption, TLS everywhere
DORA (Digital Resilience) Chaos testing, rapid recovery, observability Kubernetes PodDisruptionBudget, Chaos experiments, OpenTelemetry + Prometheus/Grafana

License & Intellectual Property

This project is licensed under the Apache License 2.0.

Intellectual Property Notice

The Non-Executive AI (NEAI) Pattern and the Financial Determinism Principle (FDP) are original architectural contributions developed by Laynoll Díaz Martínez and Claudia A. Alvarez Salas.

While this software is open for industry adoption and contribution, any commercial, internal, or academic implementation of these patterns must provide appropriate credit to the original authors.

How to Cite

If you use this architecture, patterns, or benchmarks in your research or commercial infrastructure, please cite it as follows:

Diaz Martinez, L., & Alvarez Salas, C. A. (2026). Ares-Nexus: A Non-Executive AI Architecture for Deterministic Financial Settlements. DOI: 10.5281/zenodo.19294367 SSRN: Abstract ID 6485660


DOI

  • Recruiters & Tech Leads: Feel free to explore the architecture and performance benchmarks.

AI Disclosure & Leadership

Architectural Strategy, Pattern Selection, and Compliance Mapping by Laynoll Diaz Martinez. Technical Scaffolding, boilerplate implementation, and mechanical execution assisted by Junie (JetBrains AI Agent).

Test Coverage Status

Current CI-enforced code coverage: 81.8%

Coverage focuses on:

  • Domain invariants
  • Application command handlers
  • Event persistence logic
  • Resilience and idempotency mechanisms

Coverage threshold enforced in CI: 80%

Research Reference

About

AI-Augmented Settlement Infrastructure & Governance Framework. High-Throughput (10k+ TPS) engine implementing Transactional Outbox, Event Sourcing (Marten), and strict AI Risk Management. Designed for 99.99% availability, absolute financial integrity, and PII-safe LLM integration under FINMA/DORA constraints.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors