3

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!

1 Answer 1

2

If you have the data on chain you can for example use a tool like clockwork.xyz to trigger the token distribution automatically every two weeks using a cron notation trigger.

They also have a token distribution program example: https://github.com/clockwork-xyz/examples/tree/main/distributor/programs/distributor

1
  • 1
    thanks will look into it once I decide whether to do the calculation in a smart contract or inside my current script.
    – witwiki
    Commented Jun 20, 2023 at 5:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.