Massimo Bartoletti’s research while affiliated with University of Cagliari and other places

What is this page?


This page lists works of an author who doesn't have a ResearchGate profile or hasn't added the works to their profile yet. It is automatically generated from public (personal) data to further our legitimate goal of comprehensive and accurate scientific recordkeeping. If you are this author and want this page removed, please let us know.

Publications (152)


Formal verification in Solidity and Move: insights from a comparative analysis
  • Preprint
  • File available

February 2025

·

10 Reads

Massimo Bartoletti

·

·

Formal verification plays a crucial role in making smart contracts safer, being able to find bugs or to guarantee their absence, as well as checking whether the business logic is correctly implemented. For Solidity, even though there already exist several mature verification tools, the semantical quirks of the language can make verification quite hard in practice. Move, on the other hand, has been designed with security and verification in mind, and it has been accompanied since its early stages by a formal verification tool, the Move Prover. In this paper, we investigate through a comparative analysis: 1) how the different designs of the two contract languages impact verification, and 2) what is the state-of-the-art of verification tools for the two languages, and how do they compare on three paradigmatic use cases. Our investigation is supported by an open dataset of verification tasks performed in Certora and in the Aptos Move Prover.

Download





Scalable UTXO Smart Contracts via Fine-Grained Distributed State

June 2024

·

5 Reads

Current UTXO-based smart contracts face an efficiency bottleneck, requiring any transaction sent to a contract to specify the entire updated contract state. This requirement becomes particularly burdensome when the contract state contains dynamic data structures, such as maps, which are needed in many use cases for tracking users interactions with the contract. The problem is twofold: on the one hand, a large state in transactions implies a large transaction fee; on the other hand, a large centralized state is detrimental to the parallelization of transactions, which should be one of the main selling points of UTXO-based blockchains compared to account-based ones. We propose a technique to efficiently execute smart contracts on an extended UTXO blockchain, which allows the contract state to be distributed across multiple UTXOs. In this way, transactions only need to specify the part of the state they need to access, reducing their size (and fees). We also show how to exploit our model to parallelize the validation of transactions on multi-core CPUs. We implement our technique and provide an empirical validation of its effectiveness.


Smart Contract Languages: a comparative analysis

April 2024

·

240 Reads

·

3 Citations

Decentralized blockchain platforms support the secure exchange of assets among users without relying on trusted third parties. These exchanges are programmed with smart contracts, computer programs directly executed by blockchain nodes. Multiple smart contract languages are available nowadays to developers, each with its own distinctive features, strengths, and weaknesses. In this paper, we examine the smart contract languages used in six major blockchain platforms: Ethereum, Solana, Cardano, Algorand, Aptos, and Tezos. Starting with a high-level overview of their design choices, we provide a comprehensive assessment that focuses on programming style, security, code readability, and usability, drawing on an original benchmark that encompasses a common set of use cases across all the smart contract languages under examination.


Secure compilation of rich smart contracts on poor UTXO blockchains

May 2023

·

18 Reads

Most blockchain platforms from Ethereum onwards render smart contracts as stateful reactive objects that update their state and transfer crypto-assets in response to transactions. In this way, they support the development of contracts in the imperative procedural paradigm, familiar to most programmers. A drawback of this design choice is that when a user submits a transaction, they cannot predict in which state it will be executed, exposing them to transaction-ordering attacks. The UTXO model is an alternative blockchain design that thwarts these attacks by requiring new transactions to spend past ones: since transactions have unique identifiers, reordering attacks are ineffective. Currently, the blockchains following the UTXO model either provide contracts with limited expressiveness (Bitcoin), or require complex run-time environments and unfamiliar programming abstractions (Cardano). We present a framework for smart contracts in the UTXO model, that allows expressive contracts to be securely executed by bare-bone UTXO blockchains with loop-free scripts enriched with covenants, and supports the familiar procedural programming style.


Figure 4: Graphical representation of Lemma 5.6 (left) and its proof (right).
Sound approximate and asymptotic probabilistic bisimulations for PCTL

March 2023

·

12 Reads

Logical Methods in Computer Science

We tackle the problem of establishing the soundness of approximate bisimilarity with respect to PCTL and its relaxed semantics. To this purpose, we consider a notion of bisimilarity inspired by the one introduced by Desharnais, Laviolette, and Tracol, and parametric with respect to an approximation error δ\delta, and to the depth n of the observation along traces. Essentially, our soundness theorem establishes that, when a state q satisfies a given formula up-to error δ\delta and steps n, and q is bisimilar to qq' up-to error δ\delta' and enough steps, we prove that qq' also satisfies the formula up-to a suitable error δ"\delta" and steps n. The new error δ"\delta" is computed from δ\delta, δ\delta' and the formula, and only depends linearly on n. We provide a detailed overview of our soundness proof. We extend our bisimilarity notion to families of states, thus obtaining an asymptotic equivalence on such families. We then consider an asymptotic satisfaction relation for PCTL formulae, and prove that asymptotically equivalent families of states asymptotically satisfy the same formulae.


A theoretical basis for Blockchain Extractable Value

February 2023

·

25 Reads

Extractable Value refers to a wide class of economic attacks to public blockchains, where adversaries with the power to reorder, drop or insert transactions in a block can "extract" value from user transactions. Empirical research has shown that mainstream protocols, like e.g. decentralized exchanges, are massively targeted by these attacks, with detrimental effects on their users and on the blockchain network. Despite the growing impact of these attacks in the real world, theoretical foundations are still missing. In this paper we propose a formal theory of Extractable Value, based on a general, abstract model of blockchains and smart contracts. Our theory is the basis for formal proofs of security against Extractable Value attacks.


Citations (58)


... The two main verification tools are SolCMC [1], shipped with the Solidity compiler, and the Certora Prover [15]. Other verification tools, including SmartACE [33], SmartPulse [29], Solvent [7], VeriSolid [21], VerX [26], and Zeus [16], target various verification aspects, each tool having its own specification language, level of abstraction, and limitations. In this work, we focus on Certora (see Section 3), whose verification language (CVL) [9] features two ways of expressing contract properties: invariants, which represent conditions that must remain true across contract transitions, and rules, which are a flexible way to specify more general conditions on possible contract transitions. ...

Reference:

Formal verification in Solidity and Move: insights from a comparative analysis
Solvent: Liquidity Verification of Smart Contracts
  • Citing Chapter
  • November 2024

... lized because they rely on Operators to post transactions to L1s, and even the temporary absence or downtime of such operators can substantially affect the efficiency of Rollups. Furthermore, Blockchain interoperability and technology convergence (as explained in Jahid, Alsharif & Hall (2023),Mosteanu & Faccia (2021),Saini, Bera, et. al. (2023) andBartoletti, Benetollo, et. al. (2025)) will likely lead to increasing concentration of transactions in, and Centralization of L2s and L1s. ...

Smart contract languages: A comparative analysis
  • Citing Article
  • October 2024

Future Generation Computer Systems

... The main pitfall is that it requires developers to manage intricate details such as gas costs, storage optimization, and explicit memory management. Moreover, it also does not provide good abstractions in some cases [54]. This makes code development trickly and error-prone, leading to multiple vulnerabilities [55], that have been actually exploited to perform fraudulent actions, such as for the DAO attack [56]. ...

Smart Contract Languages: a comparative analysis

... An interesting line of work is also to embed in SEArch other compliance mechanisms based on different types of contracts, and their associated tools. Some options are tools like CAT [22] which is based on contract automata [23,24,25] or contract-oriented middlewares like the one in [26,27] which supports timed behavioural types or the one in [28], which is based on contract-oriented primitives. Recently, tools for inferring behavioural specifications from code have been proposed. ...

Contract-Oriented Design of Distributed Applications: A Tutorial

... One of these innovations is DeFi through AMM integration. DeFi leverages blockchain technology to create open-source financial products that are not restricted to anyone because of a lack of bank or financial institution services (Bartoletti et al., 2022). These products are transparent, as all transactions are publicly recorded in real time on the ledger of the blockchain network. ...

A theory of Automated Market Makers in DeFi

Logical Methods in Computer Science

... One solution could be the use of oracles (Berg et al., 2022;Dave et al., 2021), which is still an object of active development. Another topic of particular interest in current research is the design of front-running resistant AMMs (e.g., Bartoletti et al., 2022;Ciampi et al., 2022;Zhou et al., 2021a, b). Front-running, or the act of exploiting advance knowledge of upcoming transactions, remains a concern in DeFi. ...

Maximizing Extractable Value from Automated Market Makers
  • Citing Chapter
  • October 2022

Lecture Notes in Computer Science

... Moreover, it could reveal some further kinds of properties that would be desirable to verify on real-world smart contracts but currently fall beyond the scope of existing verification tools. This could be the case, e.g., of economic properties of DeFi protocols, whose verification currently requires either using weaker analysis techniques than formal verification (e.g., property-based testing [19], statistical model checking [6]), or abstracting from actual contract code [31,30,5,22,27]. ...

Formal Analysis of Lending Pools in Decentralized Finance
  • Citing Chapter
  • October 2022

Lecture Notes in Computer Science

... This paper extends the work [BMZ22] in two directions. First, the current paper includes the proofs of all statements, which were not present in [BMZ22]. Second, in [BMZ22] we hinted at the possible application of soundness to the asymptotic behaviour of systems which depend on a parameter η. ...

A Sound Up-to-n,δn,\delta Bisimilarity for PCTL
  • Citing Chapter
  • June 2022

Lecture Notes in Computer Science

... Response by the community resulted in a plethora of security-enhancing analyses and tools, ranging from static and dynamic checks of program code and bytecode, fuzz testing, and deep learning, to formal models of contracts interaction, and even game-theoretical analyses [1,38,20]. However and given the stakes, most of the effort has been on the identification of potential vulnerabilities. More precisely, when designing a tool to determine whether certain portion of code is susceptible to malicious exploitation by a third party, true positives and detection sensitivity are the focus. ...

Verifying liquidity of recursive Bitcoin contracts

Logical Methods in Computer Science

... Note that speculative execution is already deployed by multiple blockchains [4,40,53]. Static analysis has also been employed to identify parallelizable transactions, though it cannot completely eliminate inherent dependencies [42,47]. Similarly, Neiheiser et al. [44] demonstrate how parallel execution can assist struggling nodes in catching up. ...

A theory of transaction parallelism in blockchains

Logical Methods in Computer Science