Blog homeKYC for AI AgentsIntegration guideEU AI Act checklistCompare
← Back to blog
· By

How to Audit Algorithmic Trading Bots Under MiCA Art. 72

Step-by-step guide for compliance officers and auditors inspecting autonomous AI trading bots under MiCA Article 72 recordkeeping rules.

Preferred source on Google
How to Audit Algorithmic Trading Bots
Table of Contents

TL;DR

  • MiCA Article 72 requires CASPs to retain immutable trading records — orders, cancellations, model prompts, risk events — for 5 years.
  • Auditors check five things: agent identity, scope alignment, model lineage, WORM immutability, and revocation-SLA compliance.
  • A WORM-backed audit_log with kms_signature verification lets a CASP reconstruct any incident timeline in minutes, not weeks.
  • Common failure modes: model lineage gaps, certificate scope drift, and clock-sync issues across distributed trading nodes.
  • Failed audits trigger a 30-90 day remediation window; repeated or severe failures can mean MiCA authorization suspension.

What does an auditor check when reviewing an AI trading bot under MiCA Article 72?

Under MiCA Article 72, auditors verify five things for every AI trading bot: that orders were generated by an authorized, certified agent (proof of origin); that each order stayed within its certified size and scope limits (proof of authority); which exact model version and prompt produced it (proof of lineage); that the audit trail is tamper-evident and immutable (proof of immutability); and, if a risk breach occurred, that the credential was revoked within the required SLA (proof of revocation compliance).

Introduction: The Regulatory Inspection Challenge

Under MiCA Article 72, Crypto-Asset Service Providers (CASPs) executing algorithmic trading strategies must maintain complete, immutable records of all orders, cancellations, model prompts, execution parameters, and risk management events for a minimum of five years.

National competent authorities (such as BaFin in Germany, AMF in France, or Central Bank of Ireland) are empowered to inspect these records during supervisory audits. For traditional algorithmic trading, audit logs consist of standard database entries. For autonomous AI trading bots, auditors demand proof that logs have not been tampered with or reordered post-event.

This guide provides compliance officers, internal auditors, and technical leads with a step-by-step methodology for auditing AI trading bots under MiCA Article 72.

---

The Audit Evidence Chain: 5 Pillars of Proof

When supervisory authorities audit an AI trading bot, they evaluate five distinct cryptographic proofs:

  • Proof of Origin (Agent Identity): Was the order generated by an authorized agent with an active X.509 certificate?
  • Proof of Authority (Scope Alignment): Was the order size within the agent's certified limit at the exact millisecond of execution?
  • Proof of Lineage (Model Versioning): Which specific LLM weights, system prompts, and context parameters generated the order?
  • Proof of Immutability (WORM Integrity): Can the CASP prove that audit log rows have not been updated or deleted since creation?
  • Proof of Revocation Compliance: If a risk breach occurred, was the bot's credential revoked within regulatory SLAs (< 60 seconds)?

---

Step-by-Step Audit Execution Workflow

Step 1: Extract the WORM Audit Trail

Query the Kakunin immutable audit_log table for the target agent ID over the specified audit window.

Step 2: Verify Cryptographic Signatures

For each row in the audit trail, verify the kms_signature against the payload hash using Kakunin's public CA certificate. This proves non-repudiation: the record was generated by the registered agent and has not been altered.

Step 3: Validate WORM Immutability Rules

Demonstrate to auditors that database-level triggers block modifications.

Step 4: Export the Compliance Evidence Package

Generate an official PDF attestation bundle for supervisory filing using our Printable Compliance Attestation Template.

For full framework mappings across GDPR, DORA, and MiCA, consult our Regulatory Mapping Matrix.

Common Audit Findings and Failure Modes

When BaFin, the AMF, or the Central Bank of Ireland send an examination team to inspect an algorithmic trading desk running autonomous AI agents, the findings rarely center on whether an order was profitable or compliant with best-execution rules. They center on whether the CASP can prove, cryptographically, that the record in front of the examiner is the same record that existed at the moment the order was placed. Across supervisory reviews of AI-driven trading operations, a small number of failure modes recur often enough that they now function as a de facto checklist for examiners.

The most common finding is a lineage gap: the CASP can produce the order (price, size, timestamp, counterparty) but cannot produce the exact model version, system prompt, and context window that generated it. Firms that log orders through a standard trading database but generate those orders through a separately hosted LLM inference pipeline frequently have no join key between the two systems. An examiner who asks which prompt template and model checkpoint produced a specific order should get an answer in minutes, not a multi-team investigation.

Model Lineage Gaps

Article 72's five-year retention requirement is frequently read as a storage problem — keep the data long enough — when it is actually a linkage problem. A CASP can be fully compliant on retention duration and still fail an audit because the order record and the model-lineage record live in separate systems with no cryptographic or referential tie between them. Kakunin's audit_log stores model version, prompt hash, and context parameters as fields on the same row as the order event, signed under the same kms_signature, so lineage and execution are never separable after the fact.

Certificate Scope Drift

The second most common finding is scope drift: a trading bot's X.509 certificate authorizes a maximum order size or asset class, but the bot's actual behavior has crept past that boundary without a corresponding certificate reissuance. This typically happens when a desk manually adjusts a risk parameter in a config file without updating the certificate that the mTLS gateway enforces. Because Kakunin's gateway validates every request against the certificate's encoded scope before it reaches the exchange connector, scope drift shows up as a rejected request rather than an unauthorized trade — but auditors still expect to see the rejection logged and explained, not silently absorbed by a retry loop.

Clock Synchronization and Event Sequencing

A third recurring finding involves timestamp integrity. Distributed trading infrastructure spanning multiple availability zones can produce audit records with non-monotonic timestamps if system clocks drift even briefly, which undermines an examiner's ability to reconstruct the sequence of events during a fast-moving incident. Kakunin's audit_log timestamps are set at write time by the database itself rather than by the originating service, and the WORM trigger rejects any insert with a timestamp older than the current maximum for that agent_id, which forecloses the sequencing ambiguity that otherwise turns a routine review into a forensic dispute over event order.

Worked Example: Auditing a Flash-Crash-Style Incident

Consider a supervisory scenario that examiners increasingly ask CASPs to walk them through: an AI trading agent, reacting to a sudden liquidity gap, begins cancelling and reissuing orders at a rate far above its historical baseline, contributing to a brief but sharp price dislocation before the agent's credential is revoked. The audit objective is to reconstruct, second by second, what the agent did, why it did it, and whether the CASP's controls responded within regulatory SLA.

The reconstruction proceeds in a fixed order. First, the examiner pulls every audit_log row for the agent's identity across the incident window and confirms row count against the exchange's own execution report — any discrepancy here is itself a finding, because it implies either dropped writes or an execution channel the audit system doesn't cover. Second, the examiner verifies the kms_signature on each row against Kakunin's public CA certificate to confirm none of the rows were fabricated or altered after the fact. Third, the examiner extracts the real-time risk score trajectory: the behavioral risk engine should show the score climbing from its baseline toward the 0.85 auto-revocation threshold as cancellation velocity and order-size variance increased, with each intermediate score value itself an immutable audit_log row rather than a derived after-the-fact estimate.

Fourth — and this is the step examiners weight most heavily — the CASP must show the interval between the score crossing 0.85 and the certificate revocation propagating through CRL/OCSP to the mTLS gateway, and demonstrate that interval was under 60 seconds. Fifth, the examiner checks that every order the agent attempted after revocation was rejected at the gateway, evidenced by mTLS handshake failures logged against the revoked certificate serial number, not merely rejected downstream at the exchange. A CASP that can produce this five-step chain end-to-end, with cryptographic proof at each link, typically closes this line of inquiry in a single sitting rather than a multi-week follow-up request.

  • Row-count reconciliation between audit_log and exchange execution reports
  • kms_signature verification against Kakunin's public CA certificate for every row in the window
  • Risk score trajectory extraction showing the climb toward the 0.85 threshold
  • Revocation-latency measurement from threshold breach to CRL/OCSP propagation (must be under 60 seconds)
  • Post-revocation order rejection evidence at the mTLS gateway layer

Article 72 Recordkeeping Meets Article 70 Governance and DORA

Article 72 does not operate in isolation. MiCA Article 70 requires CASPs to maintain governance arrangements — a documented risk management framework, defined escalation paths, and human oversight mechanisms — for any algorithmic trading activity. In practice, an Article 72 audit is also an indirect audit of Article 70 governance, because the records Article 72 requires are the evidentiary trail that Article 70's governance framework is supposed to produce. An examiner who finds a lineage gap or a scope-drift incident under Article 72 will almost always widen the inquiry into whether the underlying Article 70 governance framework actually assigns ownership for that control, or whether it exists only as a policy document with no operational teeth.

DORA (the Digital Operational Resilience Act) adds a third layer that increasingly overlaps with both. DORA's ICT risk management requirements obligate financial entities to demonstrate resilience and incident response capability for the systems that support critical functions — which includes the trading infrastructure itself, not just the AI model. Where MiCA Article 72 asks whether the CASP can prove what happened, DORA asks whether the CASP's systems could detect and respond to it reliably. The auto-revocation SLA that satisfies an Article 72 examiner as proof of a control working is the same evidence a DORA incident-reporting obligation would need if that revocation event met DORA's incident materiality threshold. CASPs that treat these as three separate compliance exercises — MiCA recordkeeping, MiCA governance, DORA resilience — tend to duplicate evidence-gathering effort three times over. CASPs that build a single immutable evidence layer underneath all three regimes, as Kakunin's audit_log is designed to serve, produce one export that satisfies all three lines of inquiry.

Pre-Audit Self-Assessment Checklist

Compliance officers preparing for a scheduled or surprise supervisory inspection should run a structured self-assessment against the same five pillars an examiner will use, well before the inspection date. This is not a substitute for a real audit, but it reliably surfaces the two or three gaps that would otherwise be discovered live, in front of the regulator, which is a materially worse position to discover them in.

A practical self-assessment covers identity and certificate hygiene, model lineage completeness, WORM verification, revocation SLA evidence, and export readiness. Firms running this checklist quarterly, rather than only in the weeks before a known inspection, consistently report shorter actual audit durations, because the evidence trail is already continuous rather than reconstructed retroactively.

  • Confirm every active trading agent holds a currently valid X.509 certificate with order-size and asset-class scope matching its actual deployed configuration
  • Sample recent orders and confirm each has a linked model version, prompt hash, and context parameter set in the same audit row
  • Run the WORM verification query against a sample of rows and confirm the database rejects a test UPDATE or DELETE attempt
  • Pull the most recent risk-score breach event, if any, and time the interval to certificate revocation against the 60-second SLA
  • Generate a full evidence export for a rolling 30-day window and confirm it opens and verifies without manual remediation
  • Cross-check that governance ownership for each control under Article 70 is documented, not just the control's technical existence

What Happens If a CASP Fails an Audit

A failed Article 72 audit finding typically triggers a remediation notice from the national competent authority with a defined cure period, commonly in the 30-to-90-day range depending on the severity and whether the gap is a documentation deficiency or an actual control failure. A lineage gap discovered on historical records but not present in current operations is usually treated as a documentation remediation. A live control failure — for example, a revocation SLA breach during an actual incident, or evidence that audit rows were mutable — is treated far more seriously and can trigger a broader supervisory review of the CASP's entire authorization.

The penalties available to national competent authorities under MiCA's enforcement framework include formal warnings, public statements naming the CASP, an order to cease the non-compliant activity, and in severe or repeated cases, suspension or withdrawal of authorization to operate as a CASP in that jurisdiction. Because MiCA authorization is passportable across the EU, a withdrawal in one member state has consequences for a CASP's ability to operate across the bloc, not merely in the jurisdiction that issued the finding. This is the underlying reason recordkeeping infrastructure deserves engineering investment commensurate with trading infrastructure itself — the two carry comparable business risk if either fails during a supervisory review.

Automated Evidence Export vs Manual Log Review

The practical difference between firms that dread supervisory audits and firms that treat them as routine comes down almost entirely to how evidence is assembled. Manual log review means an engineer or compliance analyst querying multiple systems — the trading database, the model-serving logs, the certificate authority, the rate-limiting layer — and manually stitching timestamps together into a narrative for the examiner. This process is slow, typically measured in days to weeks depending on the incident window, and every manual join between systems is a place where an examiner can reasonably ask how the CASP knows the join is accurate.

Automated evidence export collapses this into a single query against a data model where identity, lineage, immutability, and revocation are already fields on the same signed row, rather than facts that have to be correlated after the fact. Generating a full compliance attestation bundle for a defined audit window becomes a matter of minutes rather than a multi-team project, and because the underlying rows are individually signed and WORM-protected, the export itself carries the same evidentiary weight as querying the live system. Firms evaluating whether their current logging setup would hold up under this kind of scrutiny can run a structured gap check at /assessment, or review the full technical mapping of audit fields to Article 72 requirements at /docs/mica-article-72.

FAQ

How long must a CASP retain algorithmic trading bot records under MiCA Article 72?

Article 72 requires CASPs to retain complete records of orders, cancellations, model prompts, execution parameters, and risk management events for a minimum of five years. The records must remain available and unaltered for the full retention period, which means the storage system itself needs to guarantee immutability, not just long-term availability, since a record that can be edited after the fact does not satisfy the recordkeeping obligation regardless of how long it is kept.

What counts as sufficient proof that an AI trading bot's audit logs have not been tampered with?

Examiners generally look for two things together: database-level immutability controls, such as triggers that block UPDATE and DELETE statements on the audit table, and cryptographic signatures on individual records that can be independently verified against a certificate authority. Immutability alone proves the database wasn't edited; signature verification proves the record was genuinely produced by the registered agent. Supervisory reviews increasingly expect both, not either in isolation.

Does MiCA Article 72 apply to every AI-driven trading strategy, or only high-frequency bots?

Article 72's recordkeeping obligation applies to CASPs engaging in algorithmic trading generally, which includes AI-driven strategies regardless of trade frequency. A lower-frequency AI agent making discretionary allocation decisions is still generating orders algorithmically and is still subject to the same recordkeeping standard as a high-frequency strategy, though the volume of records to review during an audit will obviously differ.

What is the relationship between the 0.85 risk score threshold and MiCA audit requirements?

The 0.85 threshold is an operational control, typically used to trigger automatic credential revocation, but it becomes audit-relevant because examiners want proof the control actually functioned during real incidents, not just that it exists on paper. An auditor will ask for the specific risk score trajectory leading up to any incident and the measured time between the threshold breach and revocation taking effect, which is why that data needs to be captured as immutable audit rows rather than reconstructed from monitoring dashboards after the fact.

Can a CASP outsource its AI trading bot audit trail to a third-party compliance vendor and still meet Article 72?

Yes, provided the vendor's system produces records meeting the same substantive requirements — completeness, immutability, and five-year retention — and the CASP retains the ability to produce those records on demand during a supervisory inspection. Outsourcing the infrastructure does not outsource the compliance obligation; the CASP remains responsible for demonstrating to the national competent authority that the records exist, are accurate, and were not alterable after creation.

Palash Bagchi
Published September 17, 2026

Founder of Kakunin, building cryptographic identity and compliance infrastructure for autonomous AI agents.

All articles →
Read more from the blog
Documentation →
API reference and guides