How Smart Contracts Work

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

1 min read
Illustration: Greg Mably
Illustration: Greg Mably

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.

  • img All illustrations: Greg Mably

    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.

  • img

    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.

  • img

    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.

  • img

    Step 4

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

  • img

    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.”

The Conversation (0)

Video Friday: DARPA Subterranean Challenge Final

1 min read

This week we have a special DARPA SubT edition of Video Friday, both because the SubT Final is happening this week and is amazing, and also because (if I'm being honest) the SubT Final is happening this week and is amazing and I've spent all week covering it mostly in a cave with zero access to Internet. Win-win, right? So today, videos to watch are DARPA's recaps of the preliminary competition days, plus (depending on when you're tuning in) a livestream of the prize round highlights, the awards ceremony, and the SubT Summit with roundtable discussions featuring both the Virtual and Systems track teams.

Keep Reading ↓ Show less

Making 3D-Printed Objects Feel

3D-printing technique lets objects sense forces applied onto them for new interactive applications

2 min read

Researchers from MIT have developed a method to integrate sensing capabilities into 3D printable structures comprised of repetitive cells, which enables designers to rapidly prototype interactive input devices.


Some varieties of 3D-printed objects can now “feel," using a new technique that builds sensors directly into their materials. This research could lead to novel interactive devices such as intelligent furniture, a new study finds.

The new technique 3D-prints objects made from metamaterials—substances made of grids of repeating cells. When force is applied to a flexible metamaterial, some of their cells may stretch or compress. Electrodes incorporated within these structures can detect the magnitude and direction of these changes in shape, as well as rotation and acceleration.

Keep Reading ↓ Show less

How to Write Exceptionally Clear Requirements: 21 Tips

Avoid bad requirements with these 21 tips

1 min read

Systems Engineers face a major dilemma: More than 50% of project defects are caused by poorly written requirements. It's important to identify problematic language early on, before it develops into late-stage rework, cost-overruns, and recalls. Learn how to identify risks, errors and ambiguities in requirements before they cripple your project.

Trending Stories

The most-read stories on IEEE Spectrum right now