Re:How I became Leonardo da Vinci on the Blockchain
by DennisP on Tuesday June 12, 2018 @05:32PM
(#17298232)
There are various solutions for randomness. Funfair's is for the user and the house to generate chains of hashes, e.g. hash(hash(hash(secret))). Each posts the outermost hash to the smart contract. Then each can reveal successive preimages, and the contract can XOR each pair to get a random number.
Here's an article on an idea very similar to theirs, with sample code: https://www.blunderingcode.com/gamble-channels-fast-verifiab...
> The smart contracts have to be in someone's control.
They don't _have_ to be. Someone has to deploy the smart contract, but that doesn't necessarily mean that they get any privileged access to alter/use the smart contract after deployment. That's where a lot of the beauty of smart contract enabled blockchains comes from in my opinion.