핵심 개념
This paper provides a comprehensive assessment of the smart contract languages used in six major blockchain platforms - Ethereum, Solana, Cardano, Algorand, Aptos, and Tezos. The analysis 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.
초록
The paper starts with an overview of the tiered structure of blockchain platforms, highlighting how the design choices at the contract layer influence smart contracts development, security and performance. It then provides a brief tour of the six smart contract languages in the selection, discussing their main features.
The core of the paper is a hands-on analysis of the smart contract languages, focusing on the following aspects:
Programming style: The languages are partitioned into two classes - the procedural style and the approval style. The procedural style languages (Solidity, Rust, Move, SmartPy) react to transactions by updating the contract state, while the approval style languages (Aiken) approve or discard transactions based on the contract logic.
Verbosity and readability: The procedural style languages vary in their verbosity, with Solidity and SmartPy being the most concise, while raw Rust being the most verbose due to the need for boilerplate code. The approval style of Aiken leads to less readable contracts compared to the procedural style.
Security implications: The programming style is closely related to the level of abstraction provided by the language over the underlying blockchain platform. The procedural style is more prone to security vulnerabilities, as it allows for complex interactions between contracts that can be exploited. The approval style is more secure, as it limits the contract logic to a single transaction approval.
Toolchain support: The role of the compiler and static analyzers in preventing vulnerabilities and other loopholes is discussed. Languages with stronger type systems and more advanced toolchains (e.g., Move, SmartPy) are better equipped to catch common errors at compile-time.
Integration of on-chain and off-chain components: The paper analyzes the support provided by the languages for the integration of on-chain and off-chain components, which is crucial for the development of complex DApps.
Fee models: The different fee models adopted by the platforms are compared, as they have a significant impact on the design and efficiency of smart contracts.
Platform functionalities: The availability of platform-specific functionalities (e.g., custom tokens) is shown to affect the development of smart contracts, with some languages providing better support than others.
The paper concludes with a discussion of the key insights derived from the analysis, highlighting the trade-offs between programming style, security, readability, and usability that developers must navigate when choosing a smart contract language.