polito.it
Politecnico di Torino (logo)

Validation of Automatically Synthesized Smart Contract Invariants: a validation framework for the FLAMES tool

Matteo Lauretano

Validation of Automatically Synthesized Smart Contract Invariants: a validation framework for the FLAMES tool.

Rel. Maurizio Morisio. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering), 2025

[img] PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (3MB)
Abstract:

Smart contracts are immutable programs deployed on blockchain platforms to enable decentralized applications and financial systems without intermediaries. However, their immutability and public execution make them especially vulnerable to security flaws, which can lead to irreversible significant financial losses. A promising approach to improve security is the use of invariants, properties that must always hold during contract execution. FLAMES (Fine-tuned Large Language Model for Invariant Synthesis) is a tool that leverages fine-tuned large language models to automatically generate security-relevant invariants for Solidity smart contracts. Automatically generating and validating such invariants remains a key challenge. This thesis evaluates FLAMES ability to synthesize and validate security-relevant invariants for Solidity smart contracts. The goal is to determine whether these invariants are both syntactically correct and semantically effective. To this end, two automated evaluation pipelines were implemented. The first tests whether smart contracts with injected invariants still compile successfully. The second examines whether these invariants prevent real exploits while preserving benign functionality. Experimental results show that FLAMES20K and FLAMES100K achieved high compilability rates and successfully patched known vulnerabilities. This work bridges the gap between theoretical invariant generation and practical smart contract security. By automating the validation of synthesized invariants, the proposed framework supports the development of more secure and reliable blockchain applications.

Relatori: Maurizio Morisio
Anno accademico: 2025/26
Tipo di pubblicazione: Elettronica
Numero di pagine: 97
Soggetti:
Corso di laurea: Corso di laurea magistrale in Ingegneria Informatica (Computer Engineering)
Classe di laurea: Nuovo ordinamento > Laurea magistrale > LM-32 - INGEGNERIA INFORMATICA
Ente in cotutela: KUNGLIGA TEKNISKA HOGSKOLAN (ROYAL INSTITUTE OF TECHNOLOGY) - EECS (SVEZIA)
Aziende collaboratrici: KTH Royal Institute of Technology
URI: http://webthesis.biblio.polito.it/id/eprint/37715
Modifica (riservato agli operatori) Modifica (riservato agli operatori)