Problem:During the course of my 10X smart contract I have realized that there is a problem with the Exchanges, with the pricing and no transparency about the transactions themselves.
The price on one exchange can be different from another at the exact same time.
I have contacted HITBTC, Poloniex and Yobit about this issue and asked them how do they determines the price of a token at a given time. No answer so far.
My understanding is that everyone does what he wants, using another API to adjust the price maybe, who know?
SolutionThe idea is to create a smart contract free to use by the exchanges so that they can monitor all the transactions and these are visible for everyone. And for each transaction sent, they receive back the current price of the token.
So here is how I see the process.
1) the exchanges must be registered into the contract so that everyone cannot send s*h*i*t into the system and create a mess. Only the specific addresses from the exchanges can change the blockchain and record transactions.
2) for each buy or sell, they call the contract function
[contractaddress].buy(value,address_source,address_dest,contract_address) return(contract_address_current_value)
or
[contractaddress].sell(value,address_source,address_dest,contract_address) return(contract_address_current_value)
This way, they always have the real current price all at the same time.
The contract memorizes into the blockchain each transaction and the time of the transaction and all the transactions can be searched and seen from the contract publically.
What do you think guys?