This page covers the bi-temporality feature of the ledger as well as the impact of that feature on the ledger’s data and the queries that can be run against it.
TX1
is submitted on monday, but the transaction time is set to tuesday. The transaction is considered to have occurred on tuesday. We say that the transaction is postdated.TX2
is submitted on tuesday, and the transaction time is set to monday. The transaction is considered to have occurred on monday. We say that the transaction is backdated.TX3
is submitted on tuesday, and the transaction time is set to tuesday. The transaction is considered to have occurred on tuesday. This is the default behavior.TX1
. In that case, the machine clock is on monday, but the present time is tuesday because the transaction time of TX1
is tuesday and it is the most recent transaction.
risk=high
to the account metadata. The fraud team regularly exports the suspicious accounts to an external system for further investigation. The fraud team queries the ledger at specific points in time to get the list of suspicious accounts.
Let’s consider the account customer:123456
. At a time t1
the fraud engine marks the account as suspicious by adding risk=high
to the account metadata. The fraud team exports the list of suspicious accounts at time t2
and t3
. The account will be included in the list of suspicious accounts in both exports.
risk=high
metadata from the account at time t4
located between the two exports t2
and t3
. It does so by removing the risk
metadata using a backdated transaction. In this case, the account will not be included in the list of suspicious accounts in the export at time t3
.
Time | Transaction amount | New Balance |
---|---|---|
1 | 100 | 100 |
2 | -50 | 50 |
3 | -10 | 40 |
4 | 50 | 90 |
5 | -10 | 80 |
-100
. This transaction would yield the following balance evolution:
Time | Transaction amount | New Balance |
---|---|---|
1 | 100 | 100 |
2 | -100 | 0 |
3 | -50 | -50 |
4 | -10 | -60 |
5 | 50 | -10 |
6 | -10 | -20 |
-20
, which is invalid because the account has a negative balance. This is an example of an invalid backdated transaction.
Now, consider that a user wants to insert a backdated transaction with a transaction time of 2 and an amount of -50
, rather than -100
. This transaction would yield the following balance evolution:
Time | Transaction amount | New Balance |
---|---|---|
1 | 100 | 100 |
2 | -50 | 50 |
3 | -50 | 0 |
4 | -10 | -10 |
5 | 50 | 40 |
6 | -10 | 30 |
30
, which is valid because the account has a positive balance. This is an example of a valid backdated transaction.