Assessment reports>Nibiru>Threat Models>Message: AggregateExchangeRatePrevote

Message: AggregateExchangeRatePrevote

The AggregateExchangeRatePrevote handler is responsible for submitting an aggregate exchange rate prevote, which is part of the commit-reveal scheme used by the oracle module to reduce the risk of centralization and of free riders.

The parameters that are controllable by the user are

  • Hash — This is the hash of the exchange rates that will be revealed in the aggregate exchange rate vote, which is calculated as the hex string of SHA256("{salt}:({pair},{exchange_rate})|...|({pair},{exchange_rate}):{voter}").

  • Feeder — This is the address of the price feeder that is submitting the aggregate exchange rate prevote. This address must have signed the message.

  • Validator — This is the address of the validator that is submitting the aggregate exchange rate prevote. This may be the same as the Feeder address if there is no delegation.

Before recording the prevote, 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.

Zellic © 2024Back to top ↑