0

I'm aware of the disaster in relying on block.timestamp and block number when generating random numbers.

But what do you think of XORing the prices of multiple ERC20 tokens using the getAmountOut() method of a dex router like uniswap's, then using that result as the seed to generate a random number?

I think it will be difficult for anyone to manipulate that data especially when one is using the prices of large trading volume tokens.

Please let me know what you think.

Is it possible? Can the miners manipulate that too? Like can I request the price of A/B pair and a miner returning the price as 2 instead of 5 it really is?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.