Tato diplomová práce se zabývá návrhem a implementací nástroje pro statickou analýzu spotřeby plynu ve smart kontraktech napsaných v jazyce Solidity. Cílem je vytvořit nástroj, který v kódu automaticky odhalí vzory zbytečně zvyšující náklady na provádění kontraktu a upozorní na možné optimalizace. Na základě analýzy existujících řešení a běžných optimalizačních vzorů byl implementován soubor detektorů jako rozšíření nástroje Slither, jehož výsledky jsou prezentovány prostřednictvím webové aplikace. Uživatelské rozhraní aplikace bylo navrženo uživatelsky orientovaným postupem a ověřeno pomocí prototypování a uživatelského testování. Funkčnost detektorů byla ověřena na sadě reálných kontraktů a reálné úspory plynu empiricky změřeny.
This thesis presents a comprehensive framework for intelligent energy management in residential environments through the development and implementation of an advanced integrated hardware and software architecture. The primary objectives were to design a modular, scalable system capable of real-time energy monitoring, predictive consumption analysis, and secure peer-to-peer energy trading; to implement this system using cost-effective hardware components and open-source software solutions; to develop a prototype demonstrating core functionalities; and to evaluate the system's performance, limitations, and potential for future enhancement within the evolving smart grid ecosystem. The methodological approach encompassed a layered architecture integrating physical hardware sensors with containerized software components. At the hardware level, a Raspberry Pi 4 platform was utilized as the central computing unit, augmented with specialized energy monitoring components including the RPICT7V1 module, SCT-013-000 current transformers, and ZMPT101B voltage sensors. This configuration enabled granular measurement of electrical parameters with ten-second sampling intervals. The software architecture was constructed on a Linux-based server environment using MicroK8s for lightweight Kubernetes orchestration. This containerized microservices framework incorporated InfluxDB for time-series data storage, Grafana for real-time visualization, and a Large Language Model (LLM) for predictive analytics. External data integration was achieved through a REE API connection that provided real-time electricity pricing information from the Spanish market. Additionally, a decentralized energy trading system was conceptually designed using the Cardano blockchain, featuring smart contracts implemented in Plutus and non-fungible tokens (NFTs) for transaction traceability. The testing and validation phase confirmed the successful deployment and operational functionality of the core system components. The hardware sensing layer demonstrated accurate data acquisition capabilities, reliably capturing voltage and current measurements across multiple channels. The containerized software infrastructure exhibited stable operation and effective inter-service communication within the Kubernetes environment. End-to-end data flow validation verified the complete pathway from sensor readings through storage in InfluxDB to visualization in Grafana dashboards. The integration of external energy market data from the REE API was successfully implemented, enabling real-time electricity price monitoring. Functional Grafana dashboards provided intuitive visualization of key energy metrics including power consumption, voltage levels, current intensity, and PVPC pricing. While computational constraints of the Raspberry Pi platform limited full LLM functionality, and the peer-to-peer trading system remained at the architectural design stage rather than full implementation, these limitations were clearly identified as areas for future development. In conclusion, this research successfully demonstrated the viability of integrating real-time monitoring, containerized microservices, and foundational blockchain technologies within a residential energy management context. The prototype represents a significant advancement toward democratized energy management through its modular, open-source architecture and cost-effective hardware implementation. Future work will focus on migrating the computational stack to more powerful hardware such as the NVIDIA Jetson Orin Nano platform to enable full LLM integration, implementing the complete peer-to-peer trading functionality, and developing advanced features including dynamic load balancing, demand response integration, and multi-site energy management. This research contributes to the evolving field of intelligent energy systems by providing a blueprint for scalable, decentralized solutions that enhance grid resilience, empower energy prosumers, and support the transition toward sustainable, efficient energy ecosystems
The thesis is focused on the topic of virtual cryptocurrency Bitcoin. The theoretical part is divided into several chapters. First of all, there is a chapter containing basic information about the currency's history, its development to the present, as well as principles of operation of this currency. Because it is a currency based on cryptographic principles next chapter summarizing cryptographic techniques, which is necessary to know for subsequent analysis of this currency. In other parts is elaborated a detailed analysis of the principles of Bitcoin. The main point of this analysis is a system of transactions, decentralized history, then joining the transactions into blocks and in the end creating blockchain. It also explains the principle of P2P networks. The practical part of this work focuses on the analysis and design of payment applications for mobile devices. There used open-source libraries such BitcoinJ. The application is developed in Java programming language with plugin for portable devices, which work under the operating system Android. For the purposes of analysis and design of graphical user interface is used UML diagrams. The specification of the UML diagrams was utilized by freely available graphics software and the result is also included in this work.