Skip to content

update max price offset #220

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

Merged
merged 1 commit into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions token-lending/sdk/src/state/rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ impl Pack for RateLimiter {
}

#[cfg(test)]
/// generate a random rate limiter for testing
pub fn rand_rate_limiter() -> RateLimiter {
use rand::Rng;
let mut rng = rand::thread_rng();
Expand Down
4 changes: 2 additions & 2 deletions token-lending/sdk/src/state/reserve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub const MAX_BONUS_PCT: u8 = 25;
pub const MAX_PROTOCOL_LIQUIDATION_FEE_DECA_BPS: u8 = 50;

/// Upper bound on scaled price offset
pub const MAX_SCALED_PRICE_OFFSET_BPS: i64 = 2000;
pub const MAX_SCALED_PRICE_OFFSET_BPS: i64 = 5000;

/// Lower bound on scaled price offset
pub const MIN_SCALED_PRICE_OFFSET_BPS: i64 = -2000;
Expand Down Expand Up @@ -2380,7 +2380,7 @@ mod test {
}),
Just(ReserveConfigTestCase {
config: ReserveConfig {
scaled_price_offset_bps: 2001,
scaled_price_offset_bps: 5001,
..ReserveConfig::default()
},
result: Err(LendingError::InvalidConfig.into()),
Expand Down
Loading