Off chain votes to on chain data
Off chain vote results to on chain submission
Last updated
Off chain vote results to on chain submission
Last updated
Alluo carries out a votes on snapshot on a fortnightly basis. These include (as of writing) three different governance proposals. 1. Tokenomics rewards 2. Liquidity Direction (distributing treasury funds between yield opportunities) 3. Setting APY on IbAlluo farms.
This is triggered automatically by Github Actions.
Here is an example below:
Parameters for contract: This json object is decoded and then parsed (see below how this works)
Vote results : Since 5% APY has the most votes, that is what should be set on chain.
Once the votes are complete, the results are parsed as the script below.
Most importantly, The commands from the paramters set inside each vote is encoded appropriately so that we can "encodeAllMessages()" and then "submitData()" correctly on chain. This is executed with a private key stored inside the automation.