Hi there, I have two questions regarding Pyth Entropy
-
I read the Entropy docs to generate a random number. I don’t quite get what’s the difference between generating a random number doing something like “web3.utils.randomHex(32)” or “crypto.randomBytes(32)” and doing the whole entropy protocol process. If I want to create a dApp and I use the first option instead of the Entropy RNG protocol what difference does it make? The number will be completely random in both cases.
-
The coin flip example in the pyth data github repo (https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/examples/coin_flip/contract/src/CoinFlip.sol) says:
users of this protocol can stall the protocol by choosing not to reveal their generated random number.
// Developers using Pyth Entropy should ensure that users are always incentivized (or at least, not disincentivized)
// to finish both stages of the protocol.
Does that example protect from it? And if so, how does it protect from it?