Voting APR with maBEETS

Onkeljoe Defi
3 min readMar 19, 2023

--

Two weeks ago, the Beethoven-X protocol on Fantom introduced “reliquaries”, a kind of container where you can deposit your BEETS tokens to get voting rights. Voting on the distribution of new tokens every 14 days is rewarded with incentives by some protocols.

:DE: Deutsche Version hier

new challenge of calculating the APR

Until now, you could easily calculate the average yield of these bribes:

Sum of all incentives / sum of deposited tokens

This was so easy because so far each token represented exactly 1 vote. However, this is changing with the new system: In contrast to the frequently encountered VE-protocols (“vote escrow”), where you had to lock tokens for a long period of time, tokens can be withdrawn from a reliquary at any time, so they remain liquid.

Well, there should still be an incentive to stay loyal to the protocol for a long time. Therefore, a reliquary implements a maturation process, where the tokens reach full maturity in 10 weekly increments. Only then a token has exactly 1 vote again.

As of the launch date, all tokens have been moved to level 0, whose factor is 4%. Each reliquary can be upgraded to the next level on a weekly basis as long as the entry date has not been diluted (see my text on this subject).

With this system, combined with the possibility of diluting the start time, or re-investing received rewards into a second reliquary on the same address, the calculation now becomes increasingly complex.

The total number of invested tokens is split in different stages, with different weights for each election. The current distribution can be seen in this small tool: [https://mabeets-quorum.vercel.app/] — even if after 11 weeks the majority of tokens have reached full voting power, there will always be a smaller part that are still in the maturing process.

Approach

As you can see in the tool above, it is possible to query the number and weight of the tokens in each step and to determine the sum of the possible voting power.

With the help of a shadow database (“subgraph”), the values can also be queried for a past point in time, i.e. in our case the time when the snapshot of the voting power for the respective vote was taken. In addition, you can filter only addresses, that actually took part in the vote and thus determine the number voting power.

Of course, all these steps can be automated, so that after the end of the vote you can calculate the average return as follows:

Sum of all incentives / sum of voting power used to vote

The sum of the used voting power, in turn, is calculated individually for each maturity level first:

List of possible voting power at this level
— filtered through the list of all participating addresses
— — summed up
— — — multiplied by the maturity factor for that level
— — — — add these 11 partial values to a total.
— — — — — for the annual interest rate, the total is multiplied by 26, since there are 26 election periods of 14 days each in a year.

Fortunately, a computer only needs a few seconds for this calculation.

Conclusion

The calculation of the average yield of bonus payments on the votes cast becomes considerably more complicated, but can be done by computer routines.

You will be able to see the result in the statistics about 1 hour after the end of the vote:

Calculated Yield Values — graphical view
Calculated Yield Values

https://www.beetswars.live/gaugeVoteHistory — the relevant data is called “Voting APR %”

--

--