# Leveraging Blockchain Technology for Secure 5G Offloading Processes +
## 3 Blockchain-Based Secure 5G Offloading Mechanism
### Blockchain for a Secure Marketplace
#### 3.1.2 Data Models and Operations  
As already explained, the marketplace includes the logic for three different functionalities. * The Operator endpoints, which refer to the logic related to each operator identity as well as available resources. Each operator has a unique identifier \(id\), a _name_ (for identification purposes), and a _type_ that categorizes its role within the marketplace. In addition, a percentage of available resources is also included in terms of RAM, CPU, and storage. The following operations related to the operator are available as follows:
* _Create_: Registers a new operator in the system;  
Figure 4: Oracle architecture. * _Update_: Modifies an existing operator information. This must be done periodically to keep the marketplace updated;
* _Get_: Retrieves the information-related to a given operator;
* _Delete_: Removes an operator from the marketplace;
* _List_: Retrieves a list of all registered operators. * The Service endpoints, which refer to the logic related to the services offered by different operators. Each service has a unique identifier _id_, an _operator id_ (identifying the operator offering the service), the _price_, the _location_, the _uplink throughput_, _downlink throughput_, and the _status_, which refers to the availability status. In addition, the requirements in terms of RAM, CPU, and storage are also indicated. The following operations related to the operator are available as follows:
* _Create_: Registers a new service of an operator;
* _Update_: Modifies existing service-related information. This must be done periodically to keep the marketplace updated;
* _Get_: Retrieves the information related to a specific service;
* _Delete_: Removes a service from the marketplace;
* _List_: Retrieves a list of all available services. * The Consumption endpoints, which refer to the logic which allows an operator to search for additional suitable services from other registered operators and be able to proceed with an offloading process. The consumption request includes a unique identifier _id_, the identifier of the requester operator _requester id_, and a list of minimum requirements to be fulfilled by the selected service and related operator. This list is variable and refers to the information related to the operator and service data models (i.e., location should be Paris, UL throughput should be higher than 33 Mbps, etc.). There are only two related operations:
* _Search_: Initiates a new search of suitable services in the marketplace according to the defined requirements. * _Get Result_: It provides the result of the search request. It can indicate it is still an ongoing process or it can provide the selected service as a result when the process has finished. This operation has been included for developers, as the result of the search operation will be notified to the involved primary and secondary operators through Blockchain events. While the operator and service-related operations and results are clear and organic, the consumption functionality requires the following steps: 1. Initiate Consumption Request. The primary operator makes a search request in the marketplace specifying the minimum desired service requirements. 2. Service Evaluation Phase. From all registered services whose status is available, the marketplace identifies the suitable services that meet the given requirements. 3. Operator Evaluation Phase. For each of the identified services, the marketplace checks if the associated operator has the minimum required resources in terms of RAM, CPU, and storage available. 4. Service selection. From the identified services, the marketplace will choose that with the better price. 5. Completion of Consumption Process.