Decentralized Finance (DeFi), underpinned by blockchain technology, has been beleaguered by recurrent security breaches, leading to billions of USD in annual losses. These attacks, characterized by their dynamic nature and high frequency, are however not impervious to detection and prevention. This presentation delves deep into an array of Artificial Intelligence (AI) techniques tailor-made to fortify blockchain-based applications. We will place a special emphasis on harnessing the prowess of Large Language Models (LLMs) for conducting thorough security audits on smart contracts through advanced prompt engineering. Additionally, we introduce "blockGPT", a pioneering tool that produces intricate tracing representations of blockchain activity. This tool is designed to train an LLM from the ground up, enabling it to function as a real-time Intrusion Detection System. We demonstrate the efficacy of blockGPT in identifying potential threats, remarkably without the need for predefined rules, labeled training datasets, and boasting a batched throughput of up to 2,000 transactions per second.