Integration of Blockchain in Supply Chain Management
Companies have spent years building EDI integrations, ERP systems, vendor portals — and still face the same problem: when cargo is lost, damaged, or delivered late, it's impossible to quickly determine where in the chain the failure occurred. Each participant maintains their own database, data diverges, responsibility becomes blurred. Blockchain doesn't solve logistics — but it creates a single verifiable ledger where each event is signed by the participant who created it and cannot be retroactively changed.
Architectural Solution: What Exactly to Write to Blockchain
The first question when designing — not "which blockchain," but "what specifically needs to be verified." Blockchain is expensive for data storage and slow for complex logic. The right architecture: off-chain storage, on-chain verification.
Data Model
Each physical object gets a digital twin — a record in a smart contract tied to a unique identifier. The identifier can be:
- QR code / RFID — for serial products. RFID is read automatically at warehouse gates, transaction is created without human intervention.
- EPC (Electronic Product Code) — GS1 standard, compatible with most existing WMS systems.
- NFT (ERC-721) — for unique assets: batch of medications, expensive equipment, artwork. Token ID = physical item ID.
The contract itself stores only hashes and metadata, not raw data:
struct ShipmentEvent {
bytes32 dataHash; // keccak256 of full event data
address actor; // who created the event
uint64 timestamp;
EventType eventType; // CREATED, DEPARTED, ARRIVED, INSPECTED, DELIVERED
bytes32 locationId; // location ID from registry
}
Full data (temperature, weight, photo) is stored in IPFS or corporate S3, only the hash goes to blockchain. In case of dispute, any party can present the original data and prove its correspondence to the on-chain hash.
Network Selection
For corporate supply chain projects, three variants are realistic:
| Approach | Examples | When Suitable |
|---|---|---|
| Public L2 (Polygon, Arbitrum) | — | Consortium of companies without single operator, needs open verifiability |
| Private Ethereum (Hyperledger Besu, Quorum) | TradeLens (Maersk+IBM), Food Trust (Walmart+IBM) | Closed consortium, compliance requires transaction privacy |
| Hyperledger Fabric | — | Strict permissioned control, no public token |
Most enterprise clients choose Polygon PoS or private Besu node with periodic anchoring to Ethereum mainnet. Anchoring: every N blocks the Merkle tree root of all events is written to public blockchain — this provides public verifiability without full transparency.
Integration with Existing ERP and WMS
This is the most labor-intensive part. Typical enterprise stack: SAP S/4HANA or Oracle SCM, proprietary WMS, EDI gateways with counterparties, IoT sensors (temperature, humidity) from various vendors.
Integration Layer
Between legacy systems and blockchain you need an Event Bridge — a service that:
- Listens to events from ERP (webhook / polling via SAP BAPI / JMS queue)
- Normalizes data to canonical format
- Signs transaction with participant key
- Sends to blockchain
- Records transaction hash back to ERP for audit
Technically this is a microservice on Node.js or Go with a queue (Kafka / RabbitMQ) for resilience. Blockchain transaction is asynchronous, ERP should not wait for its confirmation — key point for operator UX.
SAP → BAPI Event → Kafka topic → Event Bridge → Sign & Submit → Blockchain
↓
Confirmation listener → TxHash → SAP Custom Field
Participant Identity Problem
Each supply chain participant (supplier, transport company, customs, recipient) must have on-chain identity. Two approaches:
Centralized registry — smart contract with address → ParticipantInfo mapping. Fast, but requires trust in registrar.
DID (Decentralized Identifiers) — W3C standard. Each participant controls their DID, verified credentials (certificates, licenses) attached as verifiable credentials. More complex to implement, but correct for inter-company scenarios. Implementations: Ceramic Network, did:ethr (uPort).
Smart Contract: Supply Lifecycle
contract SupplyChainRegistry {
mapping(bytes32 => ShipmentEvent[]) public history;
mapping(bytes32 => address) public custodian; // current holder
mapping(address => bool) public authorizedActors;
event EventRecorded(
bytes32 indexed shipmentId,
EventType indexed eventType,
address indexed actor,
uint64 timestamp
);
function recordEvent(
bytes32 shipmentId,
bytes32 dataHash,
EventType eventType,
bytes32 locationId
) external onlyAuthorized {
history[shipmentId].push(ShipmentEvent({
dataHash: dataHash,
actor: msg.sender,
timestamp: uint64(block.timestamp),
eventType: eventType,
locationId: locationId
}));
if (eventType == EventType.DEPARTED) {
custodian[shipmentId] = msg.sender;
}
emit EventRecorded(shipmentId, eventType, msg.sender, uint64(block.timestamp));
}
}
The contract is intentionally minimalist. Business logic (SLA calculation, penalties, conditional payments) is implemented separately and can read event history. This simplifies contract audit and allows changing business logic without data migration.
Conditional Payments and Escrow
For automatic payments upon delivery, escrow pattern is used:
Buyer deposits payment → smart contract escrow
Upon EventType.DELIVERED + recipient signature → release payment to supplier
Upon SLA delay → automatic penalty from escrow
ERC-20 token or stablecoin (USDC, USDT) is used as settlement instrument. For B2B settlements in rubles or euros, an additional off-ramp through licensed processing is required.
IoT Integration and Oracles
Data from IoT sensors (temperature loggers, GPS trackers) cannot go directly to blockchain — a trusted intermediary is needed. Two variants:
Centralized oracle — your own server signs sensor data and sends the transaction. Fast and cheap, but creates single point of trust. Acceptable for internal supply chain of one company.
Chainlink CCIP / Chainlink Any API — decentralized oracle network. Sensor data through HTTPS request to Chainlink node operator, aggregation of multiple nodes, on-chain recording. More expensive, but verifiable for external auditors.
For cold chain (medications, food products): temperature violations automatically create on-chain event CONDITION_BREACH and can block further custody transfer until inspector check.
Implementation Stages
| Phase | Content | Duration |
|---|---|---|
| Discovery | Mapping existing processes, defining scope, network selection | 2–3 weeks |
| Smart contract development | Registry contracts, governance, tests (Foundry) | 3–4 weeks |
| Event Bridge | Integration layer with ERP/WMS, Kafka pipeline | 4–6 weeks |
| Identity setup | Participant onboarding, DID or registry | 2–3 weeks |
| Pilot | Limited launch with 2–3 participants, real shipments | 4–8 weeks |
| Production rollout | Scaling to all participants, monitoring | 4–8 weeks |
Realistic timeline from start to production: 6–9 months. Projects promising "blockchain in supply chain in 3 months" typically build centralized databases with blockchain marketing.







