OpenAI’s new ChatGPT chatbot, launched on Dec 1. is making its way around Crypto Twitter with its advanced ability to understand and write code – specifically Solidity, the coding language used to develop smart contracts for Ethereum and other layer-2s.
today we launched ChatGPT. try talking with it here: https://t.co/uWra8LKFMN
— Sam Altman (@sama) November 30, 2022
Currently available for beta testing, users of the Web3 community have used the bot to audit smart contracts and find vulnerabilities within them, sparking the conversation of whether AI will eventually replace the developers & auditors within the space.
omg. seriously mind-blown ????
— devtooligan (@devtooligan) December 1, 2022
we're all gonna be out of a job ???? pic.twitter.com/iwjjOTPDLY
Exploiting smart contracts with AI
Many are also worried that the AI tool could be used with malicious intent to exploit existing contracts.
AI (ChatGPT) can exploit a solidity smart contract.
— Greg Osuri (@gregosuri) December 1, 2022
We can pack up now. https://t.co/BVzJaLxEcq
However, users have pointed out that responses are not always accurate.
“Instead of suggesting solutions, the AI should write a proper regression test first. Without that this is all reckless ‘hoping for the best’, ” said one user.
A good debugging companion
With the current version of ChatGPT, it may be good for preliminary checks but definitely doesn’t beat human audits.
Without a strong idea of what the code means or what you’re attempting to accomplish with the contract, the possibility of actually finding an exploit is minimal and will probably do more harm than good.
ChatGPT, at least for now, is rather a good debugging companion than a full-blown auditing tool and should be used with discretion and not be solely relied on to find potential flaws within code.