Blockchain is a decentralized and distributed ledger system that records and verifies transactions across a network of computers and ensures transparency, immutability, and trustworthiness. Smart contracts are programs or protocols embedded into the distributed ledgers and are used to automate agreements between parties of a blockchain. Smart contracts are vulnerable to attacks due to their immutable and public nature, thus, it is important to guarantee the correctness of contracts already at design-time in order to avoid catastrophic events and huge loss of money.In this paper, we investigate the usage of the Abstract State Machine (ASM) formal method for the specification, validation and verification of Ethereum smart contracts. We present the ASM model of the Ethereum virtual machine, and we define a set of ASM libraries that simplify smart contracts modeling. We also provide models of malicious contracts in terms of ASM libraries that can be used to check if a given smart contract is vulnerable to a certain attack. As a proof of concept, we show our approach by exploiting the DAO smart contract and its vulnerability to a reentrancy attack.

Modeling and verification of smart contracts with Abstract State Machines / C. Braghin, E. Riccobene, S. Valentini - In: SAC '24: Proceedings / [a cura di] J. Hong, J. Won Park, A. Przybyłek. - [s.l] : ACM, 2024 May 21. - ISBN 9798400702433. - pp. 1425-1432 (( Intervento presentato al 39. convegno Symposium on Applied Computing tenutosi a Avila nel 2024 [10.1145/3605098.3636040].

Modeling and verification of smart contracts with Abstract State Machines

C. Braghin
Primo
;
E. Riccobene
Secondo
;
S. Valentini
Ultimo
2024

Abstract

Blockchain is a decentralized and distributed ledger system that records and verifies transactions across a network of computers and ensures transparency, immutability, and trustworthiness. Smart contracts are programs or protocols embedded into the distributed ledgers and are used to automate agreements between parties of a blockchain. Smart contracts are vulnerable to attacks due to their immutable and public nature, thus, it is important to guarantee the correctness of contracts already at design-time in order to avoid catastrophic events and huge loss of money.In this paper, we investigate the usage of the Abstract State Machine (ASM) formal method for the specification, validation and verification of Ethereum smart contracts. We present the ASM model of the Ethereum virtual machine, and we define a set of ASM libraries that simplify smart contracts modeling. We also provide models of malicious contracts in terms of ASM libraries that can be used to check if a given smart contract is vulnerable to a certain attack. As a proof of concept, we show our approach by exploiting the DAO smart contract and its vulnerability to a reentrancy attack.
No
English
Smart contracts; Ethereum Virtual Machine; Modeling; Validation & Verification
Settore INF/01 - Informatica
Settore INFO-01/A - Informatica
Intervento a convegno
Comitato scientifico
Pubblicazione scientifica
   SEcurity and RIghts in the CyberSpace (SERICS)
   SERICS
   MINISTERO DELL'UNIVERSITA' E DELLA RICERCA
   codice identificativo PE00000014
SAC '24: Proceedings
J. Hong, J. Won Park, A. Przybyłek
ACM
21-mag-2024
1425
1432
8
9798400702433
Volume a diffusione internazionale
Gold
Symposium on Applied Computing
Avila
2024
39
crossref
Aderisco
C. Braghin, E. Riccobene, S. Valentini
Book Part (author)
open
273
Modeling and verification of smart contracts with Abstract State Machines / C. Braghin, E. Riccobene, S. Valentini - In: SAC '24: Proceedings / [a cura di] J. Hong, J. Won Park, A. Przybyłek. - [s.l] : ACM, 2024 May 21. - ISBN 9798400702433. - pp. 1425-1432 (( Intervento presentato al 39. convegno Symposium on Applied Computing tenutosi a Avila nel 2024 [10.1145/3605098.3636040].
info:eu-repo/semantics/bookPart
3
Prodotti della ricerca::03 - Contributo in volume
File in questo prodotto:
File Dimensione Formato  
3605098.3636040.pdf

accesso aperto

Tipologia: Publisher's version/PDF
Dimensione 2.3 MB
Formato Adobe PDF
2.3 MB Adobe PDF Visualizza/Apri
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/1091208
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 5
  • ???jsp.display-item.citation.isi??? 2
  • OpenAlex ND
social impact