This AI chatbot is either an exploiter’s dream or their nightmare

The online crypto community has discovered a new artificial intelligence (AI)-powered chatbot that can either be used to warn developers about vulnerabilities in smart contracts or teach hackers how to exploit them.

ChatGPT, a chatbot tool built by AI research company OpenAI, was released on November 30 and was designed to interact “in a conversational way” with the ability to answer follow-up questions and even admit mistakes, according to the company.

However, some Twitter users have realized that the fine could potentially be used for both good and bad, as it could be called upon to reveal loopholes in smart contracts.

Stephen Tong, co-founder of smart contract auditing firm Zellic asked ChatGPT to help find an exploit, presenting a piece of smart contract code.

The bot responded by noting that the contract had a re-entry vulnerability where an exploiter could repeatedly withdraw the funds from the contract and provided an example of how to fix the problem.

This similar type of exploit was used in May by the attacker of decentralized finance (DeFi) platform Fei Protocol who made off with $80 million.

Others have shared results from the chatbot after querying it with vulnerable smart contracts. Twitter user devtooligan shared a screenshot of ChatGPT, which provided the exact code needed to fix a Solidity smart contract vulnerability, commenting “we’re all going to be out of a job.”

With the tool, Twitter users have already started joking that they can now start security audit businesses simply by using the bot to test for weaknesses in smart contracts.

Cointelegraph tested ChatGPT and found that it can also create an example smart contract from a request using simple language, generating code that can apparently provide stake rewards for Ethereum-based non-fungible tokens (NFTs).

ChatGPT’s sample Solidity smart contract for NFT staking rewards from a simple request. Image: Cointelegraph.

Despite the chatbot’s ability to test smart contract functionality, it was not designed exclusively for that purpose, and many on Twitter have proposed some of the smart contracts it generates have problems.

The tool may also provide different answers depending on the way it is asked, so it is not perfect.

Related: Secret Network Resolves Network Vulnerability After White Hat Disclosure

OpenAI CEO Sam Altman tweeted that the tool was “an early demo” and is “very much a research release.”

He believed that “language interfaces are going to be a big deal” and tools like ChatGPT will “soon” have the ability to answer questions and advise with later iterations completing tasks or even discovering new knowledge.