Skip to content

Auditing past trade adjustments

In Late trade adjustments we saw the ability to make changes to the previous day’s records.

Let’s say instead of backfilling a trade to the previous day, someone adds a trade a month ago.

Run
Open in xt-play

Now when the auditors come in, they check for changes since they last were here:

Run
Open in xt-play

They can’t find the trade we inserted into last month!

If we want to allow editing the timeline, how can we detect this?

In XTDB we use system-time (a.k.a. wall-clock time), an immutable timeline that gets appended to with every change. This means our fraudulent/malicious/accidental edit from earlier gets caught easily:

Run
Open in xt-play

In fact we can even scan the system for suspicious or unusual changes. For example, any retroactive changes to valid-time that go back further than 24 hours:

Run
Open in xt-play

Conclusion: As an immutable database, XTDB keeps you safe from your own changes by making sure to record when they happened. Even when reaching into the past!