I'm doing a script to calculate rewards for a handful of addresses (from sensors). The script runs weekly where it takes a bunch of addresses from our DB, cleans the data and calculates the associated weights per address to do a rewards distribution of tokens. I've done all this to this point.
I want to next, calculate the token rewards for that week. I don't have an annual emissions schedule yet nor for the week and wondering when I determine this weekly emissions amount whether I should do the calculation in an onchain program or inside the current script. What would be the best approach here?
Appreciate any help, cheers!