Smart Contracts

+1 vote
Hi,

I wish to implement a simple Smart Contract as a proof on concept.

For e.g.  If the Stock Price of Google falls below $x then I pay 10 Assets units to my client (another wallet address on Multichain).

Is there a way we can implement this using the current version of Multichain.

I'm using a Windows Machine.

Regards,

Rahul
asked Jan 13, 2017 by rahulkumargr

1 Answer

+4 votes
MultiChain is not a smart contracting platform, but I would invite you to think about this application first.

How does the blockchain know the price of the Google stock? It cannot check for itself, so instead some trusted party must provide this service of providing the stock price to the blockchain.

In which case, why not just use multisig instead? Take the amount of the bet, and send it to a multisignature address which requires 2 of 3 signatures – you, your client, and whichever trusted third party you were going to use to provide the stock price.

Now the trusted party can act as an escrow agent, deciding whether the funds are sent to you or your client, but not being able to take the funds on their own. Once the decision is made, the amount in the bet is spent using two signatures – one is the trusted party, and the other is you or your client as appropriate.

So here you have the same outcome, with the exact same trust model, but no use of smart contracts.
answered Jan 14, 2017 by MultiChain
Thanks.

That's a clever solution.
Hi,

 I have a doubt, isn't using a third party(an escrow agent here) is similar to your normal way of transaction??...because with bitcoin or other blockchains...what we are doing is removing the requirement of third party from every transaction we do.

The only advantage smart contract have over this setup is...  some may not trust other third parties...  but they can trust an automated logic which always work according to the conditions defined in the logic and can always be verified by both parties before deploying it. Probably that's why, everyone wants smart contracts.
Yes, but smart contracts cannot solve the problem of trusting the external source of data, which will actually tell you whether Google's price went up or down. The blockchain cannot know this on its own and it cannot even call an external API to find out. See here: https://www.multichain.com/blog/2016/04/beware-impossible-smart-contract/
...