Hello guys, I have some confuse
Assuming there are two types of ERC20 tokens, $A and $B, stake $A to get $B.
The total number of $B in each time period is fixed, for example, 10 $B can be mint per hour (or minute), and rewards will be evenly distributed according to the number of staking.
The calculation rule is hour_rewards = total_mint_one_hour * (user_staking / total_staking)
But the contract cannot be settled in real time, how to realize settlement and display real time settlement on the front end?
Thanks all.