pub struct Params {
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,
}
Expand description
Params defines the module parameters for the x/oracle module.
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. Ex: “900.000000069s” corresponds to 900 seconds and 69 nanoseconds in JSON.
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 Message for Params
impl Message for Params
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
.impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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.