Message: MsgAggregateExchangeRateVote
The MsgAggregateExchangeRateVote
handler is responsible for submitting an aggregate exchange rate vote, which must match a previously submitted aggregate exchange rate prevote.
The parameters that are controllable by the user are
Salt
— This is the salt used to generate the aggregate vote hash; it must be a string of length 1 to 4.ExchangeRates
— These are the exchange rates to vote on; they must be a string of exchange rate tuples in the format of({pair},{exchange_rate})|...|({pair},{exchange_rate})
, for example(nibi:usd,100)|(btc:usd,200000)
.Feeder
— This is the address of the feeder that is submitting the vote. This must be a valid address and the signer of the message.Validator
— This is the validator address to submit the vote for. This must be a valid address.
Before recording the vote, the Feeder
is checked to ensure that it is the same as the Validator
or that the Validator
has delegated to the Feeder
. The Validator
is also checked to ensure that it is a valid bonded validator. Then the prevote is checked to ensure that it exists and that the recorded hash matches the hash generated from the parameters. Finally, the exchange rates are parsed and checked to ensure that they are valid.