Backdated transactions & effectiveVolume
Last updated: July 22, 2025
When you insert a backdated transaction (a transaction with a timestamp in the past), the Formance Ledger needs to validate and potentially recompute the state of affected accounts. Here's what happens:
Validation Process for Backdated Transactions
According to the bi-temporality documentation, when a backdated transaction is inserted:
State Recomputation: The ledger computes the new current state by applying the backdated transaction and all transactions that occurred after the backdated transaction's timestamp.
Validation Check: The ledger validates that the new computed final state doesn't put any account into a negative balance (unless overdraft is explicitly allowed).
Acceptance or Rejection: If the new state is valid, the backdated transaction is accepted. Otherwise, it's rejected.
Only Final State Validation: The ledger does not validate intermediate states - only the final computed state matters.
Account Balance Impact: All account balances that would be affected by the backdated transaction and subsequent transactions need to be recalculated.
Overdraft Exception: Accounts that have been explicitly allowed to overdraft can have negative balances in the final state.
What is effective volume ?
In version 2 of the Ledger, we introduced the notion on Effective volumes.
Effective volumes correspond to volumes as they were on the date a transaction is inserted and not on the date the transaction is created.
While “normal” volumes cannot change over time, effective volumes can change if we look into the past. This will be the only data that will escape the control of the historization (even by freezing the ledger at a date T, the actual volumes can move, because you can insert transactions before this date T).
The effective volume is the one that will be kept up-to-date, no matter how many backdated tx are inserted.
Effective volumes updates
Effective volumes are enabled if the following features are enabled :
MOVES_HISTORY:ONcf Historize funds movements by accountMOVES_HISTORY_POST_COMMIT_EFFECTIVE_VOLUMES:SYNC
Compute and maintains post commit effective volumes
While MOVES_HISTORY_POST_COMMIT_EFFECTIVE_VOLUMES guarantees data accuracy, it introduces performance bottlenecks. Set to DISABLED. you lose pre/post commit effectiveVolumes, and speed up backdated transactions update- effectiveVolumes is still updated though.
effectiveVolume is calculated upon insertion (write) of the transaction. So when you insert a transaction back at T, effectiveVolumes of transactions after T will be updated - the more transactions impacted, the more updates to process.
When inserting a fund movement in the database with the MOVES_HISTORY_POST_COMMIT_EFFECTIVE_VOLUMES enabled on the ledger, the Ledger is going to perform in addition the following steps :
Compute actual postCommitEffectiveVolumes for the moves by searching for the previous moves for account/asset pair, using the date of the move
Inserting the new move
Update any futures moves postCommitEffectiveVolumes