Skip to content

Commit d04ce00

Browse files
authored
update max price offset (#220)
1 parent c3b159d commit d04ce00

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

token-lending/sdk/src/state/rate_limiter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ impl Pack for RateLimiter {
205205
}
206206

207207
#[cfg(test)]
208+
/// generate a random rate limiter for testing
208209
pub fn rand_rate_limiter() -> RateLimiter {
209210
use rand::Rng;
210211
let mut rng = rand::thread_rng();

token-lending/sdk/src/state/reserve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub const MAX_BONUS_PCT: u8 = 25;
3636
pub const MAX_PROTOCOL_LIQUIDATION_FEE_DECA_BPS: u8 = 50;
3737

3838
/// Upper bound on scaled price offset
39-
pub const MAX_SCALED_PRICE_OFFSET_BPS: i64 = 2000;
39+
pub const MAX_SCALED_PRICE_OFFSET_BPS: i64 = 5000;
4040

4141
/// Lower bound on scaled price offset
4242
pub const MIN_SCALED_PRICE_OFFSET_BPS: i64 = -2000;
@@ -2380,7 +2380,7 @@ mod test {
23802380
}),
23812381
Just(ReserveConfigTestCase {
23822382
config: ReserveConfig {
2383-
scaled_price_offset_bps: 2001,
2383+
scaled_price_offset_bps: 5001,
23842384
..ReserveConfig::default()
23852385
},
23862386
result: Err(LendingError::InvalidConfig.into()),

0 commit comments

Comments
 (0)