Off chain votes to on chain data
Off chain vote results to on chain submission
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:
There are a few key things to note:
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.
Using Github Actions to automate parsing results and submitting 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.
Last updated