Posts

APR Calculator Discord Bot: Compounding Interest Added

avatar of @jazzhero
25
@jazzhero
·
·
0 views
·
3 min read


I’m not sure if anybody else is using the APR calculator function I added to our Discord bot last week. But it has at least helped me set up my HBD savings and weekly top-up goals, so the effort to code was worth it. It was possible to calculate it manually, but a Discord bot doing it is much more convenient. 😄


A couple of users have mentioned that it’s better to incorporate compound interest into the bot's calculations. I already thought of it while I was starting to create the function. But then dismissed the idea because there’s already a “weekly top-up” calculation and considered compounded interest less significant. However, after looking at it deeper, I realized I was wrong. Compound interest has a much bigger impact on earnings than I assumed.


So here's version 2.0 of our HivePhBot's APR Interest Calculator.
Check it out on Discord!



Compounding Interest Calculation Update


Compounding happens when the new interest is calculated based on the starting balance and all the previously accumulated interest.

Consider an initial balance or principal amount of 100 HBD. It will earn an interest of 1.64 HBD for its first month. When the compounding option is available, the next interest calculation will use 101.64 HBD (principal plus previous interest), instead of the starting 100 HBD. The next interest earning won’t seem much because it’s only 1.67 HBD, just 0.03 HBD higher than the previous. But the real magic happens when you let compounding do its work for long periods.


Here’s the bot calculation for the APR earnings of a 100 HBD principal over a year with 20% APR. I made it a point to both include the figures for when interest is compounded (left) and when it’s not (right).

In the second month, there’s only 0.03 HBD interest increase. But when compounded in a year, your 20% APR would yield an extra 1.944 HBD. This is for a 100 HBD balance. If you invest more, then increase on earnings will be much more exciting too.



How to do Compounding in HBD Savings


You may wonder why I calculated compound interest for a month’s duration. It’s because users are only allowed to claim HBD savings interest every 30 days. Whenever a claim is successfully processed, you'd have to wait 30 days to do the next.

After claiming the interest, you’d have to re-invest it by transferring the HBD amount you earned to Savings at the soonest possible time. If you didn’t do this step, then compounding doesn’t happen.

I have yet to explore options on how to automatically do claims of interest and direct transfer to savings. Since my goal is to regularly execute HBD Savings top-ups whenever I get my author rewards, I am not too compelled to look for automatic options. I can do it manually since I’m regularly checking my Hive account.



More Examples of the Impact of Compounding


The !apr command is available to all users of servers with the HiveBotPH Discord bot. You can either type the command on a channel that the bot has access to, or privately send the bot a direct message. Take note that command parameters didn’t change after this update.

!apr STARTING_HBD_BALANCE OPTIONAL_WEEKLY_HBD_TOPUP


Here are more examples highlighting the difference in earnings with and without compounding.


When you start with something as high as 2000 HBD, the gap between the two calculations is really much more prominent.


And here’s my humbler personal target for my HBD Savings. With around 300 HBD starting balance, I aim to add at least 20 HBD weekly into my Savings. Of course, I’ll make sure to re-invest whatever interest I earn monthly to get that 10+ HBD increase.


If you have any questions or suggestions, just leave it in the comments section below. Cheers!




Want to earn while having fun? Join Splinterlands.

Like the thumbnail on this post? Make your own using Canva.

Attributions:
----------
Images created with Canva. Cute Discord bot avatar is created with Charat.me. Also, several screenshots from Discord.


Posted Using LeoFinance Beta