Module astroport_emissions_controller::utils

source ·

Structs§

  • Internal structure to pass the tune simulation result.

Enums§

Functions§

  • Calculate the number of ASTRO tokens collected by the staking contract from the previous epoch and derive emissions for the upcoming epoch.
  • Compose ics20 message with IBC hook memo for outpost emissions controller.
  • Determine outpost prefix from address or tokenfactory denom.
  • Normalize current timestamp to the beginning of the current epoch (Monday).
  • Helper function to get outpost prefix from an IBC channel.
  • Determine outpost prefix for the pool LP token and validate that this outpost exists.
  • Query the staking contract ASTRO balance and xASTRO total supply and derive xASTRO staking rate. Return (staking rate, total xASTRO supply).
  • This function converts schedule pairs (lp_token, ASTRO amount) into the incentives contract executable message. It also calculates total ASTRO funds required for the emissions.
  • Simulate the next tune outcome based on the voting power distribution at given timestamp. In actual tuning context (function tune_pools) timestamp must match current epoch start.
  • Validate LP token denom or address matches outpost prefix.