A Type-Theoretic Approach to Smart-Contract Safety

dc.contributor.advisorAceto, Luca
dc.contributor.advisorGorla, Daniele
dc.contributor.advisorHamdaqa, Mohammad
dc.contributor.authorLybech, Stian
dc.contributor.departmentDepartment of Computer Science
dc.date.accessioned2025-11-17T08:13:35Z
dc.date.available2025-11-17T08:13:35Z
dc.date.issued2025-05-27
dc.description.abstractType systems are routinely employed in many modern programming languages to statically ensure various notions of runtime safety. We explore issues of typability and notions of safety in two different fields: Firstly, we focus on process calculi with composite channel names, where the type of a channel must somehow be derived from the types of its constituents. This collection of results includes a simple type system for the -calculus, along with some results of expressivity w.r.t. the -calculus; a generic type system for the Higher-Order Ψ-calculus, extending a similar type system for the ‘first-order’ Ψ-calculus; and a simple type system for , which aims to highlight a connexion to type structures from class-based/object-oriented languages. Secondly, we focus on the language TinySol, which models core features of the smart-contract language Solidity. Smart contracts are immutable programs with publicly visible code, that run atop a blockchain and are used to manage financial assets of users. Guided by insights from our work in process calculi, we develop type systems for ensuring three different properties: non-interference, call-integrity, and absence of out-of-gas exceptions. Lastly, we seek to tackle some of the shortcomings of the conventional, syntactic approach to type soundness, which had become evident in our previous developments. In particular, we study a peculiar construct in Solidity, known as the fallback function, which is untypable by syntactic type rules. Hence, we turn to a semantic approach to type soundness which allows type safety to be shown, even in cases where well-typedness cannot be proved by ordinary syntactic type rules. We use this approach to propose a method by which type safety may be recovered, even for contracts containing fallback functions, by allowing the programmer to supply a manual proof of type-safety for untypable pieces of code. This method does not depend on specific features of the fallback function, or even of TinySol or Solidity, and it may therefore also be developed for other smart-contract languages.en
dc.format.extent459
dc.format.extent2110531
dc.identifier.citationLybech, S 2025, 'A Type-Theoretic Approach to Smart-Contract Safety', Reykjavík.en
dc.identifier.isbn978-9935-539-61-8
dc.identifier.other239179900
dc.identifier.other88b67702-92b6-4b14-ac83-d2a722315ae2
dc.identifier.urihttps://hdl.handle.net/20.500.11815/5955
dc.language.isoen
dc.publisherReykjavík University
dc.rightsinfo:eu-repo/semantics/restrictedAccessen
dc.subjectType systemsen
dc.subjectSmart contractsen
dc.subjectProcess calculien
dc.subjectSemantic typingen
dc.subjectNoninterferenceen
dc.subjectCall-integrityen
dc.subjectDoktorsritgerðiren
dc.titleA Type-Theoretic Approach to Smart-Contract Safetyen
dc.type/dk/atira/pure/researchoutput/researchoutputtypes/thesis/docen

Skrár

Original bundle

Niðurstöður 1 - 1 af 1
Nafn:
main.pdf
Stærð:
2.01 MB
Snið:
Adobe Portable Document Format