I'm working on a smart contract for a staking dApp. I have two ERC20 tokens S and R. Let's say S is a staking token, and R is a reward token. I also have one ERC721 token. It is called NFT Token. So the user stakes 100 S tokens for seven days, and then he claims 20 R tokens as a reward. So that you know – the scenario implemented above works just fine.
I want to implement another reward scenario for the staking. The user who stakes the tokens over seven days can claim the NFT Token after 30 days as a reward.
Do you know how I can implement it? What is the logic so the user can return and claim the NFT Token after 30 days? The user has already claimed his staking rewards in R tokens.
Where would I store NFT Token rewards pending claims? What process would you suggest for the user to claim awarded NFT Token after the waiting period completion?