Skip to content

Commit

Permalink
Restore using median price
Browse files Browse the repository at this point in the history
  • Loading branch information
jgur-psyops committed Aug 13, 2024
1 parent 057dc90 commit 39f7717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion programs/marginfi/src/state/price.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!())?;

Expand Down

0 comments on commit 39f7717

Please sign in to comment.