-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SMA calculations for fleet rates in VaultRatesService (#852) #862
Conversation
This update introduces the calculation of 24-hour, 7-day, and 30-day simple moving averages (SMA) for fleet interest rates. The new structure includes an 'sma' object in the FleetRateResult interface, which aggregates these values for each fleet address. The implementation fetches hourly and daily rates in parallel and processes them to compute the SMAs, enhancing the data returned by the VaultRatesService. ## Description [Provide a brief description of the changes in this PR] ## Changes - [List the main changes made in bullet points] ## Benefits 1. [List the benefits of these changes] 2. 3. ## Testing [Describe how these changes were tested or how they can be tested] ## Next steps - [List any follow-up actions or considerations] ## Additional Notes [Any additional information, context, or notes for reviewers] Please review and provide any feedback or suggestions for improvement.
WalkthroughThe update extends the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Service as getLatestRates
participant DB1 as fleetInterestRate
participant DB2 as hourlyFleetInterestRate
participant DB3 as dailyFleetInterestRate
Client->>Service: Request Latest Rates
Service->>DB1: Query fleet rates
Service->>DB2: Query hourly rates
Service->>DB3: Query daily rates
DB1-->>Service: Return fleet rates
DB2-->>Service: Return hourly rates
DB3-->>Service: Return daily rates
Service->>Service: Compute SMAs (24h, 7d, 30d)
Service->>Client: Return aggregated data
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
Scope: all 3 workspace projects Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (11)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This update introduces the calculation of 24-hour, 7-day, and 30-day simple moving averages (SMA) for fleet interest rates. The new structure includes an 'sma' object in the FleetRateResult interface, which aggregates these values for each fleet address. The implementation fetches hourly and daily rates in parallel and processes them to compute the SMAs, enhancing the data returned by the VaultRatesService.
Description
[Provide a brief description of the changes in this PR]
Changes
Benefits
Testing
[Describe how these changes were tested or how they can be tested]
Next steps
Additional Notes
[Any additional information, context, or notes for reviewers]
Please review and provide any feedback or suggestions for improvement.
Description
[Provide a brief description of the changes in this PR]
Changes
Benefits
Testing
[Describe how these changes were tested or how they can be tested]
Next steps
Additional Notes
[Any additional information, context, or notes for reviewers]
Please review and provide any feedback or suggestions for improvement.
Summary by CodeRabbit