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?

2 Answers 2


One possible implementation is to mint the NFT token at the same time the R tokens are minted, but moving them to a vault contract with a 30 days time lock.

After the additional 30 days the NFT tokens could be withdraw from the vault contract.


create a NFT minting contract that handles the minting of the nft at the cost of however many R tokens would be earned in a 30 day period

I.E if the user earns 30 R tokens over staking for 30 days they would spend 30 R tokens to mint the NFT

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.