How Smart Contracts Work

Blockchain technology could run a flight-insurance business without any employees

Advertisement
special report icon

Smart contracts are software programs that live on a blockchain and form the basis of many of the new blockchain applications and schemes. They are essentially automated systems that can provide services in exchange for cryptocurrency. However, because blockchains are not good for storing large amounts of data nor for querying the state of the outside world, they need services that exist off the blockchain to do those things for them. In this example, an automated flight-insurance smart contract uses an “oracle” to look up data about flight delays.

  • Step 1

    A passenger requests flight insurance by sending ethers to a smart contract—an application that exists on the Ethereum blockchain—along with her flight information.

  • Step 2

    The smart contract sends a request to an “oracle”— a service that exists outside the blockchain—to verify the flight details and gather historical information about that route.

  • Step 3

    The smart contract then uses that information to determine if the offered premium is adequate. If the smart contract accepts the premium, it then asks the oracle to report on the status of the flight in question.

  • Step 4

    The oracle uses information from RealTimeFlightData to report the status of the flight to the smart contract.

  • Step 5

    If the flight is delayed, the contract pays the passenger. If the flight is on time, the contract pays itself.


See “Blockchains: How They Work and Why They’ll Change the World.”

Advertisement