Feature: Price recorder
Here is the price recorder MR. Adding a dense table, rune_price
to Midgard which contains the median price of Rune using TOR on each block. The table itself can be used further to unleash great analytics and detailed info about each event in THORNode.
The table joins itself with swap_events
to create Timescaledb continues aggregation with real-time USD volume instead of calculating the volume on each time bucket medium RUNE price. Also, this MR shows it's relatively super easy to add Volume USD for LP, Savers, etc just by joining rune_price
to their aggregation.
Here are the changes in this MR:
- Adding
rune_price
table which has the rune price from TOR on each block height - Adding real-time
volume-usd
to swap aggregation and being capable of being added to any other aggregation - Upgrading PostgreSQL to v15 and timescale to 2.13. This is needed for JOIN in continuous aggregation. Also, it should make performance better considering their version changelog