Automation and Smart Contracts
On-chain Smart Contracts vs. Off-chain Automation
Freshness-related Smart Contract and Off-chain Automation Logic
Example Smart Contract: Retailer’s Acceptance
A smart contract between the retailer and grower/ distributor might include one or more freshness thresholds specifying exactly how many days of shelf life are needed for each type of produce by time-of-year (potentially by location3 or other factors as well). For example, there may be an ‘auto-rejection level’ threshold; all pallets with shelf lives below that level are automatically rejected, and a higher ‘full-acceptance level’ threshold, above which all pallets are accepted (contingent on passing visual inspection).
Pallets with shelf life in-between the auto-reject and full-accept thresholds might be automatically accepted, but with the retailer paying only 85% of the full-shelf-life price. Or for those ‘in-between pallets,’ the contract may be set up to check inventory and forecast levels and if that particular item is in short supply, then it may accept those shorter shelf-life pallets. Alternatively, for ‘in-between pallets’ the contract may request the off-chain system to send all the relevant information (e.g. shelf life of pallets, current inventory levels, forecasted demand, etc.) to the responsible buyer or inventory manager at the retailer to make the decision. These are just illustrative examples: the actual business rules in the contract can be customized to meet the needs of both parties, just as the clauses in a traditional contract may be customized by both parties to serve their interests.
- Allows QA people to focus on what they do best, inspecting for visible physical damage.
- Automates freshness assessment based on temperature history, thereby providing a much higher confidence in remaining freshness compared to visual inspection alone.
- Provides scalability and notification for acceptance/rejection processes.
- Reduces disputes, paperwork, and errors.
- Speeds up payments.
|
Example Division of Labor for Safety-Related Smart Contract A smart contract that executes upon receipt of pallets at the retailer, and possibly at other key handoff points in the supply chain, could include a check of safety-related information, in addition to the freshness and provenance data. This safety data check could include confirmation that all related HACCP processes were completed correctly, and all post-processing tests were negative. Updating the safety data about each pallet on the blockchain is best managed by off-chain analytics that evaluate the securely entered lab HACCP test results and correlate or link those results to all of the pallets processed during the time-period associated with the sample being tested. HAACP test results can take days to get back to the grower or processor, during which time all of the potentially affected pallets will have moved on, potentially through numerous transactions, far removed from the source. If there is an issue with a particular batch, the system needs to search and find all affected pallets. Blockchains are not set up for efficient searching, but the SaaS system’s database is. So, in this case, the association of test results and pallets should be done off-chain. Once those linkages have been found, then the results of the test and status of all those pallets can be updated on the blockchain. Then the smart contracts can execute properly, with simple logic, based on that updated status. The ability to broadcast a ‘hold’ for all pallets processed from a specific location on a set date is a necessary capability for food safety. A hybrid networked SaaS and blockchain solution elegantly bridges the process of correlating data off-chain, and then managing individual item status in the blockchain. Maintaining the current status in the blockchain enables independent smart contracts to automatically evaluate the item or pallet status. |
