# A Better Pseudo-random Function

The use case
An NFT trading card game with common and rare cards (for example in the ratio of 1 rare card for every 9 common cards). For example, calling the MINT function will randomly generate 9 common cards and 1 rare card from a fixed pool of say 90 common cards and 10 rare cards.

Overall card supply will be capped.

Requirement
Needs a random function that is not expensive like Chainlink VRF, but still 'good enough' to prevent it being gamed.

Proposed Solution
The random generator in the MINT function will consist of combining the uint in a variety of math operations from 2 different 'random' sources:

• Pseudo-randomness using block difficulty and timestamp
• Chainlink price feed data at the point of minting (for example, using price feed data from 20 different assets, adding up all the prices or with different math operations to derive some uint.

Ultimately the product will be 9 numbers (for common cards) between 1 to 90 and 1 number (for the rare card) between 91 to 100.

Question
Is this considered a 'better' option and more 'random' than simply using block difficulty and timestamp? What are the loopholes you think might occur?