From 39f7717514e871c6d48338ee39092fa6f1000afe Mon Sep 17 00:00:00 2001 From: Jon Gurary <jonathan@psyoptions.io> Date: Tue, 13 Aug 2024 13:26:51 -0400 Subject: [PATCH] Restore using median price --- programs/marginfi/src/state/price.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/marginfi/src/state/price.rs b/programs/marginfi/src/state/price.rs index ff4477bc..7ac1f8ec 100644 --- a/programs/marginfi/src/state/price.rs +++ b/programs/marginfi/src/state/price.rs @@ -354,7 +354,7 @@ impl SwitchboardPullPriceFeed { fn get_price(&self) -> MarginfiResult<I80F48> { let sw_result = self.feed.result; // Note: Pull oracles support mean (result.mean) or median (result.value) - let price: I80F48 = I80F48::from_num(sw_result.mean) + let price: I80F48 = I80F48::from_num(sw_result.value) .checked_div(EXP_10_I80F48[switchboard_on_demand::PRECISION as usize]) .ok_or_else(math_error!())?;