background image

32 

Expected  outcomes  include  demonstrating  the  system’s  ability  to  handle  key  functionalities  like 
contract automation, dispute resolution, and transparent transaction logging in a scalable manner. The 
project aims to illustrate how using a Layer-2 solution like Optimistic Ethereum can lower costs and 
improve transaction speeds, providing a clear pathway for how such a system could be scaled in real-
world applications. 
 
Testing and Evaluation: Testing will be conducted on the Optimistic Ethereum testnet (OP Sepolia) 
to  evaluate  the  system’s  performance  under  various  scenarios.  The  focus  will  be  on  assessing 
transaction efficiency, scalability, and security within the Layer-2 environment. Specific metrics of 
interest include gas costs, transaction latency, and the robustness of the fraud-proof system. By testing 
in Optimistic Ethereum, the project aims to capture the practical benefits of off-chain processing and 
the impact of Layer-2 scaling solutions on decentralized energy trading systems. 
The  testing  phase  will  help  validate  the  conceptual  design  and  provide  valuable  insights  into  the 
operational characteristics of blockchain-based VPPA management [46]. This approach will highlight 
the advantages and challenges of using Optimistic Ethereum, offering a basis for future research and 
potential real-world deployment of similar systems in the energy sector. 

4.2 Programming languages 

 
Programming  languages  that  compile  to  Ethereum  Virtual  Machine  (EVM)  code  include  Solidity, 
Serpent, LLL (Low-Level Lisp-like Language), and Vyper. Among these, Solidity is the most widely 
used  language  within  the  Ethereum  ecosystem  due  to  its  developer-friendly  syntax,  which  is 
somewhat  reminiscent  of  JavaScript  but  more  accurately  reflects  the  structure  and  object-oriented 
nature of languages like C++ or Java. Solidity's object-oriented approach allows developers to create 
complex and reusable code structures, making it particularly suitable for the design of sophisticated 
smart contracts. 
 
Solidity  is  designed  to  compile  code  into  EVM  bytecode,  which  is  executed  by  the  Ethereum 
blockchain.  The  Solidity  compiler,  known  as  "solc",  is  responsible  for  transforming  Solidity  code 
into  EVM  bytecode  and  generating  the  Application  Binary  Interface  (ABI),  which  is  a  JSON 
representation  of  the  smart  contract’s  functions,  events,  and  data  structures.  The  ABI  and  EVM 
bytecode  are  essential  components  for  deploying  and  interacting  with  smart  contracts  on  the 
blockchain [44], [47]. 
 
For this project, Solidity is the language of choice due to its extensive support within the Ethereum 
community  and  its  compatibility  with  the  Optimistic  Ethereum  network.  Importantly,  Optimistic 
Ethereum is fully EVM-compatible, meaning that smart contracts written in Solidity and other EVM-
compatible languages can be deployed on Optimistic Ethereum with minimal modifications [48]. 
 
The EVM is the runtime environment that executes smart contracts on the Ethereum blockchain, and 
it  serves  as  the  computational  engine  for  both  Ethereum  and  its  Layer-2  solutions,  including 
Optimistic Ethereum. Optimistic Ethereum maintains EVM compatibility, meaning that it supports 
the same bytecode and execution logic as the Ethereum mainnet. This compatibility ensures that smart 
contracts developed for Ethereum can be seamlessly migrated to Optimistic Ethereum, leveraging its 
enhanced scalability without the need for rewriting or extensive modifications [49]. 
 
By  maintaining  EVM  compatibility,  Optimistic  Ethereum  allows  developers  to  use  the  same 
development tools, libraries, and  languages (like Solidity) that they are familiar with on Ethereum. 
This also ensures that smart contracts running on Optimistic Ethereum benefit from the security and 
decentralized trust model of the Ethereum mainnet, as all transactions ultimately settle on the Layer-
1  blockchain  after  passing  through  a  dispute  resolution  mechanism  [50].  This  relationship  makes 
Optimistic Ethereum an attractive platform for deploying scalable smart contracts, as it combines the