Blog

Picture of Sinan Çoban

Sinan Çoban

Tech Lead
email

Subscribe to Our Newsletter

Receive exclusive treasury insights and strategic tips for optimizing cash flow, straight to your inbox every week.

AI Wrote Your Code, But Who Will Review It?

AI Wrote Your Code, But Who Will Review It?

One of the most popular phrases in the technology world today is: “I had AI write this code.” AI-powered coding assistants have accelerated software development to unimaginable speeds and have irreversibly transformed the industry. However, in sectors such as Financial Technology (Fintech), where the margin for error is effectively zero, AI-generated code that merely appears to “work” can become a ticking time bomb if it is not backed by a solid engineering architecture.

Imagine a payment integration written by AI in just a few seconds. At first glance, everything looks flawless, and all unit tests pass successfully. Yet there is a critical detail that the AI may have overlooked: idempotency control. If the same transaction request is received twice due to a temporary network delay, the system may execute a duplicate transfer. Even this simple scenario can become a nightmare in a production environment.  

So, while trusting AI-generated code, how do we secure systems that process billions of dollars in transaction volume?

The High Cost of a Simple Mistake in Fintech

In e-commerce systems, faulty code often results in nothing more than a poor user experience. However, when it comes to a next-generation Treasury Management Platform like TREASY—one that generates bank rates within seconds and manages FX, Money Market (MM), and Securities transactions—the consequences of even a small mistake can be severe. In Fintech, an error can lead directly to financial losses, affected institutions, and warnings or penalties from regulators such as the Banking Regulation and Supervision Agency (BDDK). 

AI does not inherently understand this critical distinction. Its primary objective is to make the requested functionality “work” as quickly as possible.

Does AI Care About Software Engineering Principles?

The real challenge is that AI often fails to see the bigger picture and may overlook fundamental software engineering principles such as SOLIDDRY, and YAGNI:

SOLID

AI can easily generate a 500-line method that crams all business logic into a single block of code. At TREASY, however, we strictly adhere to Domain-Centric and Bounded Context principles while avoiding the Nanoservice Trap. Our microservices are designed to operate independently and maintain clear boundaries.  

DRY (Don’t Repeat Yourself)

AI may duplicate the same validation logic across multiple locations. At TREASY, shared data and business rules—such as exchange rates, accounting rules, and workflow definitions—are centrally managed through our distributed Redis cache infrastructure.  

YAGNI (You Aren’t Gonna Need It)

Adding unnecessary data fields “just in case” can create complications during regulatory audits. What appears harmless during development may become a compliance burden later.  

How TREASY Mitigates AI-Related Risks

In Fintech, certain red lines cannot be crossed. TREASY’s infrastructure addresses these risks at their source, without relying on external dependencies.

1. Lack of Resiliency and Rollback Mechanisms

An incomplete financial transaction is unacceptable. To ensure Resiliency and Fault Tolerance, TREASY utilizes Kafka. Transactions that reach the system but cannot yet be guaranteed as processed by downstream services are safely stored and queued within Kafka. This eliminates the risk of data loss and duplicate processing.  

2. Audit Trail and Regulatory Compliance

AI may forget to implement proper logging or, worse, log sensitive information such as customer identifiers, creating security vulnerabilities. At TREASY, we use Data Masking technology to filter critical information from logs and external communications, preventing sensitive customer data from being propagated across services.

In addition, our monitoring infrastructure includes three layers of logging:

  • Technical Logs
  • Inquiry Logs
  • Audit Trail Logs

These are supported by a comprehensive observability stack built on Serilog, Seq, Elasticsearch, and Kibana.  

3. Automated Quality Control and Sidecar Diagnostics

We take advantage of AI and coding assistants for repetitive and boilerplate tasks, but we never remove human oversight or machine-driven validation from the development process.

Within our Azure DevOps pipeline, all code must pass SonarQube quality checks before it can be considered compliant with our engineering standards. Furthermore, before any code is deployed to a customer environment, our Sidecar Diagnostics infrastructure automatically validates the target environment—including databases and supporting services—and reports any issues before deployment.  

Conclusion: AI Produces, Engineering Ensures

At TREASY, we strongly believe in the power of AI. In fact, we are developing our own AI-Powered Treasury Intelligence module for anomaly detection, simulation, and risk analysis.  

However, our software development philosophy remains clear:

No AI-generated code is allowed into production until it has passed architectural reviews, manual testing processes, automated testing stages, and senior engineer approval. 

I can save time, but in a treasury platform where millions of dollars move every second, what ultimately allows you to sleep soundly at night is not AI-generated code—it is a robust architectural foundation and uncompromising security practices.

Author

Sinan Çoban – Tech Lead | TREASY

Take Control of Your Treasury

Ready to transform how you manage your treasury? Request a demo today and see how Treasy can enhance your operations.