Skip to main navigation Skip to search Skip to main content

Evaluating the Need for Explanations in Blockchain Smart Contracts to Reconcile Surprises

  • Hanouf Al Ghanmi*
  • , Sabreen Ahmadjee
  • , Rami Bahsoon
  • *Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Smart contracts on the blockchain play an important role in decentralised systems by automating and executing agreements without the need for intermediaries. As these contracts become integral to various domains, ensuring users’ understanding of their functioning is paramount. This article investigates the need for explanations in smart contracts, drawing inspiration from contract law principles and established practices in Explainable AI (XAI). It introduces key purposes—justification, clarification, compliance and consent to design explainability. Additionally, the study proposes a novel assessment framework informed by the Metacognitive Explanation-Based (MEB) theory to systematically evaluate surprise potential in smart contracts lacking explanations. We use surprise as a guiding factor to systematically identify areas requiring improvement in terms of justification, clarification, compliance and consent. To demonstrate the utility of the assessment approach, we evaluate two decentralised lending projects, uncovering potential surprises. One of the key observations is the lack of setting information, especially concerning compliance, consent and decision justification. This absence of information has heightened the potential for surprises. In the process of validating the explanation purposes, we implement techniques to improve the design of the assessed smart contracts. Further, the research explores the tradeoffs involved in integrating explanations, providing nuanced insights into economic implications such as increased deployment and execution costs. This work contributes to the broader comprehension of smart contract explainability requirements and lays out a theoretical foundation for a generic evaluation method. It aims to facilitate the development of more human-centric and comprehensible smart contracts.

Original languageEnglish
Article number234
Number of pages35
JournalACM Transactions on Software Engineering and Methodology
Volume34
Issue number8
Early online date18 Mar 2025
DOIs
Publication statusPublished - Nov 2025

Bibliographical note

Publisher Copyright:
© 2025 Copyright held by the owner/author(s). Publication rights licensed to ACM.

Keywords

  • Blockchain
  • explainability
  • requirements
  • smart contracts

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Evaluating the Need for Explanations in Blockchain Smart Contracts to Reconcile Surprises'. Together they form a unique fingerprint.

Cite this