pub struct OracleParamsMsg {
pub vote_period: u64,
pub vote_threshold: String,
pub reward_band: String,
pub whitelist: Vec<String>,
pub slash_fraction: String,
pub slash_window: u64,
pub min_valid_per_window: String,
pub twap_lookback_window: Option<Duration>,
pub min_voters: u64,
pub validator_fee_ratio: String,
pub expiration_blocks: u64,
}
Fields§
§vote_period: u64
VotePeriod defines the number of blocks during which voting takes place.
vote_threshold: String
VoteThreshold specifies the minimum proportion of votes that must be received for a ballot to pass.
reward_band: String
RewardBand defines a maxium divergence that a price vote can have from the weighted median in the ballot. If a vote lies within the valid range defined by: μ := weightedMedian, validRange := μ ± (μ * rewardBand / 2), then rewards are added to the validator performance. Note that if the reward band is smaller than 1 standard deviation, the band is taken to be 1 standard deviation.a price
whitelist: Vec<String>
The set of whitelisted markets, or asset pairs, for the module. Ex. ‘[“unibi:uusd”,“ubtc:uusd”]’
slash_fraction: String
SlashFraction returns the proportion of an oracle’s stake that gets
slashed in the event of slashing. SlashFraction
specifies the exact
penalty for failing a voting period.
slash_window: u64
SlashWindow returns the number of voting periods that specify a
“slash window”. After each slash window, all oracles that have missed more
than the penalty threshold are slashed. Missing the penalty threshold is
synonymous with submitting fewer valid votes than MinValidPerWindow
.
min_valid_per_window: String
§twap_lookback_window: Option<Duration>
Amount of time to look back for TWAP calculations
min_voters: u64
The minimum number of voters (i.e. oracle validators) per pair for it to be considered a passing ballot. Recommended at least 4.
validator_fee_ratio: String
The validator fee ratio that is given to validators every epoch.
expiration_blocks: u64
Trait Implementations§
Source§impl Clone for OracleParamsMsg
impl Clone for OracleParamsMsg
Source§fn clone(&self) -> OracleParamsMsg
fn clone(&self) -> OracleParamsMsg
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OracleParamsMsg
impl Debug for OracleParamsMsg
Source§impl Default for OracleParamsMsg
impl Default for OracleParamsMsg
Source§impl Message for OracleParamsMsg
impl Message for OracleParamsMsg
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.Source§impl PartialEq for OracleParamsMsg
impl PartialEq for OracleParamsMsg
impl StructuralPartialEq for OracleParamsMsg
Auto Trait Implementations§
impl Freeze for OracleParamsMsg
impl RefUnwindSafe for OracleParamsMsg
impl Send for OracleParamsMsg
impl Sync for OracleParamsMsg
impl Unpin for OracleParamsMsg
impl UnwindSafe for OracleParamsMsg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.