by Peter Sayer

Carrefour modernizes food traceability with blockchain

Dec 13, 2018
APIsBlockchainEmerging Technology

Blockchain is helping the supermarket chain track the provenance of its food products, but knowing your supply chain inside out is the key to making the most of the technology.

IBM blockchain Walmart
Credit: IBM

The figures may be a little past their sell-by date, but in 2010 the Grocery Manufacturers’ Association put the cost of food fraud, including counterfeiting and economically motivated adulteration, at over $10 billion — a significant sum in what was then a $2.1-trillion industry.

To protect customers and to back up claims about the quality of their products, supermarket chains need to be able to trace the provenance of ingredients back through the supply chain all the way to the farm.

Carrefour, a French supermarket chain with 12,300 stores in over 30 countries, has been working on food traceability for years with an ad-hoc mix of information stored in its own ERP systems and those of its suppliers, as well as on paper and in the databases of auditors. Now the company is making the data more accessible by migrating it to a blockchain.

With information scattered across various systems, it could take as long as two days to obtain full details of a specific batch of products from a food processor or distributor, but these days consumers want assurance at the push of a button or the scan of a QR code.

“With the blockchain, the information is available right away,” says Emmanuel Delerm, director of organization and methods at Carrefour France.

It’s not a panacea, though: If you don’t already have confidence in the data you gather, then blockchain won’t help you. “Blockchain is not a replacement for quality and traceability; it’s just a plus in terms of sharing and gathering of the information,” says Delerm.

Chickens as pilot project

Carrefour initially weighed two blockchain platforms, Hyperledger and Ethereum, when it first began looking at the technology.

“At that time Hyperledger was on Version 0.6, which was not offering all the services we needed, while Ethereum was already very stable,” says Delerm.

Around May 2017, a team formed to install Ethereum on Carrefour’s Microsoft Azure cloud. A key concern, given that data would be provided by, and accessible to, users outside the company was controlling access, “everything concerning security and user administration, certificates and so on,” he says.

The team also paid attention to the user experience for suppliers and supermarket customers, and to the APIs through which it provided access to the blockchain. “The idea from the very first was to say, no extra work for the farmer or the industrial firm or the veterinarian. The impact should be as limited as it could be,” Delerm says.

Carrefour’s first blockchain application was to modernize the traceability of free-range chickens sold under its Carrefour Quality Line brand. The goal was to track the birds from farm to supermarket shelf and package each one with a QR code that customers could scan to see where it was raised, what it was fed, and when and where it was slaughtered.

The company used smart contracts written in Ethereum’s Solidity language to validate the data it gathered about the chickens. For example, a smart contract can check whether chickens meet the quality requirements of the French “Label Rouge” certification, which requires chickens to be at least 81 days old when slaughtered. If the difference between the date of slaughter and the hatching date already recorded for that batch is less than 81 days, it will issue a warning.

“We are putting in place some extra consistency checks on the data we are ingesting, but not refusing the data, which is quite important in terms of philosophy,” says Delerm.

The quest for scale

By the time Carrefour put its chickens on the blockchain in January 2018, it had plans for Carrefour Quality Line eggs, tomatoes and pomelos to follow. But with Ethereum, that would mean building separate blockchains for each product line.

“In January we said, well, Hyperledger is now on Version 1.0 or 1.1, it’s really working, and they are offering some new features that are very interesting for us,” Delerm says. In particular, its “channel” capability, which enables a subnet of blockchain users (such as those involved in a particular product line) to communicate privately with one another.

“If we can have multiple products on one blockchain but not visible one from the other, it’s really a plus in terms of maintenance, of availability and so on.”

Hyperledger also offered support for consensus mechanisms such as Byzantine Fault Tolerance, and proved somewhat faster at ingesting data, he says.

“The mining even on a private blockchain with Ethereum was, let’s say, 15 seconds. Now, 15 seconds is not a big deal if you are entering a few items each day, but we were talking about millions of products sold every year so, at the end, 15 seconds was not very efficient,” Delerm says.

Plus, Ethereum smart contracts were proving hard to write, as it was easier for Carrefour to find developers versed in writing smart contracts in JSON or Go than in Ethereum’s Solidity, he says.

As Carrefour began work on its second in-house blockchain, though, it became apparent that scale would be a problem. Putting its own-brand products on its own blockchain is one thing, but to modernize all its food traceability work, Carrefour would need to get national brands such as Nestlé on board.

Enter IBM, which has used Hyperledger to build its own food traceability service, IBM Food Trust.

“We saw very quickly that Nestlé was not going to connect to one blockchain with Carrefour, another one with Walmart and a third with Tesco, for instance,” Delerm says.

Likewise, Carrefour didn’t want to have a different blockchain platform for each supplier. “Because blockchains are not very easy to interoperate, the idea of installing or being part of IBM Food Trust was interesting.”

Building on its blockchain experience

Carrefour announced its participation in IBM Food Trust in early October, joining early adopters Walmart and Kroger, and their suppliers Nestlé, Tyson Foods, Dole, and McCormick. The move was simplified by the early attention paid to interfaces.

“It’s not very complicated to reuse some of the APIs we developed for Ethereum,” says Delerm. “These are the same codes, except that IBM is not using the same grammar in terms of data collection. It’s not a big deal.”

Another thing Carrefour has reused is its experience of putting products on the blockchain. “We have been developing methods to try to industrialize the approach,” Delerm says. “All the functional analysis was completely reused.”

This enabled Carrefour’s Spanish subsidiary to put some of its chickens on IBM Food Trust in November.

Carrefour is keeping its internal Hyperledger blockchain running too, for own-brand products. A shipment of pomelos on the way from China will carry QR codes that will display traceability information in French or Chinese depending on the default language of the smartphone used to scan them. Next year, it could work in English too.

When it comes to putting all these products on the blockchain, technology is the easy part, according to Delerm: “The challenge is in the very deep understanding of your supply chain, of the way your product is made.”

“For us,” he says, “the key success factor was being able to find people within Carrefour … who knew the chicken business well, and were able to explain what’s important, who the key actors are, what type of data we can gather.”