Hi,
Request to check if everything is well calculated.
https://fatmusicpl.github.io/BitradioPoS.github.io/
https://github.com/fatmusicpl/…io/blob/master/index.html
Just enter the addresses, or balance and click Check.
Hi,
Request to check if everything is well calculated.
https://fatmusicpl.github.io/BitradioPoS.github.io/
https://github.com/fatmusicpl/…io/blob/master/index.html
Just enter the addresses, or balance and click Check.
First of all, have you written the code yourself or found a calculator that you are trying to customize for BRO?
I'm afraid I can't give you any praise for the part that does the math.
If I could give you some advice, put the code in the trash and start again. The necessary math. formulas are simple.
What did you include "bootstrap.min.js" for? Are the block numbers also calculated there or only the annual interest rate?
I don't want to take a closer look, it's like looking for a needle in a haystack. Its for the trash too.
How does result #608 come about? Does the script still get the current block time from somewhere? (I can't imagine it any other way) This doesn't work, of course, if you still have an input field on the left, then 2 different values are calculated. The block time has DIRECT influence on the amount of daily rewards, and that doesn't work at all in your calculator.
I don't know what each block number is calculated for. Who wants to know this? The script works quite slowly even with small amounts. Enter 4,000,000.
And then you have to scroll down a thousand pages to see the annual ROI. And it's wrong, too.
For example, if you work with your start values and enter 840... (Look at the annual ROI)
After that, you put in 840,000 and the ROI is lower? Why? It would have to be higher, because the rewards increase the balance and they could even get a reward (theoretically).
The fact is, the interest calculation is always wrong (in both cases too small).
There are coins (without fix block reward), so it would make sense to include the rewards in the interest calculation, but not here at BRO.
Despite all the calculations, you never know when exactly you'll get the rewards, so it doesn't make sense for me to use the balance "increased" by the stake to use the expected time for the next reward.
My formula for the annual interest therefore only takes into account the initial balance.
Why don't you do it like this:
As a result, you calculate:
Total weekly rewards = 86400 / block_time * balance / net_weight * stake_reward * 7
Total monthly rewards = 86400 / block_time * balance / net_weight * stake_reward * 30
Total annual rewards = 86400 / block_time * balance / net_weight * stake_reward * 365
Expected Time to earn reward (hours) = net_weight * block_time / balance / 3600
Expected Time to earn reward (days) = net_weight * block_time / balance / 86400
Expected Time to earn reward (weeks) = net_weight * block_time / balance / 604800
Annual interest (%) = Total_annual_rewards * 100 / balance
ROI (in days) = 36500 / annual_interest
additional input field: min_stage_age (hours) = 8
Max split amount = block_time * net_weight / min_stage_age / 3600
The amounts should not be larger than "max split amount".
If they are, they take less than 8 hours to stake, but are locked for 8 hours afterwards. Therefore it makes sense to calculate this.
I would keep the part of the code that retrieves the amount of the BRO address, rewrite the rest with the formulas.