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)

TSMC to Build Chip Fab in Japan

Japanese government helps subsidize project as chip shortage threatens economies around the world

3 min read
Pavlo Gonchar/Sipa/AP

After a week of media rumor, leaks and speculation, Taiwan Semiconductor Manufacturing Co. (TSMC), the world's largest contract chip manufacturer, announced in an online earnings briefing Thursday that it would build a semiconductor plant in Japan. The announcement comes just a few months after the chip giant announced its intention to build a $12 billion fab in Arizona. Construction will begin next year, the company said, subject to approval by TSMC's board, with full production expected to begin in 2024.

"The plant will use 22- and 28-nanometer line processing," said Tadahiro Kuroda, Director of Systems Design Lab (d.lab) at the Graduate School of Engineering, the University of Tokyo. "So it's not an advanced foundry like the Arizona plant that will use 7 nanometers." But he adds it can produce a range of devices that go into consumer products, sensors, IoT, and auto parts.

Keep Reading ↓ Show less

Saifur Rahman Is 2022 IEEE President-Elect

He is a professor of electrical and computer engineering at Virginia Tech

2 min read
Virginia Tech

IEEE Life Fellow Saifur Rahman has been elected as the 2022 IEEE president-elect. He is set to begin serving as president on 1 January 2023.

Rahman, who was nominated by petition, received 13,296 votes in the election. Fellow S.K. Ramesh received 13,013 votes, Life Fellow Thomas M. Coughlin received 11,802 votes, and Life Senior Member Francis B. Grosz received 6,308 votes.

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