Setup example
Setup example
We'll discuss a setup example using the POL token template with intentionally introduced errors, showcasing potential alerts and bugs during real implementation. This template can be found at https://www.cenit.finance/tokenomics-simulation-templates/polygon-pol
After inputting the spreadsheet URL, we will face different errors.
Insufficient allocation
The first error that we get is from the section "Check all mandatory fields are valid”. Here we see that the total allocation of every agent of the vesting schedule does not add up to 100%.
We rectify this by adjusting values in the "Vesting" template to ensure they sum up to 100%.
Formula errors
Here, we are using a variable in the formula that does not exist. As a result, the configuration copilot is telling us that there is an undefined reference. This case is just a typo of the variable that should be corrected, but sometimes we can even forget to declare a variable in the first place.
Token flows visual check
Once we have corrected the previous errors, we arrive at token flow visualization.
In this case, we would see something a bit odd, since the Holders are not interacting with anything else. For this simulation in particular, this is the expected behavior, since we are simulating that the holders keep their tokens forever and therefore they do not exchange them with anyone. However, if that was not the case, the diagram would be signaling that there is a missing interaction between Holders and the rest of the system, and we should have fixed that.
Circular dependencies
Next, the validation process alerts us that there is a circular dependency error.
Simplifying it a bit, the message tells us that the amount of desired tokens to be staked has a dependency on the amount of extra incentives, which at the same time impacts on the amount of currently staked tokens and this influences back on the amount of desired tokens.
In our example, the definitions of the relevant variables are the following:
Variable | Formula |
---|---|
|
|
|
|
|
|
After some analysis, we can realize that the VA_extra_incentives_1
amount should depend on the amount of staker tokens from the previous step, not the current (since the rewards are the consequence of the previous state).
This fix will improve the model and break un the circular dependency. We execute it by substituting A_staker.total_tokens
for A_staker.total_tokens.previous
in the definition of VA_extra_incentives_1
.
Dependencies visual check
By this point, the validation process has completed, with all steps in green, which means that the configured simulation will execute.
However, there is one more check that we can do at this stage. We not only want the simulation to execute, we want it to be an accurate model of the token economy we are simulating. We can further make sure of this by checking the full dependencies tree between all of the variables involved in the simulation.
Here, we see that there is one variable that is not connected to any of the others. This variable apparently has been omitted in a formula and needs to be reincorporated.
In particular, the parameter unconnected is “Treasury inflow”, which represents the USD amount that the treasury needs to obtain yearly to keep up with the operating costs.
The variable that links this parameter to the rest of the simulation should be VA_tokens_sold_by_treasury
defined as the amount of tokens that the treasury should sell on each timestep. However, the formula that we have is:
Variable | Formula |
---|---|
|
|
We see that, based on that formula, the amount of tokens sold is always the same, and independent from the “Treasury inflow required”. We had defined this “Treasury inflow required” parameter in order to be part of this model but we had forgotten to introduce it here, which we then noticed thanks to the dependencies diagram. Fixing the formula results in:
Variable | Formula |
---|---|
|
|
Now, the final graph shows that everything is actually connected, as it should be.
With all addressed, you're set for the dashboard modeling. Simply click on “Setup simulation with tested spreadsheet” and bring your simulation dashboard to life.
Last updated