Entimema

Reversals, Chargebacks and Corrections Without Corrupting Risk State

Entimema
Contents

A borrower pays €500. The account becomes current and collections stops. Two days later the payment reverses. Deleting the payment or silently setting its amount to zero may repair today's balance—but it destroys the explanation of everything that happened between.

DELETE FROM payments
WHERE payment_id = 'pmt_501';

-- Equally unsafe without preserved lineage:
UPDATE payments SET amount_minor = 0
WHERE payment_id = 'pmt_501';

The institution loses the original payment, the cure, the collections hold, the reversal timing and the reason delinquency reopened.

History = { E, R(E) }; not ∅
Compensating history

Compensation records that an event happened and was later undone

Effect(E) + Effect(R(E)) = 0 for the relevant state dimension
Full compensation principle
DELETION

Pretends the economic event never occurred and leaves intermediate decisions inexplicable.

COMPENSATION

Preserves the original fact, the later undoing, their timing and causal relationship.

type ReversalEvent = {
  eventId: string;
  eventType: "PAYMENT_REVERSED";
  reversalOf: string;
  amountMinor: bigint;
  effectiveTime: Date;
  reasonCode?: string;
};

Causal linkage is as important as amount. Do not mutate PAYMENT_SETTLED into PAYMENT_FAILED when it genuinely settled and later reversed: those are two economic events.

Reversal and correction semantics
EventMeaningState treatment
Full reversalCancels the remaining original effectRestore the complete realised allocation
Partial reversalCancels part of the original effectRestore only causally specified components
Chargeback lifecycleDispute/recovery process with its own statesKeep dispute state separate from financial reversal
CorrectionOriginal attributes were wrongCompensate old effect and emit correct replacement where needed
Pending reversalPotential future reversalDo not undo until the governed economic state is reached

Corrections form a graph, not merely a chronological list

PAYMENT Areversed by ↓REVERSAL Bcorrected by ↓CORRECTION C
PARTIAL R₁PARTIAL R₂
Typed edges distinguish reversal, supersession and correction; branches can represent partial compensation while history stays immutable.

Use different relations such as reversalOf, supersedesEventId, corrects, allocates and derivedFrom; one overloaded parent field hides meaning. Prevent causal cycles such as A reverses B while B reverses A unless domain semantics explicitly support them.

A wrong-account correction must retain: original application to Account A, reversal from A, and corrected application to Account B. Mutating account_id would silently change both accounts' DPD, collections history, features, statements and reconciliation before the institution knew of the error.

ENTIMEMA FRAMEWORKCorrection workflow
  1. Detect
  2. Validate
  3. Emit correction
  4. Restate state
  5. Rebuild dependencies
  6. Preserve historical decisions
  7. Reconcile

Reverse what actually happened—not what today's rules would allocate

Suppose the €500 payment applied €50 to fees, €100 to interest and €350 to principal. Full reversal restores those exact components. Simply adding €500 to principal corrupts every component balance.

type AllocationComponent = {
  component: "FEE" | "INTEREST" | "PRINCIPAL";
  amountMinor: bigint;
};

type CompensationRecord = {
  originalEventId: string;
  compensatingEventId: string;
  compensatedMinor: bigint;
  remainingReversibleMinor: bigint;
};

If a €500 payment is reversed by €150 then €200, €150 remains applied. Validate cumulative compensation so Σ Reversals ≤ Remaining Original Applied Amount. Partial restoration can be source-defined or component-specific; never invent proportional allocation without economic authority.

The reducer restores components deterministically

function reverseAllocation(
  state: LoanState,
  allocation: PaymentAllocation
): LoanState {
  return recalculate({
    ...state,
    feeBalanceMinor:
      state.feeBalanceMinor + allocation.feesAppliedMinor,
    accruedInterestMinor:
      state.accruedInterestMinor + allocation.interestAppliedMinor,
    principalMinor:
      state.principalMinor + allocation.principalAppliedMinor,
    version: state.version + 1
  });
}

This illustration omits product-specific adjustments. The reducer loads the stored original allocation; it does not recalculate unrelated rules. Reopened principal may change interest base, exposure or later accruals, so compensation can trigger downstream recalculation beyond one monetary write.

CumulativeReversedAmount ≤ OriginalAppliedAmount
Cumulative reversal concurrency invariant

Rebuild DPD; never “set it back”

PAYMENTALLOCATIONARREARS CLEAREDCUREPAYMENT REVERSALARREARS REOPENDPD RECALCULATED
A reversal restores contractual unpaid amounts; arrears and DPD are then derived from schedule and calendar state.

The unsafe operation is DPD = previous_DPD. Restore the actual payment allocation, rebuild remaining obligations, identify the oldest relevant unpaid due date, then calculate DPD using current approved calendar rules.

REVERSED CURE

The curing payment was undone, often indicating returned or corrected payment processing.

RE-DEFAULT

The borrower genuinely cured and later deteriorated again through new behaviour.

These paths are not methodologically interchangeable. A promise-to-pay that appeared kept may become reversed or not sustainably fulfilled; retain the original observation and later reversal rather than rewriting it.

Compensation propagates into risk, collections and recovery economics

Downstream reversal impact
DomainPotential changeHistorical control
CollectionsReopen delinquency and reprioritiseKeep prior hold/contact actions immutable
Behavioural featuresMissed payment, payment ratio, cure and durationVersion rebuilt features; retain actual feature manifest
Risk scorePD restated may differ from actualStore counterfactual separately
Recovery / LGDRemove reversed realised recovery economicsPreserve cash-flow and reversal timing
ECLDPD, cure, EAD or stage inputs may changeTrace impact under governed reporting rules

A reversed recovery left in LGD data overstates recovery and understates loss. Yet the operational cash-flow event should not simply disappear. Model/accounting policy determines the treatment of original and reversed discounted recovery; the event layer supplies immutable timing and lineage.

Materiality(R) = f(Amount, Exposure, StateDelta, DecisionDelta)
Reversal materiality

The event layer reconciles to the ledger; it does not replace it

Event Store ≠ General Ledger
Separation of authority

Canonical events explain operational and economic history. Accounting remains authoritative for ledger state through debit/credit, clearing and correcting entries. A timing interval where operational reversal state differs from posted accounting state can be legitimate when explicitly classified.

ENTIMEMA FRAMEWORKReversal reconciliation lifecycle
  1. Reversal event
  2. Operational state restated
  3. Accounting posting
  4. Reconciliation match

Track original time, reversal time, posting time and risk-effective time. Collections may need governed early knowledge of likely reversal while monthly Finance waits for formal posting; finality is decision-specific, not one universal status.

Out-of-order reversals wait for their causal parent

A reversal with no resolvable original is an orphan reversal. It may indicate delivery order, a missing source event or identity mismatch. Do not apply it blindly.

REVERSAL WITH MISSING PARENTUNRESOLVED DEPENDENCY QUEUEWAIT / RETRY / RECONCILE

When the parent arrives, resolve identity and causal linkage, then replay deterministically using effective time, causal order and source sequence where available. A correction to a reversal is another event: E → R(E) → C(R(E)).

Claim, validate, compensate and mutate in one boundary

Where possible, reversal processing atomically claims the reversal identity, validates the parent, updates cumulative compensation and updates account state. Two simultaneous partial reversals must not both observe the same remaining amount.

await db.transaction(async (tx) => {
  const claimed = await claimEvent(tx, reversal.eventId);
  if (!claimed) return;

  const original = await lockOriginalAllocation(tx, reversal.reversalOf);
  assertReversible(original, reversal.amountMinor);
  await recordCompensation(tx, original, reversal);
  await restoreAllocation(tx, original, reversal);
});

Database constraints, row locks or expected-version updates enforce the cumulative invariant under concurrency. Duplicate reversal delivery then becomes a no-op instead of an impossible negative economic effect.

Backdated reversal repairs economics without changing what was known

A reversal effective yesterday but received today can invalidate a later snapshot. Rebuild Staterestated from a safe boundary while retaining Stateknown for yesterday's actual decisions.

Do not rewrite CollectionsDecision = HOLD because the reversal arrived later. Record that corrected state would have produced another action and classify impact: DPD changed, cure reversed, priority changed, PD changed or ECL input changed.

State(snapshot + valid reversal tail) = State(full replay)
Snapshot replay parity

A golden reversal stream proves component restoration

A fictional facility draws €5,000, charges a €50 fee and accrues €100 interest. A €500 payment allocates €50 fee, €100 interest and €350 principal, leaving €4,650 outstanding.

Golden reversal stream; all values fictional
StepEventPrincipalInterestFeeOutstanding
1Drawdown €5,000€5,000€0€0€5,000
2Fee €50€5,000€0€50€5,050
3Interest €100€5,000€100€50€5,150
4Payment €500€4,650€0€0€4,650
5Partial reversal €200 (restores fee €50, interest €100, principal €50)€4,700€100€50€4,850
6Duplicate delivery of reversal€4,700€100€50€4,850
7Second valid reversal €300 (restores remaining principal)€5,000€100€50€5,150

The final monetary state equals the state before the payment, while history contains payment, two valid compensation events and one suppressed duplicate delivery.

State(E, R(E)) = StateWithoutEconomicEffect(E), while EventHistory differs
Full compensation test

Test the failure shapes, not only the happy-path balance

Minimum reversal test architecture
TestProof
Full / partial reversalExact realised components restore
Duplicate reversalEffect occurs once
Multiple partialsCumulative amount stays within original
Over-reversalReject or quarantine atomically
Orphan / out of orderWait; parent arrival enables deterministic replay
Wrong-account correctionA reverses; B receives replacement
Correction of correctionCausal chain remains complete
After snapshotInvalidate or use a prior safe snapshot
Cure / DPD impactRebuild arrears and DPD, never restore cached value

Also inject duplicates of both original and reversal, compare snapshot-tail with full replay, verify allocation conservation after every step and assert that historical decisions remain unchanged.

Monitor reversal integrity and downstream materiality

ReversalRateChargebackRateOrphanReversalRateCorrectionRateReversalProcessingLagDecisionImpactRate
ReversalAge = Treversal − Toriginal
Reversal age

No universal thresholds apply. Slice by source, event type, product, provider and reason. Long-lag reversals often reach deeper into cure history, recovery, model data and prior decisions. Repeated account-mapping or payment-type corrections reveal structural integration debt.

The Entimema reversal architecture preserves causality end to end

ORIGINAL EVENTALLOCATION / STATE EFFECTREVERSAL / CHARGEBACK / CORRECTIONCAUSAL RESOLVERCOMPENSATION ENGINESTATE REPLAY / RECALCULATIONDPD / CURE / RISK STATEACCOUNTING RECONCILIATIONDECISION IMPACT
The causal resolver finds the original effect; the compensation engine restores realised allocation before downstream state and decisions are recalculated.
ENTIMEMA FRAMEWORKEntimema reversal decision framework
  1. Identify original event
  2. Validate causality
  3. Determine full / partial compensation
  4. Restore original allocation
  5. Recalculate derived state
  6. Rebuild dependencies
  7. Preserve decisions
  8. Reconcile
  9. Monitor

A Reversal & Correction Integrity Agent can validate compensation evidence

A future controlled agent can detect reversals, resolve parents, identify orphans, monitor cumulative compensation, reconstruct original allocation, compare pre/post state, trace DPD and cure changes, quantify recovery/LGD impact and reconcile operational with accounting correction state.

Continue with Late-Arriving Events and Backdated Corrections, Reconstructing Account State from Financial Events, Idempotency in Payment and Credit Event Processing, Event Time vs Processing Time vs Posting Time, The Payment Is Not the Balance, Cure & Re-Default Analytics, Promise-to-Pay Analytics, Collections Prioritisation and IFRS 9 LGD. A dedicated DPD engine and cross-function event reconciliation remain future research directions, not fabricated routes.