Formal Semantics and Implementation of Ethereum Smart Contracts for Blockchain-Based Supply Chain Attestation Flows: A Viticulture Case Study Article Swipe
YOU?
·
· 2025
· Open Access
·
· DOI: https://doi.org/10.1109/access.2025.3625101
· OA: W4415482535
Blockchain and smart contracts promise to increase transparency and provide guarantees for supply chains, yet existing process modeling languages either impose unnecessary complexity or lack the primitives needed to capture attestation-centric workflows that are simpler in nature. This paper introduces Attestation-Flow Diagrams (AFDs), a domain-specific graph-based notation that focuses exclusively on how attestations are issued along a supply chain. We first formalize AFD syntax and trace-based operational semantics. To demonstrate practical viability, we provide an implementation of the semantics in EVM-based smart contracts by generating three implementations that span across the decentralization spectrum: 1) logging-only contracts that immutably store attestations; 2) hybrid contracts that record both attestations and off-chain–computed state transitions; and 3) fully on-chain contracts that execute the entire verification logic in Solidity. A detailed gas-cost study on a representative viticulture use case shows that event-based logging reduces deployment and per-transaction costs by up to an order of magnitude, while full on-chain verification offers maximal trust guarantees at the highest cost. The resulting framework enables designers to tune cost, transparency and computational load according to application needs, and lays a formal foundation for further research on optimizing and verifying attestation-driven supply-chain processes.