Skip to content
Criée

After the trade: post-trade and audit trail

From the engine to the depository, an append-only trail where corrections never erase, sealed by a fingerprint chain.

Lesson 89 min

By the end of this lesson

  • Correct an execution with a new line and calculate its reversal
  • Explain how the last published fingerprint reveals a rewrite of the trail
  • Name the institution that currently acts as central depository in CEMAC
In this lesson4

An execution concluded at 11:00 is not finished: the securities and the cash must change accounts, and it must be possible to prove, months later, what happened and in what order. What you will learn here: after the engine, every fact goes to post-trade and into an append-only audit trail, where a correction is a new line, never a rewrite.

Post-trade in CEMAC

The BVMAC records trades between brokerage firms and sends the data to the central depository, which carries out delivery of the securities and settlement under its own rules (RG BVMAC 2025). That role has been held by the BEAC on a transitional basis since its approval in 2019; the CEMAC single central depository was not operational at the end of 2025 (BVMAC annual report 2025). For the venue, post-trade is therefore an interface to another system, which may change: the 2025 tender indeed asks for an API able to follow a "possible future platform" (tender no. 023/16/BVMAC/DD/05-25).

The life of an execution1/5

An order leaves

Mariam (fictional) buys 20 shares at 10,100 at most. The order is timestamped on receipt by her brokerage firm.

The developer track shows how an execution becomes securities and cash entries (From an execution to entries).

The audit trail

Audit trail

The timestamped, append-only record of every event in an order's life (receipt, check, number, amendment, cancellation, execution), linked to the original order, which makes it possible to rebuild and prove any session.

In the United States, the SEC adopted in 2012 a consolidated audit trail that records every reportable event of every order (creation, amendment, cancellation, routing, execution) and links it to the original order over its whole life (SEC, rule 613). In CEMAC, three rules of the BVMAC general rules point the same way:

  • every order is timestamped on receipt by the brokerage firm (art. 150);
  • the Exchange may cancel a price or a trade, but the decision is reported to the COSUMAF and published by notice (art. 174);
  • the official price list is corrected only in case of omission or error, with explicit mention of the original information (art. 132).

The common principle: an error is corrected by a new fact pointing to the old one, never by erasing the old one.

A trade was concluded in error and the Exchange cancels it. What happens to its line in the audit trail?

Cancelling without erasingFictional

Line 1087: a fictional execution of 20 shares at 10,050 between m1 and v1, i.e. 20 × 10,050 = 201,000 XAF.

The Exchange cancels the trade. Lines added:

  1. 1090: annulation-transaction, reference 1087, reason and notice number.
  2. 1091: reversal for post-trade: −20 shares for m1, +201,000 XAF; +20 shares for v1, −201,000 XAF.

Net balance for m1 after both lines: 20 − 20 = 0 shares, −201,000 + 201,000 = 0 XAF. The session reads back in full: the execution, then its cancellation.

A fingerprint chain

Append-only does not mean tamper-proof: someone with access to the disk can rewrite a line. A common design choice is to chain the lines: each line's fingerprint is computed from its content and the previous line's fingerprint. Publishing the last fingerprint outside the system every evening makes any rewrite visible.

Writing HH for the hash function, fnf_n for the fact recorded on line nn and ene_n for that line's fingerprint, with e0e_0 a value fixed in advance (64 zeros in the code below):

en=H(en−1, n, fn)e_n = H(e_{n-1},\, n,\, f_n)
A fingerprint chain1/3
#1085nouvel-ordre v1 'vente' 20 @ 10050 · fa9660c0
#1086nouvel-ordre a0 'achat' 25 @ 9950 · 3d4afef5
#1087execution m1/v1 20 @ 10050 · 33bfe5d1
#1088annulation a0 · 8a235f97
#1089cloture-seance · a45317d8

Published that evening

{
derniere: 'a45317d8'
}
intact

valid chain

Each line seals the previous one

A line’s fingerprint is computed from its content and the previous line’s fingerprint. The last fingerprint is published at the end of the session, outside the system.
interface LigneAudit { seq: number; fait: string; precedente: string; empreinte: string }

/** `hacher` must be a cryptographic function in production (for example SHA-256). */
function ajouter(piste: LigneAudit[], seq: number, fait: string, hacher: (s: string) => string): LigneAudit {
  const precedente = piste.at(-1)?.empreinte ?? '0'.repeat(64)
  const ligne = { seq, fait, precedente, empreinte: hacher(`${precedente}|${seq}|${fait}`) }
  piste.push(ligne)
  return ligne
}

function verifier(piste: LigneAudit[], hacher: (s: string) => string): number | null {
  let precedente = '0'.repeat(64)
  for (const l of piste) {
    if (l.precedente !== precedente || l.empreinte !== hacher(`${precedente}|${l.seq}|${l.fait}`)) return l.seq
    precedente = l.empreinte
  }
  return null // no break
}

The animation's fingerprint is short to stay readable; it is not designed to resist a forger.

Compliance: what the regulator must be able to do

The COSUMAF looks after the protection of savings, investor information and the proper functioning of the regional market (Regulation no. 01/22). For the venue, this translates into concrete needs, presented here as design choices:

  • find every event of an order, a member or a security over a period;
  • replay a session to show why an order was filled (lesson 4);
  • separate rights: whoever operates the engine cannot alter the audit trail;
  • keep the logs away from the machine that produces them, as the replication site provides.

The log retention period required of the BVMAC, and the terms of the COSUMAF's access to these logs, were not found in the texts consulted. They must be asked of both institutions before any design.

Why publish the last fingerprint outside the system every evening?

Your turn

In CEMAC, who currently acts as the BVMAC's central depository?

1In CEMAC, who currently acts as the BVMAC's central depository?

A cancelled trade appears in the audit trail as...

2A cancelled trade appears in the audit trail as...

Execution of 30 shares at 10,200 cancelled. The reversal gives the buyer back...

3Execution of 30 shares at 10,200 cancelled. The reversal gives the buyer back...

The forger recomputes the whole chain. What gives them away is...

4The forger recomputes the whole chain. What gives them away is...

Read next: SEC, règle 613, Consolidated Audit Trail

A question? Ask your teacher, or an AI assistant, giving it the title of this lesson.

Share:WhatsAppLinkedIn

Going further