How reward is distributed?


I am trying to create a contract, but can see there is no function in the contract for reward distribution, how this will work?


Hello zeeshanmazhar, welcome to the forums.

You should start by following this great tutorial OpenZeppelin Upgrades: Step by Step Tutorial for Hardhat

That should get you to speed on a basic contract format as well as a proxy for updates.

You will need to build your own function for reward distributions.

I would suggest taking a look at RFI if you would like a reward based on a tax for every single transaction.

If you want to reward users periodically, then perhaps build a mint function that is called, then it mints tokens as a reward to whoever you want.

1 Like

Hi, welcome! :wave:

So what is your reward distribution? Stake some token to get reward or something else?


I got it, i didn’t notice it first as we are on POS network, the reward of holding stack will go to each holder by the network.


Thanks for the link to RFI. I'm not sure exactly I understand the mechanism at play here - could you direct the attention to what actually captures this functionality? I see how they take a few, but don't see the (presumed) mapping on how to handle that distribution thereafter to all holders of the token.