Compliance Controls
Building regulatory obligations into systems as controls: KYC, AML, sanctions, surveillance, and recordkeeping.
Learning outcomes
Most engineers meet compliance as a list of rules someone in a different building hands down, a tax on shipping that exists to slow you down. That framing is the root of almost every expensive mistake in this area. Compliance in a financial system is not a document. It is a set of controls: concrete, testable mechanisms wired into the path money takes, the same way authentication is wired into a login. When you see it that way, the regulations stop being arbitrary and start reading like a specification for code you already know how to write.
This page is about building regulatory obligation into financial systems as engineering. We will treat each obligation as a control with an owner, an input, a decision, and an audit trail, and we will follow money from a customer signing up through every gate it must clear before it moves.
After studying this page, you can:
- Explain why a compliance obligation is only as real as the control that enforces it, and what separates a control from a policy.
- Describe the front-door controls that establish identity: know-your-customer and the customer identification program, what each verifies, and why they run before any money moves.
- Build sanctions screening correctly, name the one control where a false negative can be a strict-liability violation, and explain why fuzzy matching is mandatory rather than optional.
- Distinguish the four reporting and monitoring controls (sanctions screening, transaction monitoring, suspicious-activity reporting, and currency-transaction reporting) and say which fires in real time and which fires after the fact.
- Reason about trade surveillance for insider trading and market manipulation, and about suitability and best-interest obligations for what a firm recommends.
- Design the engineering plumbing: where a screen blocks, where a hold queues, where a human decides, and what audit evidence each step must leave behind.
- Explain the central operational tension, false positives versus missed risk, and how alert tuning trades them off without faking the books.
- Separate fundamental obligations that every firm shares from the firm-specific conventions and thresholds that vary by institution and jurisdiction.
Before we dive in
You need no compliance background. We will define each term the first time it appears, and we will keep the vocabulary small.
A control is a mechanism that enforces a requirement and produces evidence that it ran. “We screen every payment against the sanctions list, block any hit, and log the result” is a control. “We must not transact with sanctioned parties” is a policy; it becomes a control only when something actually checks. A regulator is a government body that writes rules and examines firms for compliance, for example a banking supervisor or a securities authority. A financial institution, which we will shorten to firm, is any entity that holds or moves customer money: a bank, a broker-dealer, a payments company, a money services business.
A few acronyms recur, so meet them now. KYC is know-your-customer, the discipline of establishing and maintaining knowledge of who your customer is. CIP is the customer identification program, the narrower, legally required core of KYC that verifies identity at onboarding. AML is anti-money-laundering, the body of obligation aimed at stopping the financial system from being used to launder the proceeds of crime or finance terrorism. OFAC is the Office of Foreign Assets Control, the United States Treasury office that administers economic sanctions and publishes the lists firms must screen against. A SAR is a suspicious activity report and a CTR is a currency transaction report; both are filings a firm sends to the government.
One framing to carry throughout. Every control in this page has the same anatomy: an input (a customer, a payment, an order), a decision (pass, block, hold, escalate, or report), an owner (who is accountable, often a compliance officer), and an audit trail (durable evidence that the control ran and what it decided). When you meet a new obligation, find those four parts and you have found how to build it.
Mental Model
The wrong model, and it is the default model for most engineers, is that compliance is a gate at the end: build the product, then have a compliance team review it, then bolt on whatever checks the regulators demand. In this model compliance is a reviewer, a sign-off, a quarterly audit. It lives outside the system and inspects it from the outside.
That model is wrong in a way that costs firms enormous sums. Sanctions and money-laundering obligations do not attach to your release process; they attach to every individual payment, in real time, forever. You cannot review your way to compliance with a rule that must be enforced on a transaction that has not happened yet. A reviewer who looks at the system once a quarter cannot stop a sanctioned payment from settling on a Tuesday afternoon. By the time a human reviews it, the money is gone and the violation has occurred.
The right model is that compliance is a set of controls inline with the money, in exactly the same architectural position as the ledger’s balance check or an authentication middleware. A control sits on the path of the transaction. It receives the transaction before it completes, makes a decision, and either lets it proceed, stops it, or routes it to a human, and it leaves a record either way. Some controls run synchronously and can block (sanctions screening must, because a sanctioned payment must never settle). Some run asynchronously and detect after the fact (transaction monitoring looks at patterns across many payments and raises alerts). But all of them are part of the running system, not a review of it. Hold that picture: compliance is not a committee that approves your design. It is code on the hot path, with a human in the loop where judgment is required, and an audit trail underneath the whole thing.
Breaking it down
The core teaching runs in thirteen steps. The first sets up the control framing. Steps two through seven walk the major obligations in the order money encounters them, from the front door through every gate. Steps eight and nine cover the controls that make the whole program trustworthy: records and separation of duties. Steps ten and eleven are the engineering reality, the false-positive tax and the plumbing. The last two scale the program and catalog how it fails.
1. Why compliance is a control problem not a policy problem
Start with the gap that ruins firms. A firm can have a flawless written AML policy, trained staff, a board-approved program, and still suffer a catastrophic sanctions violation, because the written policy was never wired into the payment path. Regulators have learned this the hard way over decades, and it is why modern supervision focuses on effectiveness, not paperwork. An examiner does not ask whether you have a policy. They ask to see the control, the evidence it ran on a specific transaction, and what it decided.
The distinction is sharp. A policy is a statement of intent: what the firm will not do. A control is the mechanism that makes the policy true on every transaction and proves it did. The gap between them is exactly where violations live. “We do not transact with sanctioned parties” is an aspiration until a screening control checks every counterparty against the list and blocks the hits, and a log shows it checked. A regulator who finds a strong policy with no enforcing control treats the policy as nonexistent, because to the customer whose payment cleared, it was.
This is why an engineer is central to compliance and not a bystander. The obligation is abstract; the control is code, configuration, queues, and audit tables. The people who can actually make a policy true on a live transaction are the people who build the system. Compliance officers own the requirement and the judgment; engineers own the mechanism. A firm where those two groups do not collaborate closely produces exactly the failure mode above: beautiful policy, hollow enforcement.
Internalize this first: an obligation you cannot point to in the code is an obligation you are not meeting, no matter what the manual says. The rest of this page is the catalog of controls that turn the major obligations into running mechanism.
2. Knowing the customer at the front door
The first control money encounters is not on the money at all; it is on the person. Before a firm lets anyone open an account or move funds, it must establish who they are. This is know-your-customer, and its legally mandated core is the customer identification program, the CIP.
The motivation is plain once you see what launderers and sanctioned parties need most: anonymity. If a criminal can open an account under a false name, or a sanctioned person can hide behind a shell, every downstream control is weakened, because you are screening and monitoring a phantom. Identity is the foundation the whole program stands on. Get the front door wrong and nothing behind it can be trusted.
In the United States, the CIP rule grew out of the USA PATRIOT Act of 2001 and its implementing regulations, which require firms to collect, at minimum, four pieces of identifying information before opening an account: name, date of birth, address, and an identification number (for a US person, typically a Social Security number; for others, a passport or similar). Collecting the data is only half of it. The firm must also verify the identity, either documentary (checking a government ID) or non-documentary (matching against trusted data sources), within a reasonable time, and keep records of how it did so.
KYC is broader than CIP and continues for the life of the relationship. It includes customer due diligence (CDD), understanding the nature and expected pattern of the customer’s activity so that later you can tell normal from suspicious, and identifying the beneficial owners of a legal-entity customer, the real humans who own or control a company, so a corporation cannot be used as a mask. Higher-risk customers (for example, a politically exposed person, someone in a prominent public function who poses elevated corruption risk) get enhanced due diligence: more documentation, senior sign-off, and closer ongoing monitoring. The principle is risk-based: you spend the most scrutiny where the risk is highest, rather than treating every customer identically.
flowchart LR
A["Applicant submits<br/>name, DOB, address, ID number"] --> B["CIP: verify identity<br/>documentary or non-documentary"]
B --> C["Screen against<br/>sanctions and watchlists"]
C --> D{"Risk rating"}
D -->|"standard"| E["Standard due diligence<br/>open account"]
D -->|"elevated"| F["Enhanced due diligence<br/>senior approval, more docs"]
E --> G["Ongoing monitoring<br/>for the life of the relationship"]
F --> GNotice that onboarding is itself a small pipeline, and it already chains into the next control: a new customer is screened against the sanctions list at signup (step three), because you must not open an account for a listed person in the first place. The output of KYC, a verified identity with a risk rating and an expected activity profile, is the input every later control depends on. Transaction monitoring can only call a payment “unusual for this customer” because CDD established what usual looks like.
A subtle point engineers miss: KYC is not a one-time gate. Regulations expect ongoing diligence, periodic refresh of the information, and re-screening whenever the watchlists change. Identity is a living attribute of the relationship, not a checkbox ticked at signup, because a customer who was clean at onboarding can later be added to a sanctions list, and the firm is expected to catch that.
3. Sanctions screening the one control with zero tolerance
Of all the controls in this page, sanctions screening is the one to understand most precisely, because it is the one where a single miss can be a violation regardless of intent. Economic sanctions are legal prohibitions on dealing with specified countries, entities, and individuals. In the United States they are administered by OFAC, which publishes lists, most prominently the Specially Designated Nationals list (the SDN list), of parties that US persons are broadly prohibited from transacting with.
The defining feature is strict liability. For many OFAC programs, a firm can violate the prohibition without intending to and without knowing the counterparty was listed; the violation is the prohibited transaction itself, not a guilty state of mind. This is unlike almost every other control on this page, where the obligation is to have a reasonable program and exercise judgment. With sanctions, processing a payment to a listed party is the violation, full stop, and the penalties are severe. That is why screening must block synchronously, before the money moves, and why a false negative here is far more dangerous than in monitoring, where you can catch things after the fact.
Screening sits at multiple points: at onboarding (do not take on a listed customer), on every payment (do not let money reach or come from a listed party, and watch the intermediary banks and beneficiaries too), and continuously against list updates (a customer added to the list yesterday must be caught today). The list changes frequently, sometimes daily, so a firm must consume updates promptly and re-screen its book.
The hard engineering problem is matching. Sanctioned-party names arrive in many spellings, transliterations, and orders. The same person can appear as different romanizations of a non-Latin script, with or without middle names, with reordered name parts, or with deliberate misspellings designed to evade. Exact string matching would miss most real hits, so screening uses fuzzy matching: phonetic algorithms, edit-distance scoring, and name-component analysis that flag near matches above a threshold. This is a deliberate trade. Loosen the threshold and you catch more evasion at the cost of more false positives; tighten it and you reduce noise at the cost of missing a cleverly disguised hit. Because the cost of a miss is a strict-liability violation, firms tune sanctions matching conservatively, accepting a high false-positive rate to drive the false-negative rate toward zero.
flowchart TB
P["Outgoing payment:<br/>beneficiary name + country"] --> N["Normalize:<br/>transliterate, reorder,<br/>strip titles"]
N --> M["Fuzzy match against<br/>sanctions lists"]
M --> S{"Score vs threshold"}
S -->|"clear"| OK["Release payment<br/>log clean result"]
S -->|"possible hit"| H["Hold payment<br/>open case for review"]
H --> R{"Analyst decision"}
R -->|"false positive"| OK2["Release<br/>record disposition"]
R -->|"true match"| B["Block and freeze<br/>report as required"]The numbers make the tension concrete. Drag the matching threshold below and watch the trade between catching evasion and burying analysts in false alarms.
The strict-match end is the trap. It feels efficient because the alert queue is quiet, but quiet is exactly what a missed sanctioned payment looks like right up until the regulator finds it. For most controls you optimize the trade-off; for sanctions you deliberately skew it toward over-alerting, because the downside is asymmetric. A false positive costs an analyst a few minutes. A false negative can cost the firm hundreds of millions and its banking relationships.
4. Watching the money move with transaction monitoring
KYC tells you who the customer is. Sanctions screening tells you they are not on a prohibited list. Neither tells you whether the way they are using the account looks like crime. That is the job of transaction monitoring: continuously analyzing the flow of transactions to detect patterns consistent with money laundering, fraud, or other illicit activity, and raising alerts for human review.
Money laundering has a recognizable shape, classically three phases: placement (getting illicit cash into the system), layering (moving it through many transactions to obscure its origin), and integration (bringing it back as apparently legitimate funds). Monitoring looks for the fingerprints of these phases. Structuring, for example, is breaking a large amount into many sub-threshold pieces to dodge a reporting rule, depositing nine thousand dollars repeatedly to stay under a ten-thousand-dollar trigger. Rapid movement of funds in and out (a pass-through account), transactions inconsistent with the customer’s profile (a small retail customer suddenly wiring large sums abroad), and activity with high-risk geographies are other classic patterns.
Crucially, monitoring is mostly asynchronous and detective, not synchronous and preventive. Unlike sanctions screening, which must block before settlement, monitoring usually runs on transactions that have already happened, looking across time and across a customer’s whole activity for patterns no single transaction reveals. A single nine thousand dollar deposit is unremarkable; ten of them in two weeks is structuring. You can only see that by looking back across many transactions, so monitoring runs as a batch or streaming analysis that raises alerts, which humans then investigate.
The classic implementation is rules-based: a library of scenarios, each a parameterized threshold, for example “alert if a customer makes more than N cash deposits each under the reporting threshold within D days.” Rules are transparent and explainable, which regulators value, but they are noisy and gameable. Newer programs layer statistical and machine-learning models that score behavior against the customer’s own baseline and against peers, catching anomalies a fixed threshold misses. The trade-off is explainability: a regulator and an analyst must be able to understand why an alert fired, so opaque models are used carefully and usually alongside, not instead of, rules.
The output of monitoring is an alert, and an alert is not an accusation; it is a question. A human investigator gathers context, reviews the customer’s history and the transactions, and reaches a disposition: this is benign (close the alert with a documented rationale), or this is suspicious (escalate, and likely file a report). Most alerts are false positives, which is the central operational problem we return to in step ten. But every alert, true or false, must be worked and its disposition recorded, because the audit trail of how alerts were handled is itself a control a regulator will examine.
5. Reporting to the government SARs and CTRs
Detecting suspicious or reportable activity is only useful if it reaches the authorities who can act on it. Two reporting controls do this, and engineers conflate them constantly, so pin down the difference: one is threshold-based and objective, the other is judgment-based and subjective.
The currency transaction report, the CTR, is mechanical. In the United States, a firm must file a CTR for cash transactions exceeding ten thousand dollars in a single business day by or on behalf of one person, including multiple cash transactions that aggregate above that amount. There is no judgment: cross the threshold in cash and the report is required. Because the rule is objective, the control is straightforward to automate, sum a customer’s cash activity per day and file when it exceeds the limit. The objectivity is also exactly why structuring exists: criminals break cash into sub-threshold pieces precisely to avoid triggering the mechanical CTR, which is why the deliberate evasion is itself a separate crime and a monitoring scenario.
The suspicious activity report, the SAR, is the judgment-based counterpart. A firm must file a SAR when it knows, suspects, or has reason to suspect that a transaction involves funds from illegal activity, is designed to evade reporting requirements, has no apparent lawful purpose, or otherwise looks like it could be illicit. There is no dollar threshold that forces it the way the CTR has one (specific minimums apply by institution type), and there is no certainty required: suspicion is enough, and indeed the standard is suspicion, not proof. Two features make the SAR legally distinctive. First, there is a filing deadline, generally thirty calendar days from detecting the facts that warrant filing. Second, there is a strict confidentiality rule: a firm may not tell the customer that a SAR was filed (this is the prohibition often called “no tipping off”), because warning the subject would defeat the investigation.
flowchart TB
T["Transaction activity"] --> C{"Cash over<br/>$10,000 in a day?"}
C -->|"yes"| CTR["File CTR<br/>mechanical, threshold-based"]
C -->|"no"| M["Transaction monitoring<br/>and analyst review"]
M --> S{"Knows, suspects, or has<br/>reason to suspect illicit?"}
S -->|"yes"| SAR["File SAR within deadline<br/>do NOT tip off the customer"]
S -->|"no"| CL["Close with documented rationale"]
SAR --> LE["Report flows to the<br/>financial intelligence unit"]
CTR --> LEBoth filings go to the national financial intelligence unit (in the United States, FinCEN, the Financial Crimes Enforcement Network), which aggregates reports across the whole financial system and shares them with law enforcement. This is the payoff of the whole AML edifice: a single firm sees only its slice of a launderer’s activity, but the intelligence unit can connect SARs from many firms to see the whole picture. The firm’s obligation is not to solve the crime; it is to report the suspicion faithfully and on time, so the authorities who can investigate have the data.
6. Surveilling the markets for abuse
So far every control has been about money laundering and sanctions, the obligations of any firm that moves money. A firm that touches securities markets carries a second, parallel family of controls aimed at a different harm: market abuse. The job here is trade surveillance, monitoring orders and trades to detect manipulation and insider dealing that distort prices or exploit unfair information.
The two headline abuses are insider trading and market manipulation. Insider trading is dealing on material non-public information, buying a stock because you secretly know the company is about to be acquired, which is unfair to everyone trading against you without that knowledge. Manipulation is interfering with the honest price-setting of the market. Spoofing, for example, is placing large orders you intend to cancel to create a false impression of supply or demand, nudging the price, then trading on the other side and pulling the fake orders. Layering (the market-abuse sense, distinct from money-laundering layering) stacks multiple such orders to deepen the illusion. Wash trading is trading with yourself to fake volume. Front-running is jumping ahead of a client order you know is coming.
Surveillance looks for these signatures in the order flow. It reconstructs the sequence of orders, modifications, and cancellations and flags patterns: a trader who repeatedly places and cancels large orders just before trading the opposite way (spoofing), trades clustered suspiciously close to a price-moving announcement (possible insider dealing), or accounts that trade against each other with no economic purpose (wash trading). As with transaction monitoring, the output is an alert that a human reviews, often correlated with news, communications, and the trader’s broader behavior.
sequenceDiagram participant T as Trader participant OB as Order book participant S as Surveillance T->>OB: Place large sell orders (no intent to fill) OB-->>S: Order events streamed T->>OB: Price ticks down on apparent selling pressure T->>OB: Buy at the depressed price T->>OB: Cancel the large sell orders S->>S: Reconstruct sequence: place, move, trade opposite, cancel S->>S: Pattern matches spoofing, raise alert
There is a structural difference from AML worth naming. AML controls mostly protect the financial system from criminal abuse and serve law enforcement; trade surveillance mostly protects market integrity and other investors and serves market regulators. The engineering is similar, ingest events, run scenario detection, alert, investigate, but the data is order-book and trade events rather than payments, the latencies are tighter (some manipulation plays out in milliseconds), and the legal frame is securities and market-conduct law rather than the bank-secrecy and sanctions regimes. A firm that does both, a bank with a brokerage, runs both families of controls side by side and must not let one team assume the other has it covered.
7. Suitability and acting in the customer best interest
The controls so far ask “is this transaction illicit.” A different obligation asks “is this recommendation right for this customer.” When a firm advises or recommends, it takes on conduct obligations toward the customer, and these too become controls on what the system is allowed to do.
The older standard is suitability: a broker recommending a security must have a reasonable basis to believe it is suitable for that customer given their financial situation, objectives, risk tolerance, and other holdings. Suitability is a floor, the recommendation must fit the customer, but it historically permitted a broker to choose among suitable options in ways that favored the broker, for example a suitable fund that happened to pay the broker a higher commission.
The newer and higher standard in the United States is Regulation Best Interest, often called Reg BI, adopted by the securities regulator and effective in 2020. It requires a broker-dealer making a recommendation to a retail customer to act in the customer’s best interest at the time of the recommendation, and not to put the firm’s or the broker’s financial interest ahead of the customer’s. It layers on duties of disclosure, care, conflict-of-interest management, and compliance. The shift from “suitable” to “best interest” is consequential: among several suitable products, the firm can no longer simply pick the one that pays it more without managing and disclosing that conflict.
As controls, these obligations show up as gates and checks on the recommendation engine and the advice workflow. Before a recommendation reaches a retail customer, the system can verify the product fits the customer’s documented profile, surface and require disclosure of conflicts, block or flag recommendations that fail a best-interest check, and record the basis for the recommendation so the firm can later demonstrate it acted appropriately.
These conduct controls matter for engineers building anything that recommends: a robo-advisor, a product-suggestion engine, an advisor’s order-entry screen. The recommendation logic is not just a product feature; it is a regulated act, and the system must be able to prove, for any recommendation it surfaced, that it fit the customer and served their interest.
8. Recordkeeping as a first-class control
Every control above produces evidence, and that evidence is not a byproduct; it is itself a regulated obligation. Recordkeeping requirements oblige firms to retain specified records for specified periods in specified ways, and to produce them on demand. If you cannot prove a control ran, from a regulator’s standpoint it did not run.
The requirements are concrete and exacting. Books and records of transactions, customer identification records, AML program documentation, SAR and CTR support, communications, and trade records all carry retention rules, commonly several years (for example, broker-dealer records often must be retained for periods such as three or six years depending on the record, and certain AML and CIP records have their own periods). Beyond duration, there are format rules. A long-standing securities requirement is that certain records be kept in a non-rewritable, non-erasable format, historically called WORM (write once, read many), so that records cannot be altered after the fact. The point is tamper-evidence: a record you could quietly edit is not trustworthy evidence, so the regulation mandates storage that makes alteration detectable or impossible.
This connects directly to ledger design. The same append-only, immutable discipline that keeps a ledger honest is what recordkeeping rules demand of compliance evidence. An audit trail you can edit is worthless; an append-only log with integrity protection is the control. Engineers should treat compliance records the way they treat the ledger: write once, never mutate, retain for the required horizon, and be able to reproduce the exact state as of any past moment.
stateDiagram-v2
[*] --> Created: control runs, evidence captured
Created --> Retained: written to immutable store
Retained --> Produced: regulator or audit request
Produced --> Retained: returned, still immutable
Retained --> Disposed: retention period expires, defensible deletion
Disposed --> [*]
note right of Retained
Records are append-only and tamper-evident
(WORM-style). They are never silently edited.
end noteThere is an underappreciated discipline at the end: defensible disposal. Retaining records forever is not virtuous; over-retention creates privacy and discovery risk, and some data-protection rules require deletion when the lawful basis ends. So a mature program retains for exactly as long as required and then disposes deliberately, with a documented policy, neither losing records early nor hoarding them past their lawful life. Recordkeeping is a control like any other: it has a defined behavior, and both under-doing and over-doing it are failures.
9. Segregation of duties and maker-checker
The controls so far guard against external bad actors, launderers, sanctioned parties, manipulators. A different class of control guards against the firm’s own people and its own mistakes: segregation of duties and its concrete implementation, maker-checker.
Segregation of duties is the principle that no single person should control a transaction or a sensitive change end to end. The one who initiates an action should not be the one who approves it, and ideally neither should be the one who reconciles or audits it. The reason is twofold: it makes fraud require collusion (a lone insider cannot both create a fraudulent payment and approve it), and it catches error (a second set of eyes spots the mistake before it takes effect). Concentrated control is dangerous regardless of intent; splitting it across people is one of the oldest and most effective controls in finance.
Maker-checker (also called four-eyes) is the everyday mechanism: one person, the maker, creates or proposes a transaction or change; a different person, the checker, independently reviews and approves it before it takes effect. Releasing a large payment, modifying a sanctioned-party block, changing a monitoring rule, onboarding a high-risk customer, these are exactly the actions a system should route through maker-checker, so that no individual can effect them alone.
sequenceDiagram
participant Maker as Maker (initiator)
participant Sys as System
participant Checker as Checker (approver)
Maker->>Sys: Propose action (release payment / change rule)
Sys->>Sys: Hold in pending state, record proposer
Sys->>Checker: Route for independent approval
Checker->>Sys: Approve or reject (must be a different person)
alt Approved
Sys->>Sys: Apply action, record both identities
else Rejected
Sys->>Sys: Discard, record rejection and reason
endFor an engineer, segregation of duties is a set of system requirements, not just an org-chart fact. The system must enforce that the approver is a different identity from the proposer (a maker cannot approve their own request, even if they hold both roles), keep sensitive actions in a pending state until approved, and record both identities and the timestamps on the final action. These requirements also extend to the controls themselves: the people who can change a monitoring rule or lower a sanctions threshold should be separated from those who operate the alerts, so no one can quietly weaken a control and then exploit the gap. A control you can silently disable is not a control, which is why change management over the compliance system is part of compliance.
10. The false positive tax and alert tuning
Now the central operational reality of every detective control, the one that dominates the day-to-day life of a compliance team: the overwhelming majority of alerts are false positives, and managing that ratio without faking it is the hardest practical problem in the field.
The arithmetic is brutal. Genuine illicit activity is rare relative to total transactions, so even a fairly accurate detector produces far more false alarms than true hits, because the haystack is enormous and the needles are few. Industry experience with transaction monitoring routinely sees false-positive rates well above ninety percent; the large majority of alerts, after investigation, turn out to be benign. Each one still has to be worked: an investigator gathers context, reaches a disposition, and documents it. The cost of the control is dominated not by the rare true positive but by the army of analysts clearing false ones. This is the false positive tax, and it scales with volume.
The lever is alert tuning: adjusting thresholds and rules to move the trade-off between catching real activity (sensitivity, fewer false negatives) and not drowning in noise (precision, fewer false positives). Loosen a rule and you catch more real cases but generate more noise; tighten it and you cut noise but risk missing genuine activity. There is no free lunch; the two errors trade against each other, and where you set the dial depends on the cost of each error for that control.
flowchart LR Loose["Loose thresholds"] -->|"more alerts"| Many["Catch nearly all true cases<br/>but huge false-positive load"] Strict["Strict thresholds"] -->|"fewer alerts"| Few["Light analyst load<br/>but risk missing true cases"] Many --> Tune["Tune toward the right balance<br/>for THIS control's risk"] Few --> Tune Tune --> Doc["Document and govern every change<br/>tuning is a controlled act"]
Here is the discipline that separates a real program from a dangerous one. Tuning is legitimate only when it is risk-based and documented, never when it is done to make a queue look manageable. Lowering sensitivity because analysts are overwhelmed, with no analysis of what risk you are now missing, is not tuning; it is quietly disabling a control, and regulators treat it exactly that way. Every change to a threshold or rule should be justified by risk analysis, tested against historical data to estimate what it would catch and miss, approved through change management (often maker-checker, per step nine), and recorded. The audit trail of why a control is set the way it is, is itself examined. The right posture is also asymmetric by control: for sanctions you skew hard toward over-alerting because a miss is strict-liability (step three); for a lower-stakes monitoring scenario you may accept a tighter dial. The skill is matching the dial to the cost of each error, and proving you did.
11. Engineering controls into the transaction flow
Now assemble the controls into the actual path a transaction takes, because their position in the flow is as important as their logic. The four verbs an engineer must place deliberately are screen, block, hold, and record.
A screen is a synchronous check inline with the transaction: sanctions screening on a payment is the canonical case, and it runs before the payment can complete because a hit must prevent settlement. A block is a hard stop: a confirmed sanctioned party means the payment must not proceed and, often, funds must be frozen. A hold is a pause for human judgment: a possible hit or a high-risk pattern moves the transaction into a queue where it waits, neither released nor rejected, until an analyst dispositions it. A record is the durable evidence each step leaves: what was checked, against which list version, what was decided, by whom, and when. Detective controls like transaction monitoring sit slightly to the side of this synchronous path, consuming a stream of completed transactions and raising alerts asynchronously, but they too feed holds (an alert can freeze an account) and always record.
The architectural lesson is that these controls belong in the path, as a mandatory stage the transaction cannot bypass, not as an optional service a caller might forget to invoke. The strongest designs route all money movement through a single choke point, a payments or transfers service, that calls the controls and cannot be circumvented, so no code path exists that moves money without screening it. This mirrors the dedicated-ledger pattern: one component owns the invariant, and nothing else is allowed to touch money directly.
The AnimatedFlow below shows the whole shape at once: a payment enters, is screened, and either clears, or holds for review, or branches to a hard block. The monitoring path sits below as a declared subpath, consuming completed payments and feeding back alerts. Watch the structure stay fixed while the story walks across it.
This is controls as code: the obligations expressed as enforced stages with machine-checked decisions and durable evidence. The benefits are the same as for any code-enforced invariant. The control is consistent (it runs the same way every time, not at the discretion of whoever is on shift), testable (you can write test cases for known hits and known clears), versioned (the rule set and list versions are tracked), and auditable (the evidence is produced automatically). A compliance program built this way can answer the examiner’s hardest question, “show me this control running on this specific transaction,” instantly, because the system recorded it.
12. Scaling the compliance program from startup to institution
The obligations are the same for a ten-person startup and a global bank, but the program that delivers them looks completely different at each scale, and understanding the progression keeps a firm from both under-building and over-building.
At the startup stage, a firm often relies on a small number of compliance vendors and manual review. Identity verification, sanctions screening, and basic monitoring are frequently bought as third-party services and wired in through APIs, because building them in-house is neither feasible nor wise early on. A founder or a single compliance hire may personally review the handful of alerts. The obligations are met, but with leverage from vendors and human attention rather than scale infrastructure. The risk at this stage is treating compliance as something to defer; even a small firm that moves money is fully subject to sanctions and AML obligations from its first transaction, and “we are too small to be examined” is not a defense.
As volume grows, manual review stops scaling and the false positive tax (step ten) becomes the binding constraint. The firm invests in tuning, case-management systems to work alerts efficiently, and dedicated analysts. The compliance function professionalizes: formal roles appear, including a designated AML compliance officer accountable for the program, and a real second line of defense distinct from the business that generates the revenue.
At institutional scale, the program is a large operation with three layers, the three lines of defense model: the first line is the business itself, which owns and operates the controls in its day-to-day work; the second line is the independent compliance and risk function that sets standards and oversees the first line; the third line is internal audit, independently assuring that the first two are working. Controls are deeply engineered into the platform, dedicated screening and monitoring infrastructure handles enormous volume, specialized teams cover sanctions, AML, surveillance, and conduct, and the firm is examined regularly by multiple regulators across jurisdictions.
flowchart TB
subgraph s1["Startup"]
A["Vendor APIs for KYC, screening, monitoring<br/>manual review by a few people<br/>obligations met with leverage, not scale"]
end
subgraph s2["Growth"]
B["Tuning and case management<br/>dedicated analysts<br/>designated AML compliance officer"]
end
subgraph s3["Institution"]
C["Three lines of defense<br/>engineered screening and monitoring at scale<br/>specialized teams, multi-regulator exams"]
end
s1 --> s2 --> s3The principle that survives every stage: the fundamental obligations are fixed, but their implementation is firm-specific and risk-based. The law says screen against sanctions, know your customer, monitor for suspicious activity, report it. It does not prescribe your exact thresholds, your vendor, your match algorithm, or your org structure. Those are choices a firm makes based on its risk profile, products, geographies, and scale, and it must be able to justify them. This is the recurring distinction throughout the page: separate the obligation that every firm shares from the convention that a particular firm adopts to meet it, because confusing the two leads either to cargo-culting another firm’s thresholds or to assuming the rules are negotiable.
13. How compliance controls fail
A senior engineer must know the failure modes cold, because they are the ones that produce enforcement actions, fines measured in the hundreds of millions, and lost banking relationships. The pattern across nearly all of them is the same as the page’s opening lesson: a control that existed on paper but did not actually run, or ran and was ignored.
Two themes tie the list together. First, the most dangerous failures are silent: a missed sanctions hit, an unworked alert, and a hollow disposition all look exactly like success from the inside, a quiet queue and clean dashboards, right up until an external party finds the gap. This is why independent assurance (the third line, step twelve) and honest metrics matter so much; a control that cannot fail loudly must be checked from outside. Second, almost every failure traces back to the page’s first principle: the obligation was treated as a policy rather than a control, so it was not truly wired into the path of the money, not enforced on every transaction, not evidenced, or not independently verified. Build compliance as controls inline with the money, with owners, decisions, and durable audit trails, and you have addressed the root cause of nearly everything on this list.
Mastery Questions
-
A payments startup is about to launch. An engineer argues that sanctions screening can wait until after launch, since the firm is tiny, the volume is trivial, and they will “add it once there is real money flowing.” Evaluate this plan precisely.
Answer. The plan is wrong and dangerous, and the reasons are specific. Sanctions obligations attach to every individual payment from the very first transaction, not to a volume threshold, and many OFAC sanctions programs are strict-liability: processing a single payment to a listed party is a violation regardless of the firm’s size, intent, or knowledge. There is no “too small to matter” exemption; the first payment to a sanctioned beneficiary is a violation the moment it settles. Worse, this is precisely the kind of gap that produces catastrophic outcomes, because a sanctioned payment that clears is irreversible and the penalties dwarf anything a startup can absorb. The correct approach is the opposite of deferral: wire screening in before launch, almost certainly via a compliance vendor’s API rather than building it in-house (step twelve), so that no payment can settle without being screened. A startup meets the obligation with leverage, vendor tooling and a single choke point through which all money moves, not by postponing the one control where a miss is unforgivable.
-
Your transaction-monitoring queue has a ninety-five percent false-positive rate and analysts are drowning. A vendor pitches a model that would cut alert volume by sixty percent. Under what conditions is adopting it good compliance, and under what conditions is it quietly weakening a control?
Answer. The deciding factor is not the reduction in volume; it is what the change does to the false negatives and whether that is analyzed, justified, and governed. A high false-positive rate is the normal, expensive reality of monitoring (step ten), so a tool that genuinely improves precision, fewer false alarms while catching the same or more true cases, is good compliance: it reduces the false-positive tax without reducing detection. The way to know is to test the model against historical data and confirm it would not have missed true positives the old system caught, document that analysis, route the change through change management (ideally maker-checker, step nine), and record it. By contrast, if the sixty-percent cut comes from simply raising thresholds or suppressing alerts to make the queue manageable, with no analysis of the now-missed risk, that is not tuning; it is silently disabling part of the control, and it is exactly the “missed monitoring” failure mode (step thirteen) that produces enforcement actions. Same numeric outcome, opposite compliance posture: legitimate tuning is risk-based, tested, and documented; managing a queue by blinding the detector is a quiet control failure.
-
A bank’s broker-dealer arm and its payments arm each run their own controls. A trader at the broker-dealer also happens to control a payments account at the bank. Explain why trade surveillance and AML transaction monitoring are not interchangeable, and what risk arises if each team assumes the other “has the customer covered.”
Answer. They detect different harms over different data and serve different regulators, so neither substitutes for the other. Trade surveillance (step six) watches order-book and trade events to protect market integrity, detecting insider dealing and manipulation like spoofing and wash trading; its data is orders, modifications, and cancellations, and it serves market-conduct regulators. AML transaction monitoring (step four) watches the flow of funds to detect money laundering and serves the financial-intelligence and law-enforcement regime; its data is payments and account activity, and its outputs are SARs and CTRs. The same person can be perfectly clean on one axis and abusive on the other: a trader whose orders show no manipulation may still be laundering money through their payments account, and vice versa. The risk in each team assuming the other “has it covered” is a coverage gap born of misplaced assumption: surveillance never looks at the funds flow, monitoring never looks at the order flow, and the behavior that only shows up when you correlate the two, or that simply falls in the seam between the two systems, goes undetected by both. A firm that does both must run both families of controls explicitly and, ideally, correlate them, rather than letting either team treat the other’s coverage as its own.
-
An examiner asks to see proof that your firm screened a specific payment, made six months ago, against the sanctions list as it stood that day. Your system blocked the payment correctly, but you cannot reconstruct which list version was used or produce the screening record. Are you compliant on this transaction, and what does this reveal about how controls must be built?
Answer. Operationally you did the right thing, the payment was blocked, but from the examiner’s standpoint you have a real problem, because an unprovable control is treated as an absent control (steps eight and thirteen). Compliance is not only doing the right thing; it is being able to demonstrate you did it, on demand, for a specific transaction, as of a specific moment. If you cannot reproduce the list version, the match decision, the timestamp, and the disposition, you cannot prove the control ran correctly, and the regulator cannot distinguish a sound program from luck. This reveals that recordkeeping is not a byproduct of a control; it is part of the control. Every screen, block, hold, and decision must write durable, tamper-evident, append-only evidence, retained for the required period, including the exact list version used, so that any past decision can be reconstructed exactly. The same immutability discipline that keeps a ledger honest is what makes a compliance control provable. Build the audit trail as a first-class, non-negotiable output of every control, or you will be unable to answer the examiner’s most basic question even when you actually did everything right.
Sources & evidence16 claims · 8 cited
Grounded in US BSA/AML, USA PATRIOT Act CIP, OFAC sanctions, FinCEN SAR/CTR rules, SEC/FINRA conduct and recordkeeping, and Reg BI; thresholds and retention periods are stated as the common US conventions and flagged as firm/jurisdiction-specific. Gaps: non-US regimes (EU AMLD, UK FCA) and exact per-record retention tables are summarized rather than enumerated.
- A control is a mechanism that enforces a requirement and produces evidence it ran, distinct from a policy which only states intent; regulators evaluate effectiveness and evidence on specific transactions, not paperwork.stable common knowledge
- The customer identification program (CIP) requires collecting at minimum name, date of birth, address, and an identification number before opening an account, and verifying identity documentarily or non-documentarily, with recordkeeping; it derives from the USA PATRIOT Act of 2001 and implementing regulations.verified
- OFAC administers US economic sanctions and publishes the Specially Designated Nationals (SDN) list; many sanctions programs impose strict liability, so processing a prohibited transaction is a violation regardless of intent or knowledge.verified
- Sanctions screening requires fuzzy matching (phonetic, edit-distance, name-component) because listed parties appear under varied transliterations, orderings, and deliberate misspellings; exact matching misses real hits.verified
- A currency transaction report (CTR) must be filed for cash transactions exceeding $10,000 by or on behalf of one person in a single business day, including aggregated multiple transactions; the rule is objective and threshold-based.verified
- A suspicious activity report (SAR) must be filed when a firm knows, suspects, or has reason to suspect illicit activity or evasion; it generally must be filed within 30 calendar days of detecting the warranting facts and is strictly confidential (no tipping off the customer).verified
- SAR and CTR filings go to FinCEN, the US Financial Crimes Enforcement Network, which aggregates reports across institutions and shares them with law enforcement.verified
- Money laundering is classically described in three phases: placement, layering, and integration; structuring is breaking amounts below a reporting threshold (e.g. just under $10,000) to evade the CTR and is itself illegal.stable common knowledge
- Trade surveillance detects market abuse including insider trading, spoofing (placing orders intended to be canceled to mislead), layering, wash trading, and front-running, by reconstructing order, modification, and cancellation sequences.verified
- Regulation Best Interest (Reg BI), adopted by the SEC and effective in 2020, requires broker-dealers to act in a retail customer's best interest at the time of a recommendation and not place firm or broker interest ahead of the customer's, layering disclosure, care, and conflict-of-interest obligations above the older suitability standard.verified
- Securities recordkeeping rules require retention of books and records for defined periods (commonly three or six years depending on the record) and historically required certain records in non-rewritable, non-erasable WORM format for tamper-evidence.verified
- Segregation of duties (maker-checker / four-eyes) requires that the person who initiates a sensitive action not be the one who approves it, making fraud require collusion and catching errors with a second review; systems must enforce that approver and proposer are different identities and record both.stable common knowledge
- Transaction monitoring typically produces false-positive rates well above 90 percent, so the cost of the control is dominated by analysts clearing benign alerts; alert tuning trades false negatives against false positives and must be risk-based, tested against historical data, governed, and documented rather than done to manage workload.verified
- Large institutions organize compliance under the three-lines-of-defense model: the business as first line operating controls, an independent compliance/risk function as second line, and internal audit as third line; a designated AML compliance officer is accountable for the program.verified
- Compliance controls should be engineered inline with the transaction as enforced stages (screen, block, hold, record) that cannot be bypassed, with sanctions screening synchronous and blocking while transaction monitoring is asynchronous and detective.internal reasoning
- Fundamental compliance obligations are fixed by law while implementation (thresholds, vendors, match algorithms, org structure) is firm-specific and risk-based and must be justified.internal reasoning
Cited sources
- FFIEC Bank Secrecy Act/Anti-Money Laundering Examination Manual · Federal Financial Institutions Examination Council
- Customer Identification Program rule (31 CFR 1020.220) under the USA PATRIOT Act · US Department of the Treasury / FinCEN
- OFAC Sanctions Programs and Specially Designated Nationals (SDN) List, and A Framework for OFAC Compliance Commitments · US Treasury Office of Foreign Assets Control
- Bank Secrecy Act reporting requirements: CTR and SAR filing rules · FinCEN, US Department of the Treasury
- FATF Recommendations and AML/CFT typologies · Financial Action Task Force
- FINRA and SEC market manipulation and insider trading rules; SEC Rule 10b-5 · US Securities and Exchange Commission / FINRA
- Regulation Best Interest (Reg BI), Rule 15l-1 under the Securities Exchange Act · US Securities and Exchange Commission
- SEC broker-dealer recordkeeping rules (Exchange Act Rules 17a-3 and 17a-4) · US Securities and Exchange Commission