Skip to content

Commit

Permalink
fix voting power calc
Browse files Browse the repository at this point in the history
  • Loading branch information
quasisamurai committed Jul 7, 2023
1 parent adbe3e1 commit 8bdec04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/neutron-oracle/src/voting_power.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use astroport::asset::Decimal256Ext;
use cosmwasm_std::{Decimal256, Deps, StdResult, Uint128, Uint64};
use std::ops::Div;
use std::ops::Mul;

pub fn voting_power_from_lp_tokens(
deps: Deps,
Expand Down Expand Up @@ -32,6 +32,6 @@ pub fn voting_power_from_lp_tokens(
}

Ok(Decimal256::from_ratio(lp_tokens, total_lp_tokens)
.div(Decimal256::from_integer(ntrn_balance_in_pool)))
.mul(Decimal256::from_integer(ntrn_balance_in_pool)))
}
}

0 comments on commit 8bdec04

Please sign in to comment.