The large-scale deployment of Solidity smart contracts on the Ethereum
mainnet has increasingly attracted financially-motivated attackers in recent
years. A few now-infamous attacks in Ethereum's history includes DAO attack in
2016 (50 million dollars lost), Parity Wallet hack in 2017 (146 million dollars
locked), Beautychain's token BEC in 2018 (900 million dollars market value fell
to 0), and NFT gaming blockchain breach in 2022 (600millioninEtherstolen).Thispaperpresentsacomprehensiveinvestigationoftheuseoflargelanguagemodels(LLMs)andtheircapabilitiesindetectingOWASPTopTenvulnerabilitiesinSolidity.Weintroduceanovel,class−balanced,structured,andlabeleddatasetnamedVulSmart,whichweusetobenchmarkandcomparetheperformanceofopen−sourceLLMssuchasCodeLlama,Llama2,CodeT5andFalcon,alongsideclosed−sourcemodelslikeGPT−3.5TurboandGPT−4oMini.OurproposedSmartVDframeworkisrigorouslytestedagainstthesemodelsthroughextensiveautomatedandmanualevaluations,utilizingBLEUandROUGEmetricstoassesstheeffectivenessofvulnerabilitydetectioninsmartcontracts.Wealsoexplorethreedistinctpromptingstrategies−zero−shot,few−shot,andchain−of−thought−toevaluatethemulti−classclassificationandgenerativecapabilitiesoftheSmartVDframework.OurfindingsrevealthatSmartVDoutperformsitsopen−sourcecounterpartsandevenexceedstheperformanceofclosed−sourcebasemodelslikeGPT−3.5andGPT−4Mini.Afterfine−tuning,theclosed−sourcemodels,GPT−3.5TurboandGPT−4oMini,achievedremarkableperformancewith99theirtypes,and98withthe‘chain−of−thought′promptingtechnique,whereasthefine−tunedclosed−sourcemodelsexcelwiththe‘zero−shot′promptingapproach.