Closed masterjacy01 closed 1 month ago
The changes involve a significant update to the vault aggregation and data retrieval system, transitioning from daily to hourly data aggregation. New methods have been introduced for fetching historical Total Value Locked (TVL) and price data, alongside the addition of new properties and classes to accommodate these changes. The modifications enhance the functionality of various services and controllers, allowing for more frequent and detailed data access regarding vault tokens.
Files | Change Summary |
---|---|
src/aggregators/vault-aggregator/vault-aggregator.service.ts |
Renamed method for aggregation frequency from daily to hourly, updated scheduling function, and modified aggregation logic to reflect hourly data processing. |
src/api/vaults/vaults-data-provider/vaults-data-provider.ts |
Added methods getHistoricTvl and getHistoricPrice for retrieving historical data based on a provided timeframe. |
src/api/vaults/vaults.controller.ts |
Introduced two new GET endpoints (/tvl/:address and /price/:address ) for fetching historical TVL and price data, with validation and error handling. |
src/api/vaults/vaults.service.ts |
Added methods getHistoricTvl and getHistoricPrice to retrieve historical TVL and price data from the data provider. |
src/contract-connectors/arrakis-contracts/arrakis-contracts.service.ts |
Enhanced data retrieval with new variable for vault token decimals and added calculation for vaultTokenPriceUsd , modifying the return structure to include this new data. |
src/database/schemas/VaultHistoricalData.schema.ts |
Added a new required property vaultTokenPrice to the VaultHistoricalMetadata class. |
src/database/vault-db/vault-db.service.ts |
Introduced methods for retrieving historical price and TVL data, updated log message in saveVaultData method to reflect hourly data saving. |
src/dto/HistoricDataQueryParamsDto.ts |
Introduced an enum and DTO for handling historical data query parameters, including a timeframe property. |
src/dto/HistoricPriceDto.ts |
Added HistoricPriceDatapoint class to represent historical price data points with timestamp and price properties. |
src/dto/HistoricTvlDto.ts |
Added HistoricTvlDatapoint class to represent historical TVL data points with timestamp and TVL properties. |
src/shared/class/VaultHistoricalDataDto.ts |
Modified VaultHistoricalMetadataDto to include a new property vaultTokenPrice and updated the constructor accordingly. |
π° In the meadow where the vaults do play,
Hourly data hops in, brightening the day.
With prices and TVL, all in a row,
Our little rabbit hearts are aglow!
So gather 'round, friends, letβs cheer and rejoice,
For changes have come, and we all have a voice! π
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Release Notes
New Features
Improvements
Documentation