Skip to content

Commit

Permalink
fmt --
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Jan 2, 2025
1 parent d10fbaa commit 8eab9b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions programs/drift/src/controller/liquidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,16 @@ pub fn liquidate_perp(
if perp_market.status != MarketStatus::Settlement {
let oracle_price_too_divergent = is_oracle_too_divergent_with_twap_5min(
oracle_price,
perp_market.amm.historical_oracle_data.last_oracle_price_twap_5min,
perp_market
.amm
.historical_oracle_data
.last_oracle_price_twap_5min,
state
.oracle_guard_rails
.max_oracle_twap_5min_percent_divergence()
.cast()?,
)?;

validate!(!oracle_price_too_divergent, ErrorCode::PriceBandsBreached)?;
}
}
Expand Down

0 comments on commit 8eab9b7

Please sign in to comment.