Book a free call

How to Integrate Blockchain with Legacy Systems

Blockchain can sit beside a legacy system instead of replacing it. Here is how to connect the two, from the first pattern to a working pilot.

Hertiv engineering teamReviewed by a senior engineer
6 min read
How to Integrate Blockchain with Legacy Systems
On this page

Short answer

Integrating blockchain with a legacy system means connecting the two so they share records without replacing the system that runs the business. The approach is to keep the legacy system as the source of truth for daily work, add a blockchain layer for the records that need shared proof, and connect them with an API or a small service. Start with one record type, prove it works, then extend it.

What does integrating blockchain with legacy systems mean?

Integrating blockchain with a legacy system means letting the two share records and events without rebuilding the system that already runs the business. The legacy system keeps doing its daily work, while the blockchain holds the records that need to be shared, checked or proven by more than one party.

The reason to connect them is trust between organisations, not speed. A legacy system is good at fast internal records; a blockchain is good at records that several companies must agree on, such as a shipment handover, a payment release or a certificate. The integration puts each record where it belongs.

Most integrations follow the same shape: the legacy system writes an event, a small service checks and formats it, and the blockchain stores a signed record of it. The legacy system stays the place where staff work, and the chain becomes the shared record they can point to. Our guide to enterprise blockchain implementation cost covers what the blockchain side usually costs.

Which integration pattern fits your system?

The right pattern depends on how much the legacy system can change and how often the two sides must agree. Start with the pattern that needs the fewest changes to the legacy system, and move to a tighter one only when the pilot proves the value.

PatternHow it worksBest for
API layerThe chain is reached through an API the legacy system callsSystems with a modern API
Middleware serviceA small service translates events between the twoOlder systems with no API
Off-chain data, on-chain proofData stays in the legacy system; only a hash goes on chainLarge files and private data
Event streamingLegacy events are published to a queue the chain readsHigh-volume updates
Sidechain bridgeA sidechain mirrors records, then settles to the main chainFrequent low-value records

The off-chain pattern is the most common starting point, because it keeps private data in the legacy system and puts only a fingerprint on the chain. Anyone can check the fingerprint later, but the data itself never leaves the company. Our guide to modernising legacy software covers how to prepare an old system for this kind of connection.

An API layer suits a system that already exposes clean endpoints. A middleware service suits an older system that can only export files or database rows. Pick the pattern that matches what your system can already do, not the one that sounds most modern.

How do you map legacy data to the chain?

Mapping data means deciding, field by field, what goes on the chain, what stays off it, and how the two stay in step. Start with the smallest record that proves the value: one document type, one event, or one handover between two parties.

For each field, ask three questions: does another party need to see it, does it need to be proven later, and can it change? Fields that other parties must see and that rarely change belong on the chain. Fields that change often or hold private detail stay in the legacy system, with only a hash on the chain to prove they existed.

Give every record a shared identifier that both sides use, such as an order number or a shipment code. Without a shared key, the chain record and the legacy record drift apart and nobody can match them. Keep the mapping in one document that both teams own, and update it whenever either side changes a field.

How do security and identity work across both?

Security across two systems means one identity model, not two. Every write to the chain should come from a key or an account that the legacy system can link to a person, a team or a machine, so that a bad record can be traced back to its source.

Use the company's existing identity system where you can, and give the blockchain service its own account with the smallest permissions it needs. The service should only be able to write the record types it owns, and nothing else. Rotate its keys on a schedule, and keep a second key holder so a single lost key cannot stop the integration.

Check the privacy rules before any record leaves the company. Personal data and commercially sensitive detail should stay off the chain, with only a hash to prove the record existed. Our guide to migrating legacy systems to the cloud covers the same identity and privacy questions for cloud moves.

How to integrate blockchain in 6 steps

An integration works best as a short pilot with a clear end, not a long programme. Follow these steps and stop after each one to check the result before spending more.

  1. Pick one record type. Choose a record that two parties must agree on, such as a delivery handover or a payment release.
  2. Map the fields. Decide what goes on chain, what stays off it, and the shared identifier that links the two.
  3. Choose the pattern. Pick the integration pattern that needs the fewest changes to the legacy system.
  4. Build the connector. Write the small service that reads legacy events, checks them, and writes the chain record.
  5. Run a pilot with two parties. Let two real teams use the records for a few weeks and watch where they disagree.
  6. Decide whether to extend. Extend to a second record type only if the pilot saved time or settled disputes.

The pilot should take weeks, not months. If the connector needs more than a small service and a few weeks of work, the scope is too large: cut it back to one record type and one pair of parties.

Example (hypothetical): a logistics firm adds shipment tracking

Example (hypothetical): a logistics firm runs its shipments in a legacy system that is twenty years old. Customers and warehouses argue about handover times, so the firm adds a blockchain record for the handover event only, leaving everything else in the legacy system.

The connector reads each handover from the legacy system, checks that the shipment code, time and warehouse match, and writes a signed record to the chain. The pilot covers 3 warehouses and 200 shipments a week. In the first month, 800 handovers are recorded, and 12 disputes are settled by checking the chain record instead of email threads.

The arithmetic is simple: 200 shipments a week times 4 weeks is 800 handovers, and 12 of them, or 1.5%, were disputed before the pilot. Settling each dispute used to take about 3 hours of staff time, so 12 disputes saved about 36 hours in the first month. The firm then extends the record to delivery confirmation, the next most disputed event.

What are the common mistakes?

The most common blockchain integration mistakes are putting too much on the chain, rebuilding the legacy system first, and skipping the pilot.

  • Putting everything on the chain. Large files and private data belong off chain, with only a hash to prove them.
  • Rebuilding the legacy system first. The integration should work with the system as it is, not after a rebuild.
  • No shared identifier. Without one key both sides use, chain records and legacy records cannot be matched.
  • Two identity models. If the chain cannot trace a write back to a person or a machine, the record proves nothing.
  • Skipping the pilot. A pilot with two parties finds the mapping errors before they reach the whole business.

Key takeaways

  • Keep the legacy system running daily work; the chain holds shared records
  • Off-chain data with an on-chain hash is the safest starting pattern
  • Map fields first, and give every record one shared identifier
  • One identity model across both systems, with keys that can be traced
  • Pilot one record type with two parties before extending

Frequently asked questions

Should blockchain replace our legacy system?

Usually not. The legacy system runs daily work well, and a blockchain is slow and costly for that job. The usual approach is to keep the legacy system and add a blockchain layer for the records that several parties must agree on, such as handovers, payments and certificates.

What data should go on the blockchain?

Only the records other parties must see and that rarely change, such as a handover, a payment release or a certificate. Large files and private detail stay in the legacy system, with only a hash on the chain to prove the record existed at a certain time.

How long does a blockchain integration take?

A pilot for one record type usually takes a few weeks, including the connector service and testing with two parties. A full rollout takes longer, but only after the pilot proves the value. If the pilot needs months, the scope is too large and should be cut back.

Do we need to change our legacy system to integrate?

Not much. A middleware service can read events from an old system without changing it, and an API layer works where the system already has endpoints. The integration should be built around the system as it is, not after a rebuild.

How do we handle privacy on the blockchain?

Keep personal and commercially sensitive data off the chain. Store it in the legacy system and put only a hash on the chain, so anyone can check the record existed without seeing its contents. Check the privacy rules for your industry before any record leaves the company.

What if the blockchain record and the legacy record disagree?

Treat the legacy system as the source of truth for daily work, and use the chain record as the shared proof both parties agreed on. A disagreement usually means a mapping error or a bad connector write, so check the connector logs and the shared identifier first.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Connecting blockchain to a legacy system? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Blockchain Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call