I have an NFT staking contract that issues rewards based on the property rarity of the NFT staked. The four property tiers are 1,2,3 and 4.
When a user clicks stakeNFT(tokenId, nftTier), I use the tokenId to pull the metadata json property from IPFS and send the NFT tier to the smart contract.
The issue here is while this works on the user interface of our website, anyone can use Etherscan directly and input an tier that isn’t in their NFT so as to earn more rewards.
How do I verify the NFT tier based on the tokenId onchain?