ERC721 NFT staking issue

I have ERC721 contract ready and deployed.

Now, I need to create NFT staking platform where people can stake their NFT and get the $Token in exchange.

Though, Idea is that the amount of Token they receive each day depends on these factors:

  • how many NFT they staked
  • How long they have NFT staked
  • which Rare NFT they staked..

I have a problem with 3rd one. How will NFTStaking contract know if the NFT user stakes is that rare ? NFTStaking can't assess if the NFT is rare as this contract can't communicate with metadata as metadata is off-chain.

How do people usually do this ? Any idea ?

1 Like

Not experienced in this, but a possible solution is set the rarity values onchain and tell people in your community about it. Make this process transparent so that people can be certain the right values are updated on-chain.