8

Ethereum and IoT: if smart contracts cannot contact the "outside world", how will they trigger car unlocks and other things with the "smart" property?

An AirBnB example: a smart contract between two parties that will unlock an apartment for a specified period of time.

Are oracles used? How might this work?

  • Possible duplicate of How can an Ethereum contract get data from a website? – niksmac Apr 17 '16 at 15:01
  • I think slock.it knows already – user1616 Apr 17 '16 at 16:11
  • Related, but not a duplicate imo since this is "contacting out to physical world", rather than getting "data from"; and it would not be good to try expanding the other question to cover both case. – eth Apr 17 '16 at 17:54
9

Smart contracts will contact the physical world in a similar way that the Internet calls the physical world.

The Internet doesn't call the world: the world watches the Internet then acts.

Similarly, the public Ethereum network and blockchain will not call the world: the world will watch it then act.

Smart contracts can trigger events, and those that are watching for those events, will get notified.

A global system doesn't try to contact everyone and everything in the world. It's global because it allows anyone and anything to watch, interact with it, and act as they desire.

There will be services that make it easier to watch for events that one is interested in. Oracles are more for the other direction: How can an Ethereum contract get data from a website?

3

One way to do it is following the next protocol:

  1. Lock owner signs an authorisation with serial number i that says user with account A has the right to open lock L from date D1 to date D2.

  2. Lock user with account A signs also the authorisation and sends it to the door.

  3. Door just checks the authorisation is signed by both: owner and user. Note that the door does not need to be connected. The lock just need the owners public key. (The user's one is in the authorisation)

  4. If the verification pass, the lock opens and cancels any older authorisation with an older serial.

Of course, the authorisation can reside in the blockchain and emitted thru a contract.

2

I think there's a wireless protocol called Whisper.

There are obscure comments a contract I found on Slock.it's git. For example this line. I'm new to Git, so if I have that wrong, someone can correct me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.