Skip to content

Conversation

@bplatak
Copy link
Contributor

@bplatak bplatak commented Jul 24, 2025

Summary

Add a new field to represent funding rate interval to funding rate update messages in protobuf objects and jrpc domain.

Rationale

We're adding support for variable funding rate updates in lazer as part of PF-278

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@linear
Copy link

linear bot commented Jul 24, 2025

@vercel
Copy link

vercel bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
component-library ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
entropy-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
entropy-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 1:44pm

Comment on lines 57 to 61
enum FundingRateInterval {
INTERVAL_1H = 0;
INTERVAL_4H = 1;
INTERVAL_8H = 2;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like a good idea to restrict the possible set of values here. Why not use a Duration?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, maybe in the future people have half an hour too :D

Copy link
Contributor

@Riateche Riateche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see one comment below. Otherwise, LGTM!

pub confidence: Option<Price>,
pub funding_rate: Option<Rate>,
pub funding_timestamp: Option<TimestampUs>,
pub funding_rate_interval: Option<u64>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use DurationUs here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants