Gislainy Crisostomo Velasco, Marcos Alves Vieira, Sérgio T. Carvalho
Developers of smart contracts face challenges such as the immutability of contracts and asset storage, which make the activity complex and errorprone. To make contracts safer and more reliable, Model-Driven Engineering (MDE) offers an alternative approach with an emphasis on the High-Level Metamodel for Smart Contract (HLM-SC), which allows for the high-level declaration of elements within a contract. This paper evaluates the HLM-SC using the MQuaRE framework to verify its conceptual validity with 11 external evaluators. The results demonstrated the acceptance of the metamodel. Additionally, this paper presents a guide on how to use HLM-SC to facilitate its adoption by developers. Finally, it demonstrates the application of HLM-SC in a scenario related to the NFT industry.
Zibin Zheng, Jianzhong Su, Jiachi Chen, David Lo · 6 authors
The Smart Contract Weakness Classification Registry (SWC Registry) is a widely recognized list of smart contract weaknesses specific to the Ethereum platform. Despite the SWC Registry not being updated with new entries since 2020, the sustained development of smart contract analysis tools for detecting SWC-listed weaknesses highlights their ongoing significance in the field. However, evaluating these tools has proven challenging due to the absence of a large, unbiased, real-world dataset. To address this problem, we aim to build a large-scale SWC weakness dataset from real-world DApp projects. We recruited 22 participants and spent 44 person-months analyzing 1,199 open-source audit reports from 29 security teams. In total, we identified 9,154 weaknesses and developed two distinct datasets, i.e., DAPPSCAN-SOURCE and DAPPSCAN-BYTECODE. The DAPPSCAN-SOURCE dataset comprises 39,904 Solidity files, featuring 1,618 SWC weaknesses sourced from 682 real-world DApp projects. However, the Solidity files in this dataset may not be directly compilable for further analysis. To facilitate automated analysis, we developed a tool capable of automatically identifying dependency relationships within DApp projects and completing missing public libraries. Using this tool, we created DAPPSCAN-BYTECODE dataset, which consists of 6,665 compiled smart contract with 888 SWC weaknesses. Based on DAPPSCAN-BYTECODE, we conducted an empirical study to evaluate the performance of state-of-the-art smart contract weakness detection tools. The evaluation results revealed sub-par performance for these tools in terms of both effectiveness and success detection rate, indicating that future development should prioritize real-world datasets over simplistic toy contracts.
Mojtaba Eshghie, Cyrille Artho, Hans Stammler, Wolfgang Ahrendt · 6 authors
Logical flaws in smart contracts are often exploited, leading to significant financial losses. Our tool, HighGuard, detects transactions that violate business logic specifications of smart contracts. HighGuard employs dynamic condition response (DCR) graph models as formal specifications to verify contract execution against these models. It is capable of operating in a cross-chain environment for detecting business logic flaws across different blockchain platforms. We demonstrate HighGuard's effectiveness in identifying deviations from specified behaviors in smart contracts without requiring code instrumentation or incurring additional gas costs. By using precise specifications in the monitor, HighGuard achieves detection without false positives. Our evaluation, involving 54 exploits, confirms HighGuard's effectiveness in detecting business logic vulnerabilities. Our open-source implementation of HighGuard and a screencast of its usage are available at: https://github.com/mojtaba-eshghie/HighGuard https://www.youtube.com/watch?v=sZYVV-slDaY
We identify a subtle security issue that impacts mechanism design in scenarios in which agents can absolutely commit to strategies. Absolute commitments allow the strategy of an agent to depend on the commitments made by the other agents. This changes fundamental game-theoretic assumptions by inducing a meta-game in which agents choose which strategies they commit to. We say that a game that is unaffected by such commitments is Stackelberg resilient and show that computing it is intractible in general, although it can be computed efficiently for two-player games of perfect information. We show the intuitive, but technically non-trivial result, that, if a game is resilient when some number of players have the capacity to make commitments, it is also resilient when these commitments are available to fewer players. We demonstrate the non-triviality of Stackelberg resilience by analyzing two escrow mechanisms from the literature. These mechanisms have the same intended functionality, but we show that only one is Stackelberg resilient. Our model is particularly relevant in Web3 scenarios, where these absolute commitments can be realized by the automated and irrevocable nature of smart contracts. Our work highlights an important issue in ensuring the secure design of Web3. In particular, our work suggests that smart contracts already deployed on major blockchains may be susceptible to these attacks.
Aidin Rasti, Amal Ahmed Anda, Sofana Alfuhaid, Alireza Parvizimosaed · 8 authors
Complementary materials for the paper that extends the conference paper : "Symboleo2SC: From Legal Contract Specifications to Smart Contracts" <code>symboleo-js-core</code> includes the implementation of the ontology of Symboleo. <code>Symboleo2SC-demo</code> includes the five evaluated Symboleo contracts, their generated smart contracts, and their unit tests.
We study an auction with $m$ identical items in a context where $n$ agents can arbitrarily commit to strategies. In general, such commitments non-trivially change the equilibria by inducing a metagame of choosing which strategies to commit to. In this model, we demonstrate a strategy that an attacker may commit to that ensures they receive one such item for free, while forcing the remaining agents to enter into a lottery for the remaining items (albeit for free). The attack is thus detrimental to the auctioneer who loses most of their revenue. For various types of auctions that are not too congested, we show that the strategy works as long as the agents have valuations that are somewhat concentrated. In this case, all agents will voluntarily cooperate with the attacker to enter into the lottery, because doing so gives them a chance of receiving a free item that would have otherwise cost an amount commensurate with their valuation. The attack is robust to a large constant fraction of the agents being either oblivious to the attack or having exceptionally high valuations (thus reluctant to enter into the lottery). For these agents, the attacker may coerce them into cooperating by promising them a free item rather than entering in to the lottery. We show that the conditions for the attack to work hold with high probability when (1) the auction is not too congested, and (2) the valuations are sampled i.i.d. from either a uniform distribution or a Pareto distribution. The attack works for first-price auctions, second-price auctions and the transaction fee mechanism EIP-1559 used by the Ethereum blockchain.
In this paper, we examine the balance between allocative efficiency and price discovery in blockchain-based finance. Our analysis reveals that the use of private pools, while improving blockspace allocation efficiency, negatively impacts price discovery. We show that the presence of private pools limits the amount of information revealed through pending orders and increases the execution risk of informed orders. We argue that price discovery can be improved by increasing the number of validators monitoring private pools or the block production rate on the chain.
We investigate the recent fee mechanism EIP1559 of the Ethereum network. Whereas previous studies have focused on myopic miners, we here focus on strategic miners in the sense of miners being able to reason about the future blocks. We derive expressions for optimal miner behavior (in terms of setting block sizes) in the case of 2-block foresight and varying degrees of hashing power. Results indicate that a sufficiently large mining pool will have enough hashing power to gain by strategic foresight. We further use a simulation study to examine the impact of both 2-block and 3-block foresight. In particular, the simulation study indicates that for realistic levels of hashing power, mining pools do not gain from being able to reason more than 2 blocks ahead. Moreover, even though the presence of strategic miners increase the variation in block sizes and potentially empty blocks, overall system throughput tend to increase slightly compared to myopic mining.
Roi Bar-Zur, Ameer Abu-Hanna, Ittay Eyal, Aviv Tamar
The security of proof-of-work blockchain protocols critically relies on incentives. Their operators, called miners, receive rewards for creating blocks containing user-generated transactions. Each block rewards its creator with newly minted tokens and with transaction fees paid by the users. The protocol stability is violated if any of the miners surpasses a threshold ratio of the computational power; she is then motivated to deviate with selfish mining and increase her rewards.Previous analyses of selfish mining strategies assumed constant rewards. But with statistics from operational systems, we show that there are occasional whales – blocks with exceptional rewards. Modeling this behavior implies a state-space that grows exponentially with the parameters, becoming prohibitively large for existing analysis tools.We present the WeRLman1framework to analyze such models. WeRLman uses deep Reinforcement Learning (RL), inspired by the state-of-the-art AlphaGo Zero algorithm. Directly extending AlphaGo Zero to a stochastic model leads to high sampling noise, which is detrimental to the learning process. Therefore, WeRLman employs novel variance reduction techniques by exploiting the recurrent nature of the system and prior knowledge of transition probabilities. Evaluating WeRLman against models we can accurately solve demonstrates it achieves unprecedented accuracy in deep RL for blockchain.We use WeRLman to analyze the incentives of a rational miner in various settings and upper-bound the security threshold of Bitcoin-like blockchains. We show, for the first time, a negative relationship between fee variability and the security threshold. The previously known bound, with constant rewards, stands at 0.25 [2]. We show that considering whale transactions reduces this threshold considerably. In particular, with Bitcoin historical fees and its future minting policy, its threshold for deviation will drop to 0.2 in 10 years, 0.17 in 20 years, and to 0.12 in 30 years. With recent fees from the Ethereum smart-contract platform, the threshold drops to 0.17. These are below the common sizes of large miners [3].
On certain blockchains that use the proof-of-stake consensus mechanism, agents who validate transactions can set up pools that allow other agents to delegate their stake to earn higher returns. We study a version of the standard staking pool formation game in the presence of malicious agents, with an arbitrary distribution of stakes of honest agents. We establish existence and uniqueness of equilibria, how blockchain security can be maximized and how a leverage constraint impacts the functioning of the blockchain.
In this demo, we illustrate the process of creating a machine economy utilizing W3bstream - an emerging open-source framework designed for connecting smart devices to smart contracts. We will emphasize the flexibility and user-friendliness of W3bstream in empowering decentralized IoT applications.
When actions by one agent force another to deviate from their agreements with a third, “victim” turns into “injurer” in the chain’s subsequent steps. Should the chain’s initiator be responsible only for the direct harm they cause or also bear some of the indirect losses they trigger? Through an axiomatic approach, we characterize the class of fixed-fraction rules, which strike a balance between incentives for accident prevention on the one hand and fairness in terms of how liabilities are assigned on the other. Their simple design make the rules ideal for practical implementation through smart contracts, enabling automated conflict resolution. This paper was accepted by Manel Baucells, behavioral economics and decision analysis. Funding: J. Gudmundsson and J. L. Hougaard gratefully acknowledge financial support from the Carlsberg Foundation [Grant CF18-1112].
Abstract Fraudulent returns have become increasingly frequent in the development of online retail platforms, leading to huge losses for retailers. A blockchain‐based system can help eliminate this problem primarily because the data stored in a blockchain network cannot be modified. In this paper, we study the impact of blockchain technology that aims to eliminate fraudulent return behavior on retailers and their upstream suppliers. We develop a game‐theoretic model that comprises a supplier, a retailer, and customers and analyze the equilibrium outcomes. The results show that the retailer would (not) adopt blockchain technology if the efficiency of the supplier's investment in the innovation of its products is high (low). Moreover, if the retailer's loss from the return is low (high), the adoption of blockchain technology decreases (increases) the supplier's investment and the wholesale and retail prices. In terms of its effect on profitability, we reveal that if the fraudulent return losses are high, using blockchain technology always benefits the supplier; otherwise, it increases retailer profitability and supply chain performance but may make the supplier suffer losses in profits. Interestingly, the retailer would adopt blockchain technology to ensure profitability in situations where the number of customers without fraudulent returns and the intensity of losses are low; however, this weakens supplier profitability and meanwhile reduces supply chain performance.
Thomas Brzustowski, Alkis Georgiadis-Harris, Balázs Szentes
This paper reconsiders the problem of a durable-good monopolist who cannot make intertemporal commitments. The buyer’s valuation is binary and his private information. The seller has access to dynamic contracts and, in each period, decides whether to deploy the previous period’s contract or to replace it with a new one. The main result of the paper is that the Coase conjecture fails: the monopo-list’s payoff is bounded away from the low valuation irrespective of the discount factor. (JEL D42, D82, D86, L12)
Sarah Azouvi, Guy Goren, Lioba Heimbach, Alexander Hicks
In 2021 Ethereum adjusted the transaction pricing mechanism by implementing EIP-1559, which introduces the base fee - a network fee that is burned and dynamically adjusts to the network demand. The authors of the Ethereum Improvement Proposal (EIP) noted that a miner with more than 50% of the mining power could be incentivized to deviate from the honest mining strategy. Instead, such a miner could propose a series of empty blocks to artificially lower demand and increase her future rewards. In this paper, we generalize this attack and show that under rational player behavior, deviating from the honest strategy can be profitable for a miner with less than 50% of the mining power. We show that even when miners do not collaborate, it is at times rational for smaller miners to join the attack. Finally, we propose a mitigation to address the identified vulnerability.
Contrats intelligents pour les enchères : de l'évaluation expérimentale à la confidentialité La sécurité et la transparence des blockchains semblent fournir un environnement adaptépour les enchères. Nous nous focalisons sur l'enchère Vickrey-Clarke-Groves pour larecherche sponsorisée (VCG) pour évaluer cette hypothèse. Nous proposons et utilisonsune méthodologie pour la comparaison de différents blockchains du point de vue descontrats intelligents (smart contracts). En utilisant VCG, nous avons comparé Ethereumet Tezos ainsi que les mises à jour récentes d’Ethereum sous la forme d'Ethereum Mergeet Polygon POS. Enfin, nous analysons les conséquences du manque de confidentialitédes blockchains dans une enchère telle que VCG, en proposant trois nouveauxalgorithmes pour en atténuer les effets négatifs.
Submitted by Levy Santiago (levyssantiago@gmail.com) on 2023-09-22T11:33:39Z No. of bitstreams: 2 license_rdf: 1037 bytes, checksum: 996f8b5afe3136b76594f43bfda24c5e (MD5) Levy Santiago. Dissertacao Mestrado.pdf: 1690608 bytes, checksum: d786948994ce08676e7c4ca08284546b (MD5)
Aggelos Kiayias, Ηλίας Κουτσουπιάς, Philip Lazos, Giorgos Panagiotakos
Blockchain systems come with the promise of being inclusive for a variety of decentralized applications (DApps) that can serve different purposes and have different urgency requirements. Despite this, the transaction fee mechanisms currently deployed in popular platforms as well as previous modeling attempts for the associated mechanism design problem focus on an approach that favors increasing prices in favor of those clients who value immediate service during periods of congestion. To address this issue, we introduce a model that captures the traffic diversity of blockchain systems and a tiered pricing mechanism that is capable of implementing more inclusive transaction policies. In this model, we demonstrate formally that EIP-1559, the transaction fee mechanism currently used in Ethereum, is not inclusive and demonstrate experimentally that its prices surge horizontally during periods of congestion. On the other hand, we prove formally that our mechanism achieves stable prices in expectation and we provide experimental results that establish that prices for transactions can be kept low for low urgency transactions, resulting in a diverse set of transaction types entering the blockchain. At the same time, perhaps surprisingly, our mechanism does not necessarily sacrifice revenue since the lowering of the prices for low urgency transactions can be covered from high urgency ones due to the price discrimination ability of the mechanism.
Purpose The construction industry has arrived at a crossroads of rapid technological progress. While it is foreseen that the advent of new construction technologies will disrupt the construction industry’s future, such disruptions often create the ideal environment for innovation. As poor payment practices continue to plague the construction industry, the advent of smart contracts has created an opportunity to rectify the inherent flaws in the mitigation of payment problems in traditional construction contracts. Given the intrinsic resistance of construction firms to such revolutionary changes, this study aims to understand the various factors influencing the adoption of smart contracts in the Singapore construction industry. Design/methodology/approach A mixed method was adopted involving quantifying respondents’ perceptions of the factors influencing smart contract adoption, and validation from a group of interviewees on the matter. Out of 461 registered quantity surveyor members contacted via the Singapore institute of surveyors and valuers website, 55 respondents took part in the survey. This is followed by semi-structured interviews to validate the survey results. Findings The findings indicate that construction firms have neither a significant knowledge of nor willingness to adopt smart contracts. A total of 29 institutional factors were also identified that significantly influence the adoption of smart contracts. The quantitative findings were further reinforced by qualitative interviews with five industry experts. Originality/value With recognition of and the successful formulation of the significant institutional drivers and barriers, the key findings of this study will be integral in driving the commercial adoption of smart contracts within the construction industry.
Soumya Basu, David Easley, Maureen O’Hara, Emin Gün Sirer
Blockchain-based cryptocurrencies must solve the problem of assigning priorities to competing transactions. The most widely used mechanism involves each transaction offering a fee to be paid once the transaction is processed, but this discriminatory price mechanism fails to yield stable equilibria with predictable prices. We propose an alternate fee setting mechanism, StableFees, that is based on uniform price auctions. We prove that our proposed protocol is free from manipulation by users and miners as the number of users and miners increases and show empirically that gains from manipulation are small in practice. We show that StableFees reduces the fees paid by users and reduces the variance of fee income to miners. Data from December 2017 show that, if implemented, StableFees could have saved Bitcoin users $272,528,000 USD in transaction fees while reducing the variance of miner’s fee income, on average, by a factor of 7.4. We argue that our fee protocol also has important social welfare and environmental benefits. This paper was accepted by Agostino Capponi, Special Section of Management Science: Blockchains and Crypto Economics. Supplemental Material: The data files are available at https://doi.org/10.1287/mnsc.2023.4735 .
Ethereum has become a popular blockchain with smart contracts for investors nowadays. Due to the decentralization and anonymity of Ethereum, Ponzi schemes have been easily deployed and caused significant losses to investors. However, there are still no explainable and effective methods to help investors easily identify Ponzi schemes and validate whether a smart contract is actually a Ponzi scheme. To fill the research gap, we propose PonziLens, a novel visualization approach to help investors achieve early identification of Ponzi schemes by investigating the operation codes of smart contracts. Specifically, we conduct symbolic execution of opcode and extract the control flow for investing and rewarding with critical opcode instructions. Then, an intuitive directed-graph based visualization is proposed to display the investing and rewarding flows and the crucial execution paths, enabling easy identification of Ponzi schemes on Ethereum. Two usage scenarios involving both Ponzi and non-Ponzi schemes demonstrate the effectiveness of PonziLens.
Francesco Bruschi, Donatella Sciuto, Tommaso Paulon, Andrea Marchesi
Blockchain technology allows players to own in-game assets and to be rewarded with NFTs or tokens for their game achievements, thus can be a game changer for all the gaming industry. One central issue is how to check that conditions for achievements are met (e.g., that the player completed level 10). Current approaches open cheating backdoors (e.g. if the client checks the conditions) or introduce centralization points (if a backend checks the condition). Ideally, we would like to “run” games on chain, but so far that has not been possible due to the high computational cost, especially on Ethereum; however, the development of technologies like proofs of computation can solve this problem. Being able to run games on the blockchain, new decentralized rewarding systems can be built to ensure the fair and transparent rewarding of game achievements.
Francesco Spegni, Lorenzo Fratini, Massimiliano Pirani, Luca Spalazzi
This work deals with the automatic generation of smart contracts to enforce compliance to a given BPMN choreography of requests sent by a set of independent actors. The choice of smart contracts is justified by the desire not to centralize the enforcement process when there are multiple independent actors characterized by low mutual trust. The choice of BPMN choreographies as an alternative to BPMN processes and collaborations is instead justified by the desire to leave the actors free to dynamically organize their internal processes in the way they prefer, provided that the interactions with the other actors respect some agreed protocol. This work proposes a formal framework to interpret choreographies and translate them onto smart contract enforcers. The framework has been implemented on a free open-source tool named ChoEn and tested by means of a running example.