# MSmart: Smart Contract Vulnerability Analysis and Improved Strategies Based on Smartcheck
## 1 Introduction  
Blockchain is the core technology of Bitcoin. It first appeared in \"Bitcoin: A Peer-to-Peer Electronic Cash System\" [1] published by [PERSON]. The essay narrates a new, decentralized, completely distributed payment system architecture that does not require a trust foundation. One prominent use of blockchain technology is the smart contract. As early as the 1990s, the concept of smart contracts was proposed by [PERSON] [2]. Before the advent of blockchain technology, smart contracts were not commonly used for technical reasons [3]. Smart contracts are automatically triggered when preset circumstances are satisfied, unlike traditional contracts which require a reliable third party [4]. Tens of thousands of smart contracts have been deployed on blockchain platforms and are continuing to grow rapidly. However, as the quantity of smart contracts rises, there are already significant challenges with their security. Smart contracts cannot be modified once they have been deployed because of their immutability and irreversibility. The deployment of smart contracts is in an open network setting. Therefore, smart contracts are more easily attacked [5, 6]. Anonymous attackers can obtain higher remuneration, easier cash outs (ether can be traded immediately), and a lower risk of being punished by attacking smart contracts, which is more likely to result in victims taking huge financial losses. In 2017, the multi-signature wallet Parity lost hundreds and thousands of ether, and the delegatecall vulnerability caused millions of funds to be frozen. In 2018, USChain BEC lost about 900 million dollars due to the integer overflow vulnerability. In 2020, manyhackers attacked smart contract games including FarmEOS, Playgames, LuckBet, and EOSPlaystation [7; 8; 9; 10], which lost a total of around one million dollars. These show that the smart contract vulnerability has caused the significant financial losses and the significance of smart contract security. Therefore, before being implemented, smart contracts must be checked to make sure they are accurate [11]. In order to ensure property safety, a tool that can detect smart contract vulnerabilities is essential. The current smart contract vulnerability detection technologies mainly include symbolic execution, intermediate representation, etc. Oyente [12] uses symbolic execution to detect smart contract vulnerabilities. Oyente has significantly reduced the false positive by traversing each path and using the Z3 solver [13]. Oyente was successful in limiting the number of cycles to prevent the space explosion [14], which also leads to a significant increase in the false negative rate. Another tool for symbolic execution to find vulnerabilities is Mythril [15], and it detects smart contract vulnerabilities by using conceptual analysis [16], taint analysis [17], and verification control flow [18]. While Mythril can analyze many types of smart contract vulnerabilities, it needs to find critical bytecodes (such as \"ADD\"), which takes a long time. Slither [19] uses the intermediate representation to detect smart contracts vulnerabilities. Slither offers syntax checking in addition to supporting contract checking. Slither is prominent in reentrant vulnerability detection. Another tool for the intermediate representation to find vulnerabilities is Smartcheck [20]. Smartcheck is a scalable static smart contract analysis tool. Although Smartcheck can analyze most of the existing smart contract vulnerabilities, it also has some false positives and false negatives. In order to better identify common vulnerabilities such as timestamp dependence vulnerabilities, integer overflow vulnerabilities, self-destruct vulnerabilities, etc., we improve Smartcheck. The improved Smartcheck, named MSmart, has carried out detailed comparison experiments on real large data sets. Compared with other tools such as Oyente via specific vulnerability contracts, it is concluded that MSmart can better analyze and detect related vulnerabilities.