# Blockchain-Based Quality Assurance System for Academic Programs
## 3 The Proposed Blockchain-Based QAS
### Implementation Environment  
#### 3.7.1 Ethereum Blockchain and Smart Contracts  
The proposed blockchain-based QAS uses the well-known Ethereum blockchain and smart contract technologies. The blockchain is public, so it can provide more security and transparency levels. Moreover, there is an additional authentication and access control layer imposed by the web system to control users and make sure that only authorized users can perform transactions in the QAS, and each user can have permissions as per his role, as specified in Table 1.  
The Solidity programming language was used for implementing the smart contracts on the Ethereum Virtual Machine (EVM), while the Truffle development framework was used to facilitate the smart contract development and testing. The Metamask was used to allow users to access their Ethereum wallet and perform transactions through the QAS. To test the system, the known Rinkeby test network was utilized to avoid incurring actual Gas costs. To evaluate the blockchain-based QAS performance, the current study used the average block confirmation time, while the cost was estimated using the Gas fees offered to miners, as described in the next section.  
The following code was used to develop the smart contract for signing quality reports. As previously mentioned, signing the smart contract represents official approval of the quality reports by the signer, and thus a notification, including the hash code of the report, the version number, and the owner's information and his signature, is sent to other concerned parties in the QAP to take necessary actions. The smart contract has three inputs:  
Figure 6: The sequence diagram for the program accreditation process.  
the hash code of the quality report, the version number of the document, and the wallet address of the signer. Once the contract is signed, the function that sends the notification is called immediately. The source code file for developing the smart contract can be accessed through [37].  
7.2 Methods to Evaluate the Performance and Resource Consumption Features of the Proposed Blockchain-Based QAS  
In order to evaluate the features of the proposed blockchain-based QAS, this study utilizes performance and resource consumption metrics. Performance is assessed by calculating the time delay for blockchain transactions, typically represented by the average block time. In Ethereum blockchain, the block time refers to the duration that it usually takes for miners to solve the cryptographic puzzle required to add a new block to the blockchain. In simpler terms, it is the time taken to confirm a particular blockchain transaction. The block time is a crucial factor that affects the transaction speed and, consequently, overall performance. On the other hand, the resource consumption is estimated by evaluating the Gas fees and cost for Ethereum blockchain transactions. The Gas is a measurement unit that estimates the amount of computational effort required to execute smart contracts and blockchain operations. The Gas fees are offered for miners as an incentive to process blockchain transactions. The fee is calculated via multiplying the Gas price by the Gas limit, which is the total amount of Gas that the user is willing to spend on the blockchain transaction [38].