# Detection and Analysis of Ethereum Energy Smart Contracts
## 1 Introduction  
The emerging trend towards decentralization leads the pursuit for technologies that facilitate tamper-proof data exchange. Similarly, blockchain is based on a peer-to-peer architecture, which has empowered several core technologies including digital signatures, smart contracts, cryptographic hashing, and consensus mechanisms [1; 2; 3]. With the continued development of blockchain technology in a multitude of applications, the number of smart contracts deployed in distributed ledgers has increased tremendously. Smart contracts [4] are self-executing decentralized applications running on blockchain used for governance of financial assets that once deployed are autonomous and immutable. Smart contracts adhere to the underlying configuration of distributed ledgers and inherit automation, immutability, and decentralization qualities [5]. With the widespread adoption of blockchain platforms across various decentralized applications, smart contract interoperability is continuously evolving. Hence, Ethereum [6] has become a prominent smart-contract-based blockchain platform due to the increasing adoption of its decentralized applications. Ethereum's surging popularity can beattributed to its high level of robustness and adaptability for a wide range of applications [7]. Ethereum currently hosts over four million smart contracts with approximately 670,000 smart contracts deployed each month and over 3000 DApps [8]. Therefore, a major concern for users is identifying the desired application service among dozens of smart contracts in a timely and efficient manner. The identification of contracts is one of Ethereum's primary challenges. Some smart contract developers make their source code available, along with a description of its context and purpose. Unless the contract developer invests in publicizing it through designated fora, the vast majority of smart contracts remain anonymous and hardly traceable without a description. With the increasing number of smart contracts, assisting users to identify their required service among a massive number of contracts has become an ongoing challenge. As a result, it is imperative to outline a hierarchy that provides a comprehensive mapping of smart contracts that exceed the primary query services of blockchain platforms that are limited to contract address, block number, transaction hash, and timestamp. An important step towards performing such searches requires accurate labeling of the contracts, which was initially performed through an inefficient manual process. As a result, a comprehensive classification model capable of automatically classifying current or recently uploaded contracts is required. Research has been carried out to help comprehend what smart contracts do and to enable contract searches based on their context and purpose. The proposed methods are centered on learning the characteristics and the structural code embedding of smart contracts. However, the existing classification and topic modeling schemes for smart contracts are limited to application domains, such as entertainment, management, the IoT, lottery, gambling, gaming, and so on [9; 10; 11]. This is why recent studies have underlined the significance of blockchain-enabled peer-to-peer energy trading systems [12] leveraging smart contracts [13]. The advent of blockchain technology offers the potential to securely automate P2P energy trading [14; 15]. Smart contracts have proven to be effective for autonomous and secure execution of end-to-end energy transactions based on local consumer preferences. Ethereum's smart contracts are regarded as strict protocols on the blockchain that allow energy transactions to be carried out once all prerequisites have been met. Energy exchanges are monitored as financial transactions, with the corresponding resource consumption quantified in gas units and remitted in Ether at the gas price [16; 17].