I'm currently looking into ways of accessing randomness in a smartcontract.
I found oraclize random datasource https://github.com/oraclize/ethereum-examples/tree/master/solidity/random-datasource and read the paper, but I'm not fully sure what exactly I'd be trusting if using it as in their randomExample.sol
If I understand the paper correctly, they have a Ledger Nano S device connected to some machine which their smart contract interacts with.
So, if I use it, I'd have to trust the following things:
- Their code is bug-/tamperfree
- The device they use is bug-/tamperfree
- They don't just switch out the device with a source they control
- They don't just unplug the device and thereby cripple the service
Is this correct? Am I missing something?
Also, what are the cost of this service? In the example I just see that it defines
uint callbackGas = 200000; // amount of gas we want Oraclize to set for the callback function
Does the contract send this amount of gas to the random datasource contract and this contract sends the same ammount of gas back to execute the callback function? Or do they keep a part of the gas? how much? What's the right value here?