I'm trying to learn about Ethereum Smart contracts and studying example code and existing Dapps. If I understand things (and I probably don't), Solidity cannot create random numbers, so developers need to use a service like Oraclize.
I was stepping through transactions and saw something interesting, a bit confusing:
- a transaction is created by the end user by sending ether from their wallet to dapp_smart_contract_1
- dapp_smart_contract_1 then sends a transaction to oraclize_smart_contract
- oraclize query runs (First, curious how this works. Why do developers need to use Oraclize? Why not setup their own RESTful service or other mechanism?)
- oraclize returns a random number by calling dapp_smart_contract_2
- dapp_smart_contract_2 transacts with dapp_smart_contract_1
- dapp presents the results
It's quite likely that I'm not understanding the process, but if I do, it appears that the dapp developer can alter the results in this setup and have the app still appear to be using Oraclize query results some of the time.
Regardless, I'm curious if there are any weaknesses or vulnerabilities in using a service like Oraclize and also if there are plans to make Ethereum smart contracts "better" so that centralized services aren't necessary?