Example: Fintech Transaction Guard

Block a $340K wire transfer to an OFAC-flagged jurisdiction using multi-guard consensus with five specialist personas.

Scenario

A payments automation agent at a mid-size fintech initiates a $340,000 wire transfer to a correspondent bank in a jurisdiction flagged by the Office of Foreign Assets Control (OFAC). The transfer was requested at 2:47 AM ET -- outside normal business hours -- and exceeds the sender's historical maximum transaction by 4x.

Before the wire reaches the SWIFT gateway, the transaction guard intervenes. Five specialist personas evaluate the transfer independently, each staking reputation tokens on their assessment. The wire is blocked unanimously.

What happens without the guard

The wire clears in under 90 seconds. The institution is now in potential violation of OFAC sanctions regulations. A Suspicious Activity Report (SAR) must be filed retroactively with FinCEN. The bank faces civil penalties of up to $356,579 per violation under OFAC's Economic Sanctions Enforcement Guidelines, plus reputational damage and potential debarment from correspondent banking networks.

The five guard personas

Persona IDRoleEvaluates
fraud-analystFraud detection specialistTransaction velocity, amount anomalies, time-of-day patterns
bsa-aml-reviewerBSA/AML compliance reviewerSanctions list screening, jurisdictional risk, beneficial ownership
compliance-officerSenior compliance officerRegulatory exposure, SAR filing obligations, enforcement precedent
transaction-risk-analystQuantitative risk analystSender history deviation, counterparty risk scoring, exposure limits
operations-engineerPayment operations engineerSWIFT message integrity, cut-off windows, fallback routing

Full working example

1

Initialize the board

import { LocalBoard, createStorage } from "@consensus-tools/core";

const config = {
  storage: { type: "sqlite", path: "./transaction-guard.db" },
  consensus: {
    defaultPolicy: "UNANIMOUS",
    quorum: 5,
    stakeRequired: 10,
  },
};

const storage = await createStorage(config);
const board = new LocalBoard(config, storage);
await board.init();

// Fund all guard personas
const personas = [
  "fraud-analyst",
  "bsa-aml-reviewer",
  "compliance-officer",
  "transaction-risk-analyst",
  "operations-engineer",
];
for (const persona of personas) {
  await board.ledger.faucet(persona, 200);
}
2

Post the transaction review job

The payments agent posts the wire transfer details as a job. Every field here comes from the actual SWIFT MT103 message and internal transaction metadata.

const job = await board.engine.postJob("payments-automation-agent", {
  title: "Wire Transfer Review: $340,000 to correspondent bank (OFAC-flagged jurisdiction)",
  description: "Evaluate outbound wire for sanctions risk, fraud indicators, and compliance exposure",
  input: JSON.stringify({
    transaction_id: "WR-2026-0319-0247-9A3F",
    type: "SWIFT_MT103",
    amount_usd: 340_000,
    sender: {
      account_id: "ACT-881204",
      name: "Meridian Capital Partners LLC",
      historical_max_transaction: 82_000,
      account_age_days: 411,
      avg_monthly_volume: 145_000,
    },
    beneficiary: {
      bank_swift: "REDACTED-BIC",
      jurisdiction: "OFAC-FLAGGED-JURISDICTION",
      jurisdiction_risk_tier: "HIGH",
    },
    metadata: {
      initiated_at: "2026-03-19T02:47:12Z",
      initiated_by: "automated-payment-agent",
      business_hours: false,
      amount_to_historical_max_ratio: 4.15,
    },
  }),
  reward: 50,
  stakeRequired: 10,
  consensusPolicy: { type: "UNANIMOUS", quorum: 5 },
  expiresInSeconds: 300,
});

console.log(`Job posted: ${job.id}`);
3

Each persona claims and submits their evaluation

All five personas evaluate the transaction independently. Each stakes 10 reputation tokens on their assessment.

// --- Fraud Analyst ---
await board.engine.claimJob("fraud-analyst", job.id, {
  stakeAmount: 10,
  leaseSeconds: 120,
});
await board.engine.submitJob("fraud-analyst", job.id, {
  summary: "BLOCK — Amount exceeds sender historical max by 4.15x. Initiated at 02:47 ET (outside business hours). Pattern consistent with account takeover or authorized push payment fraud.",
  confidence: 0.96,
  artifact: {
    verdict: "BLOCK",
    flags: ["AMOUNT_ANOMALY", "OFF_HOURS_INITIATION", "VELOCITY_SPIKE"],
    risk_score: 94,
    details: "Sender's previous max was $82K over 411 days. A $340K wire at 2:47 AM with no prior transactions above $100K is a textbook anomaly. Recommend immediate hold and manual review.",
  },
});

// --- BSA/AML Reviewer ---
await board.engine.claimJob("bsa-aml-reviewer", job.id, {
  stakeAmount: 10,
  leaseSeconds: 120,
});
await board.engine.submitJob("bsa-aml-reviewer", job.id, {
  summary: "BLOCK — Beneficiary jurisdiction is on OFAC SDN-adjacent watchlist. Transaction must not proceed without enhanced due diligence and OFAC license verification.",
  confidence: 0.99,
  artifact: {
    verdict: "BLOCK",
    flags: ["OFAC_JURISDICTION", "SANCTIONS_SCREENING_FAIL", "NO_OFAC_LICENSE"],
    regulatory_refs: ["31 CFR Part 501", "OFAC SDN List", "BSA Section 314(a)"],
    details: "Correspondent bank operates in a jurisdiction subject to comprehensive OFAC sanctions. No specific license on file. Proceeding would constitute a potential sanctions violation requiring mandatory SAR filing under 31 USC 5318(g).",
  },
});

// --- Compliance Officer ---
await board.engine.claimJob("compliance-officer", job.id, {
  stakeAmount: 10,
  leaseSeconds: 120,
});
await board.engine.submitJob("compliance-officer", job.id, {
  summary: "BLOCK — Regulatory exposure is severe. Wire to sanctioned jurisdiction without OFAC license exposes institution to civil penalties up to $356K per violation and potential criminal referral.",
  confidence: 0.98,
  artifact: {
    verdict: "BLOCK",
    flags: ["REGULATORY_EXPOSURE_CRITICAL", "SAR_REQUIRED", "ENFORCEMENT_RISK"],
    details: "Under OFAC's Economic Sanctions Enforcement Guidelines (2009), this transaction presents multiple aggravating factors: automated initiation, high dollar amount, sanctioned jurisdiction. Civil penalty up to $356,579 per violation. If willful, criminal penalties under IEEPA up to $1M and 20 years. Block and escalate to BSA Officer.",
  },
});

// --- Transaction Risk Analyst ---
await board.engine.claimJob("transaction-risk-analyst", job.id, {
  stakeAmount: 10,
  leaseSeconds: 120,
});
await board.engine.submitJob("transaction-risk-analyst", job.id, {
  summary: "BLOCK — Statistical deviation is 4.8 sigma from sender's transaction profile. Counterparty risk score exceeds threshold. Exposure limit breach.",
  confidence: 0.95,
  artifact: {
    verdict: "BLOCK",
    flags: ["SIGMA_DEVIATION_4.8", "COUNTERPARTY_RISK_EXCEEDED", "EXPOSURE_LIMIT_BREACH"],
    risk_metrics: {
      sender_deviation_sigma: 4.8,
      counterparty_risk_score: 91,
      daily_exposure_limit_remaining: 50_000,
      transaction_amount: 340_000,
    },
    details: "Transaction amount is 4.8 standard deviations from sender's 12-month moving average ($38K, sigma $62.9K). Counterparty risk score of 91/100 exceeds auto-block threshold of 75. Transaction also exceeds remaining daily exposure limit by $290K.",
  },
});

// --- Operations Engineer ---
await board.engine.claimJob("operations-engineer", job.id, {
  stakeAmount: 10,
  leaseSeconds: 120,
});
await board.engine.submitJob("operations-engineer", job.id, {
  summary: "BLOCK — Wire initiated outside SWIFT cut-off window for destination corridor. No fallback routing available. Even if compliance cleared, operational execution would fail or route through non-preferred intermediary.",
  confidence: 0.88,
  artifact: {
    verdict: "BLOCK",
    flags: ["OUTSIDE_CUTOFF_WINDOW", "NO_FALLBACK_ROUTE", "INTERMEDIARY_RISK"],
    details: "SWIFT value-date cut-off for this corridor is 22:00 ET. Initiation at 02:47 ET would push settlement to T+2 minimum. No pre-approved fallback intermediary for this jurisdiction. Wire would queue in limbo state, increasing operational and compliance risk.",
  },
});
4

Resolve the job

With all five submissions in, the board resolves using the UNANIMOUS policy. Every persona voted BLOCK.

const resolution = await board.engine.resolveJob(
  "payments-automation-agent",
  job.id
);

console.log("Decision:", resolution);
// {
//   outcome: "BLOCK",
//   unanimousVerdict: true,
//   submissions: 5,
//   blockVotes: 5,
//   allowVotes: 0,
//   winners: [
//     "fraud-analyst",
//     "bsa-aml-reviewer",
//     "compliance-officer",
//     "transaction-risk-analyst",
//     "operations-engineer"
//   ]
// }
5

Reputation settlement after human confirmation

A human compliance officer reviews the block decision and confirms it was correct. The board settles reputation: all five personas receive their stake back plus a share of the reward.

// Human confirms the block was correct — settle reputation
for (const persona of personas) {
  await board.ledger.payout(persona, 10, job.id); // reward share
}

// Check updated balances
const balances = await board.ledger.getBalances();
console.log(balances);
// {
//   "fraud-analyst": 200,       // 200 - 10 stake + 10 reward = 200
//   "bsa-aml-reviewer": 200,
//   "compliance-officer": 200,
//   "transaction-risk-analyst": 200,
//   "operations-engineer": 200,
// }

Reputation drives future weight

Over time, personas that consistently make correct calls on high-stakes transactions accumulate higher reputation balances. The board can use these balances to weight future votes -- a fraud analyst with a strong track record has more influence than one who has been slashed for false positives.

The audit trail

Every step above is persisted as a board artifact. After resolution, the transaction guard has produced an immutable audit trail:

const status = await board.engine.getStatus(job.id);
console.log(JSON.stringify(status, null, 2));

The audit trail contains:

ArtifactContents
Job recordFull transaction details, SWIFT message fields, sender profile
5 submissionsEach persona's independent evaluation, flags, risk scores, regulatory references
Resolution recordUnanimous BLOCK decision, timestamp, all participant IDs
Ledger entriesStake locks, reward payouts, balance snapshots

Regulatory audit readiness

This artifact trail satisfies BSA/AML recordkeeping requirements under 31 CFR 1010.410 (wire transfer records) and provides documentary evidence for SAR narrative sections. When examiners or OFAC investigators request transaction review documentation, every decision point is traceable to a specific persona evaluation with timestamped rationale.

Key regulatory references

  • OFAC SDN List -- Office of Foreign Assets Control Specially Designated Nationals list. Financial institutions must screen all transactions against this list.
  • BSA/AML (Bank Secrecy Act) -- Requires financial institutions to maintain anti-money-laundering programs, file SARs for suspicious transactions, and keep wire transfer records.
  • 31 USC 5318(g) -- Mandates Suspicious Activity Report filing when a transaction involves funds derived from illegal activity or is designed to evade BSA requirements.
  • IEEPA (International Emergency Economic Powers Act) -- Authorizes OFAC sanctions. Criminal penalties for willful violations: up to $1M fine and 20 years imprisonment.