Cointime

Download App
iOS & Android

Eliminating the Problem of Smart Contracts Vulnerabilities

Cointime Official

By Pruvendo

Blockchain smart contracts is not new technology.

For 7 years people have been engaged in smart contract’s development for the most different types of projects, from DAOs to GameFi. But security problems, which were relevant 7 years ago, are still relevant now.

Why, despite the application of audit to almost every web3 project, the vast majority of smart contracts continue to be vulnerable and contain exploits?

The main reasons that most smart contracts are insecure:

  1. Technologies that do not meet modern realities.Due to the fact that most vulnerabilities are not obvious, it’s required an enormous amount of time to find them using most prevalent methods like testing or code review.
  2. Lack of time on production.Usually smart contracts are written in a short time to meet the TTM deadline. And often in such conditions, security is not the main goal, considering that the security check key point is audit.
  3. Insufficient tools.The fact that there are no tools or solutions in the smart contract developer’s toolset which could allow them to quickly detect vulnerabilities in smart contracts during the development process.
  4. The complexity of smart contract logic.Smart contracts often contain tens of thousands lines of code, a large number of functions and variables, which make it impossible to cover all probable scenarios that may trigger errors or vulnerabilities, when there are millions of possible combinations and interactions between them.

All this leads to the fact that vulnerabilities remain in smart contracts after the project is launched. And, due to that in most cases smart contracts are immutable, it’s nearly impossible to prevent the attack and money loss (usually the major problem is not even money, but reputational loss).

But what tool or method could help to avoid all these risks and would allow to create 100% secure-by-design smart contract, unavailable to be hacked or attacked?

The formal verification (FV).

How? — let’s analyze its application using examples of the most common vulnerabilities of smart contracts.

Integer Arithmetic Error

Shortly — the overflow of integers and the problem that there could be inaccuracy in values during the calculation process.

The way that FV prevents this error is simple — during the process of formal verification of the smart contract all possible values are tested. There couldn’t be an unexpected value, which may cause an error.

Missing Parameters

This occurs from sloppy designs in smart contracts and some other programming mistakes during the process. Application of the FV fixes the entire problem by checking every possible input and prerequisite for every operation. This solves the problem from its basics.

Smart Contract Security Audit

How about using actual audit (code review + testing) to verify security of formally verified smart contracts? The answer is already in the question: if the smart contract is formally verified, then methods, which are currently used by auditors will not find any bugs or exploits due to their absence.

Last thoughts

There are many ways to attack a smart contract. But all of them developed in a situation where smart contracts had many vulnerabilities and had no mechanisms to avoid this.

The application of formal verification changes the rules of the game between hackers and security engineers, invalidating hackers of ways to attack.

Comments

All Comments

Recommended for you

  • Wormhole completes US$225 million in financing at US$2.5 billion valuation

    On November 29th, according to Fortune, Wormhole completed a $225 million financing with a valuation of $2.5 billion and completed its split with Jump Crypto.

  • DeFi revenue platform Coinchange secures US$10 million in financing

    DeFi yield platform Coinchange raised $10 million in financing. Participants in this round of financing include G1.VC, Spirit Blockchain, Good News Ventures, K2.CA, Atoia Ventures, and Mintfox.

  • Chen Maobo: Virtual assets require new regulatory systems to deal with them

    Hong Kong Financial Secretary Paul Chan Mo-po pointed out at a high-level meeting of the Hong Kong Monetary Authority and the Bank for International Settlements (BIS) that the global financial industry is innovating rapidly, and there have been major breakthroughs in the development of artificial intelligence. This will bring new work models to society and the financial industry, and virtual assets are also emerging. All technological applications and investments require new regulatory systems to cope with them. Local governments and central banks need to cooperate and share information, and coordinate with each other when launching relevant policies, in order to further promote financial innovation.

  • Charlie Munger, Warren Buffett's longtime business partner and Berkshire Hathaway vice chairman, dies at 97

    Charles Munger, the vice chairman of Berkshire Hathaway and longtime partner of Warren Buffett, has died at the age of 97. Munger was known for his blunt investing style and his ability to outperform the market. He was also a philanthropist, donating over $100 million to build housing at the University of Michigan. Munger lived modestly and was often compared to Buffett for his aversion to following trends.

  • Web3 Commerce App Setter Raises $5M Seed Round Led by A16z

    Web3 consumer-facing app Setter has raised $5 million in a seed round led by Andreessen Horowitz (A16z) and featuring participation from Marcy Ventures Partners, Dreamers VC, Thirty-Five Ventures, and Serena Williams. The company is building a "smart contract wallet" that allows users to easily switch from traditional Web2 payments to crypto using their credit cards. Setter aims to make it simpler for non-crypto native users to join Web3 and wants to help brands explore Web3-powered commerce by enabling them to offer payment options that allow users to easily switch from fiat to crypto. The company's initial plans are to develop partnerships with leading streetwear and sneaker brands, with an ultimate goal of expanding its ecosystem across fashion, luxury items, and consumer collectibles.

  • Decentralized Bitcoin mining project Mummolin raises $6.2 million in seed funding, led by Jack Dorsey

    Mummolin, Inc. announced that it has raised $6.2 million in seed funding, with strategic partners such as Jack Dorsey, Accomplice, Barefoot Bitcoin Fund, MoonKite, NewLayer Capital, and Bitcoin Opportunity Fund leading the investment. The seed funding will support the launch of the decentralized Bitcoin mining project OCEAN.

  • Web3 consumer application Setter completes $5 million in seed round financing, led by a16z

    On November 28th, according to CoinDesk, Web3 consumer application Setter completed a $5 million seed round of financing, led by a16z, with participation from Marcy Ventures Partners, Superlayer, Thirty Five Ventures, and retired tennis star Serena Williams. Setter plans to help brands innovate and promote exclusive products, and provide customers with limited edition products. Setter aims to solve the complexity and unfriendliness of current wallet technology, providing a more seamless Web3 experience for more users.

  • Web3 entertainment company AnotherBall completes US$12.7 million in seed round financing, led by Hashed and ANRI

    On November 28th, Web3 entertainment company AnotherBall announced the completion of a $12.7 million seed round financing, led by ANRI and Hashed, with participation from Global Brain, Globis Capital Partners, Sfermion, HashKey Capital, Everyrealm, Ethereal Ventures, Emoote, and Crunchyroll founder Kun Gao.
    It is reported that AnotherBall has been actively involved in technology projects such as "Ailis" and "SAI by IZUMO". AnotherBall is currently developing a platform that allows creators from around the world to connect with fans and earn money through their content. The beta version of the platform is planned to be released in the first quarter (January to March) of 2024, with a full public release expected later this year. AnotherBall is a venture capital company established in May 2022, with a focus on the Web3 virtual UP main project IZUMO, aimed at creating a place for broadcasters, illustrators, music and video producers who love anime, comics and game culture to continuously create income based on their hobbies.
    As previously reported by BlockBeats, on May 17th, AnotherBall completed a $2.2 million angel round financing, with participation from Hiroaki Kitano, Chief Technology Officer of Sony Group, Jaynti Kanani, founder of Polygon, Suji Yan, Chief Technology Officer of Mask Network, Kevin Lin, co-founder of Twitch, and Rehito Hatoyama, advisor to Azuki development company Chiru Labs.

  • Li Jiachao calls on citizens to strengthen investor education when trading on licensed platforms

    Hong Kong Chief Executive Carrie Lam attended a meeting with the media before the meeting today and expressed concern about the case. The Securities and Futures Commission and the police will explain the incident this afternoon. When asked whether the current relevant regulations are insufficient, Carrie Lam responded that the government needs an effective regulatory system to protect investors. She believes that this incident shows that citizens must invest in regulated and licensed platforms and emphasizes that the current licensing system can ensure that platforms provide sufficient protection for investors, including distinguishing between funds held by platforms for investors and operating funds of the company, and ensuring that the company's debt capacity is regulated and restricted.

  • Hong Kong Securities and Futures Commission: HOUNAX has received 15 complaints about suspected fraud so far

    Virtual asset trading platform HOUNAX is suspected of fraud. The Hong Kong Securities and Futures Commission stated that it has received 15 related complaints so far, and the victims have also reported to the police.