Programming Language Design for Safer Smart Contract Execution

Authors

  • Noah Hansen Senior Lecturer, Department of Computer Science, Baltic AI Research University, Tallinn, Estonia Author

Keywords:

smart contract languages, language safety, Move language, Solidity, Vyper, Rust smart contracts, type system safety, reentrancy prevention

Abstract

Most smart contract vulnerabilities are not caused by careless programmers -- they are caused by programming languages that make dangerous patterns easy to write and safe patterns hard to enforce. Solidity's default behaviour on external calls is to continue execution after the call returns, which is precisely the pattern that enables reentrancy. Its integer arithmetic silently overflowed for years before version 0.8 added checked math by default. Its storage layout is implicit and collision-prone in proxy patterns. These are not bugs in Solidity -- they are design choices, and different choices would prevent entire classes of vulnerability. I evaluate seven smart contract programming languages -- Solidity, Vyper, Rust (Solana/CosmWasm), Move, Cairo, Huff, and Fe -- against a Safety-by-Design Assessment Framework (SDAF) that measures how effectively each language's type system, execution model, and default behaviours prevent the 42 vulnerability patterns from the SCFVAF benchmark (Novak and Kovacs, 2025). The Language Safety Score (LSS) shows that Move achieves the highest safety (0.916) through its resource-oriented type system that makes reentrancy and double-spending structurally impossible. Rust-based languages score second (0.872) through ownership semantics. Solidity scores lowest (0.624) despite being the most widely used -- a gap between adoption and safety that the ecosystem should take seriously.

Author Biography

  • Noah Hansen, Senior Lecturer, Department of Computer Science, Baltic AI Research University, Tallinn, Estonia

    Senior Lecturer, Department of Computer Science, Baltic AI Research University, Tallinn, Estonia

Downloads

Published

2025-06-28

How to Cite

Programming Language Design for Safer Smart Contract Execution. (2025). Blockchain, Web3 & Digital Trust Journal P-ISSN 3117-597X and E-ISSN 3117-5988, 2(2), 9-18. https://galaxiauniverse.com/index.php/BWDTJ/article/view/448