The prevalence of Bitcoin has attracted a mass of investors into the blockchain ecosystem. Unfortunately, benefiting from its anonymity and immutability, scammers deploy various traps in smart contracts to exploit other participants and seize illegal proceeds. To identify smart Ponzi contracts-a classic fraud widely popular on Ethereum, previous studies present several machine learning-based models with considerable accuracy. However, the performance of their models relies on the behavioral features of smart contracts to a large margin, which are extracted from the transaction records only after a contract has been running for some time. In this paper, we borrow ideas from text feature extraction from Natural Language Processing (NLP) to build a classification model based on an improved CatBoost algorithm. A novel feature extraction pattern is applied in our model to deeply mine the logic of smart contract code. This approach can be used to detect Ponzi schemes at deployment time with improved performance, and thus can avoid the loss of investors originally.