1. Introduction
The oracle problem in blockchain represents a fundamental challenge for the effective functioning of smart contracts. These self-executing programs, defined by coded terms, depend on reliable external data to function correctly [1]. However, the integrity of these data is crucial, as any manipulation or error can lead to incorrect decisions, jeopardizing not only contract execution but also trust in the entire blockchain system. If smart contracts operate with inaccurate data, the consequences can range from significant financial losses to erroneous transactions. In this context, oracles serve as the bridge between blockchain and the external world [2].
Oracles can be classified into different categories based on their data sources and validation mechanisms. Software oracles extract data from digital sources such as APIs, for instance, obtaining cryptocurrency prices from platforms like CoinGecko or CoinMarketCap to facilitate financial contract calculations [3]. Hardware oracles gather physical data through IoT devices, such as temperature sensors in agricultural fields to trigger insurance mechanisms under extreme weather conditions. Consensus oracles, like Chainlink, aggregate data from multiple providers and validate it through distributed voting mechanisms among nodes [4].
Despite these advances, ensuring the integrity of oracle-fed data remains a critical challenge, as these systems are still susceptible to manipulation, errors, and latency issues. Existing solutions, such as decentralized oracles and consensus-based validation, have attempted to mitigate these risks, yet they remain insufficient. Decentralized oracles rely on the trustworthiness of their data sources, which can be compromised, while consensus mechanisms, though improving data validation, introduce delays and increase computational costs, making them less suitable for real-time applications [5]. These limitations indicate that, although current methodologies enhance data reliability to some extent, they do not fully resolve the oracle problem, leaving smart contracts vulnerable to incorrect or manipulated information [6].
To further improve data integrity, some approaches have explored using smart contracts to verify oracle data through predefined validation criteria. Additionally, machine learning techniques have been introduced to assess data quality dynamically, particularly in environments where high variability can compromise information integrity [7]. However, prior research lacks a structured approach to integrating machine learning with multi-source validation in a way that enhances both accuracy and computational efficiency.
This study proposes the Integrity Multi-level Weighted Voting (IMWV) model. It aims to address these gaps by implementing a hybrid validation mechanism that assigns differentiated weights to various oracle sources based on their historical reliability and consistency [8]. Unlike traditional approaches that rely on static validation rules or decentralized consensus alone, the IMWV model dynamically evaluates the integrity of incoming data using machine-learning-based classification, improving the resilience of smart contracts against erroneous or manipulated information [9].
A key motivation for this research is the increasing frequency of real-world failures caused by unreliable oracle data. High-profile incidents in decentralized finance (DeFi), such as price manipulation attacks on lending protocols and erroneous contract executions due to faulty data inputs, underscore the urgency of enhancing oracle reliability [10]. For example, flash loan attacks exploiting manipulated price feeds have led to multi-million-dollar losses, revealing the vulnerabilities in current oracle validation mechanisms. The proposed model seeks to provide a more robust and adaptive solution for securing smart contract operations [11] by addressing these challenges.
This study utilizes a dataset based on coffee futures contracts to validate the proposed approach—a financial instrument characterized by high data variability and volatility. The dataset integrates meteorological information, economic indicators (including coffee prices, exchange rates, and trade data), and additional contextual variables relevant to smart contract execution [12]. The IMWV model is developed following the CRISP-DM methodology and structured across multiple phases: business understanding, data exploration, preprocessing, modeling, evaluation, and implementation [9]. This ensures a rigorous data integrity assessment by leveraging multi-label classification techniques and ensemble learning methods [13].
Ultimately, this research advances blockchain-based data validation by introducing a structured framework that enhances the reliability of oracle-fed data in smart contracts [14]. The proposed IMWV model is expected to mitigate risks associated with erroneous or manipulated information, thereby strengthening the security and trustworthiness of blockchain applications [15].
This document is structured to enhance reader comprehension. Section 2 offers a concise literature review and outlines key concepts to frame the research topic. Section 3 details the methodologies employed to conduct the study, illustrating and analyzing the supply chain used to validate data integrity in coffee futures contracts. Additionally, it presents the design and evaluation of the IMWV proposal and the smart contract, discusses the research findings, and compares them with related studies. Finally, Section 4 summarizes the conclusions, highlighting the main findings and proposing directions for future work, ensuring a logical and coherent flow of content throughout the document.
2. Key Concepts
2.1. Data Integrity
Data integrity refers to the data’s accuracy, consistency, reliability, and completeness throughout their lifecycle. This definition is based on the following four characteristics:
Accuracy: Data must be correct and accurately represent the state of reality it describes. Any error in the data can lead to incorrect decisions and affect trust in the information.
Consistency: Information should be coherent across different databases and systems. Data should not show discrepancies when compared in other instances, ensuring a single source of truth.
Reliability: Data must be trustworthy and come from verifiable sources. It implies that they should be collected and stored to minimize the risk of unauthorized alterations.
Completeness: Data should be complete and have essential elements that could affect its use. Missing information can lead to misinterpretations and poorly founded decisions.
Data integrity is crucial for ensuring that information is valuable and trustworthy, especially in contexts where automated decisions are made or where data is essential for critical processes [16], such as databases [17], financial systems, and smart contracts in blockchain [2].
2.2. Blockchain Oracles
Blockchain oracles, illustrated in Figure 1, act as intermediaries between a blockchain and external data sources. They allow smart contracts to access real-world information. Since blockchains are inherently isolated from external data to preserve their security and decentralization, oracles provide a bridge that introduces necessary external information to execute smart contracts [18]. These oracles are not data sources but mechanisms that query, verify, and authenticate external data before transmitting it to the blockchain.
Oracles can provide various data types, such as market prices, event outcomes, weather conditions, and more, significantly expanding the range of smart contract applications. However, their use also introduces security and trust challenges, known as the “oracle problem”, which refers to the need to ensure the integrity and accuracy of the data provided in a decentralized environment [19].
2.3. Coffee Futures Contract
A futures contract is an agreement between two parties to exchange an asset on a future date at a predetermined price. It has standardized specifications such as quality, quantity, and place of delivery. These contracts, part of financial derivatives, allow for higher returns while minimizing risks. However, their complexity depends on the supply and demand of the underlying asset [20].
In Colombia, direct coffee sales were formalized in 2019 with the “Coseche y Venda a la Fija” program. This program guarantees sales without intermediaries and provides security to producers by establishing prices based on stock market quotations [21]. Figure 1 exemplifies how this method enables producers to plan and manage their production efficiently while meeting quality and capacity standards.
Colombian Arabica coffee, predominant in the country, is traded on international exchanges, such as the New York Mercantile Exchange, where prices are quoted per pound of green coffee. These contracts provide tools to manage risks and seize opportunities in a volatile environment. Producers must commit to delivering a specific amount of coffee within an agreed-upon timeframe and price to participate in these contracts, allowing them to make more strategic financial decisions in response to market fluctuations [22].
2.4. Current Knowledge Status
Interoperability between blockchains has highlighted the key role of oracles, which enable smart contracts to use external data. However, one of the biggest challenges is ensuring the integrity of the data that oracles send to contracts, as inaccurate or manipulated information can compromise their security.
This state-of-the-art review of recent works that address this issue proposes solutions such as decentralized oracles, cryptographic techniques, and data verification models to ensure the authenticity and accuracy of information. It analyzes the strengths and limitations of each approach and emphasizes areas where further progress is needed to ensure the reliability of oracles in real-world scenarios.
In 2023 [23], a novel approach was presented to address the reliability of blockchain oracles, specifically regarding the validity and accuracy of off-chain data. The work proposes a graph-based profiling method, where oracles are represented as nodes, and the accumulated data validity and accuracy discrepancies are used as edge weights in the graph. This system enables the identification of trustworthy oracles and discourages the transmission of false or inaccurate data. The method was evaluated on the Ethereum network, showing a 93% accuracy in identifying reliable data sources. Additionally, the study considers the cost of running the experiments, adding a practical aspect to the proposal. This approach significantly contributes to the field by offering a dynamic and effective solution for assessing Oracle’s reliability.
Furthermore [24], an innovative scheme called SaNkhyA is presented, which addresses the security and reliability of data in probabilistic smart contracts (PSC) within blockchain-enabled Internet of Things (IoT) environments. This approach focuses on mitigating collusion attacks among dishonest miners, who could manipulate both contract executions and the associated data, as well as forge blocks on the blockchain. SaNkhyA is implemented in three phases: the selection of trustworthy miners, the consensus to generate random bit sequences, and the use of these sequences as input oracles for the PSCs. The evaluation of the scheme through simulations demonstrates a high resistance to collusion, reaching up to 85%, and improves scalability in block processing, with an average delay of 1.3 seconds compared to the 5.6 seconds of traditional approaches. This work represents a significant contribution to the field of trust and security in IoT oracles applied to smart contracts, enhancing both the accuracy and efficiency of decentralized systems.
In the same way, in 2017 [25], one of the most widely used oracles, called Chainlink, was created. Sergey Nazarov and Steve Ellis developed this decentralized oracle system, which focuses on validating data integrity through a network of independent nodes that obtain information from multiple sources. It allows for data aggregation using consensus algorithms, minimizing the risk of errors or manipulations. Additionally, Chainlink implements incentive mechanisms that promote accuracy and penalize dishonest nodes, ensuring the quality of the information provided. Since its launch, it has established itself as the de facto standard for oracles in the blockchain ecosystem. It has been adopted in decentralized finance (DeFi), gaming, and insurance, and partnerships have been formed with significant platforms like Ethereum and Binance Smart Chain.
In addition to Chainlink, other decentralized oracles use different mechanisms to validate data integrity. Band Protocol employs a data aggregation approach where nodes collect information from multiple sources and combine it through a consensus algorithm that ensures accuracy before it is delivered to smart contracts [26]. API3 allows API providers to create oracles that directly connect their data to smart contracts, which involves a quality verification process at the provider level and community auditing methods to validate the integrity of the information [27]. Tellor utilizes a mining system where miners compete to provide data, and integrity is validated through incentivizing accuracy, as miners who submit incorrect data risk losing their rewards [28]. Nest Protocol implements an incentive mechanism that rewards validators for providing accurate real-time asset prices, and its integrity is validated through the consensus of multiple validators [29]. Finally, ChainX offers Oracle capabilities that ensure data integrity by cross-validating information across different blockchains and applying consensus methods to ensure the transferred information is accurate and reliable [30]. Each of these oracles employs various techniques and approaches to ensure that the data used in smart contracts are of high quality and trustworthiness.
After analyzing the related works, a notable diversity was observed in the approaches employed by decentralized oracles to validate data integrity. Each oracle uses unique methods that address the integrity challenge in different ways, highlighting the need for further research to integrate best practices and improve the reliability of data validation for smart contracts.
3. Methods
3.1. Understanding Data Integrity in Oracle Problem
In the business understanding phase, the main objective was to understand the issue of oracles and their impact on the operation of smart contracts in blockchain. Specifically, the goal is to develop a prototype that ensures the integrity of the data provided by the oracles, ensuring that they meet the characteristics of accuracy, completeness, reliability, and consistency. It is crucial to avoid errors in the execution of contracts, especially in volatile environments where data can change rapidly. Given the inherent volatility in this product’s buying and selling process [12], the study focuses on a particular scenario: coffee futures contracts.
3.2. Characteristics and Variables Data of Coffee Futures Contracts
In the second phase, data understanding, the objective is to understand the data sources, their quality, the variables involved, and how they feed into smart contracts. Our data scenario used coffee futures contracts, leveraging these data’s high variability and volatility [12]. Information sources include weather data, financial databases (coffee prices and exchange rates), and platforms that provide economic indicators. For this process, we defined the following steps: searching for information sources encompassing the coffee supply chain process in the practice of futures contracts, from the purchase of the contract to its delivery. After characterizing this scenario, we identified 27 variables that contribute to the design and development of data understanding, as shown in Table 1.
Once the variables were characterized by a chain phase, their values and types were established, and the next step was to evaluate them according to the data integrity characteristics [31]. This process ensured that each variable met the principles of accuracy, completeness, consistency, and reliability, which are fundamental pillars that guarantee that the data used in smart contracts are robust and suitable for proper application [32].
Accuracy was analyzed to confirm that the values of the variables accurately represented actual conditions, minimizing potential errors in the automation of decisions within the contracts [31]. Completeness was crucial, as it verified that no essential data were missing, thus preventing the absence of information from compromising the execution or analysis of the contract. We also evaluated the consistency of the data, indicating that it was coherent and not contradictory across the different phases of the chain or between information sources. Finally, reliability was reviewed, validating that the data sources were trustworthy and verified, ensuring the information was accurate and authentic [33].
Table 2 details these aspects for the key variables, providing a structured approach to addressing the challenges related to data integrity.
3.3. Data Creation and Its Sources
In the next step, various sources of information were consulted to characterize and evaluate the variables used to create the dataset. We used Yahoo Finance and Google Finance to gather the values of future contracts, while data related to coffee variables were obtained from the Colombian Coffee Federation. Additionally, datasets available on Kaggle that contained sensor values for coffee were included.
Despite efforts to compile comprehensive information, it was only possible to obtain some 27 variables directly. This limitation required simulating specific data points. Various simulation strategies were evaluated using Generative Adversarial Networks (GANs) and Long Short-Term Memory (LSTM) networks [34]. These methods were explicitly applied to the fertilizer usage variables, including Phosphorus (P), Potassium (K), Calcium (Ca), and Magnesium (Mg), which are crucial in the production phase. In Table 3, we present the parameters used to implement the neural network for simulating the missing variables.
These simulation techniques allowed for the generation of a complete dataset suitable for use in the subsequent phase of the project.
In Figure 2, it can be observed that, in the simulation conducted, GANs have a mean squared error (MSE) of 0.2920, while LSTM networks have an MSE of 0.9009. This result suggests that GANs have made better predictions compared to LSTMs. The MSE, which measures the average squared difference between the actual values and the model’s predictions, indicates that a lower MSE value reflects superior performance. In this context, GANs appear to be better suited to capture more complex patterns and generate representative samples, especially when the data exhibit high variability.
3.4. Characteristics Are Defined as Precision, Completeness, Consistency, and Reliability in the Data
In the third phase of data preparation, the collected data were thoroughly cleaned and transformed to be utilized in machine learning models, particularly an Oracle test. This Oracle primarily aims to assess data integrity, considering the context of future coffee contracts. The dataset was labeled using various functions that assign binary values (0 and 1) to evaluate different integrity characteristics to achieve this.
For example, in the evaluate precision function, a value of 1 is assigned to the column’s precision altitude and precision temperature, as well as other variables, if their values fall within the specific ranges described in Table 2. It indicates that the data are accurate; otherwise, if the data are not reliable, a value of 0 is assigned. The evaluate coherence function ensures that the relationships between the variables are logical; for instance, if drip irrigation is “No” and humidity exceeds 80%, 0 indicates a possible inconsistency in the data. Additional functions, such as completeness and reliability evaluation, help identify complete and reliable records by assigning 1 or 0 according to predefined criteria [35].
These labeling and evaluation processes are essential for identifying data that do not meet the required standards, allowing for their subsequent exclusion or marking as anomalies [35]. They are crucial for ensuring the quality and integrity of the data used in the test oracle and, consequently, for the effective operation of coffee futures contracts, as exemplified in Table 4.
Once the integrity of all variables was evaluated, it was observed that, among the four characteristics of integrity, precision had a greater weight in positive labels compared to the others (as shown in Figure 3). This is reflected in the characteristics of the labels, with 4000 labels for precision, while each of the categories of consistency, completeness, and reliability accounted for 2000 labels. The dataset consists of 20,000 records, labeled this way to detect primarily non-integral data. Despite its size, this small number of positive or accurate labels suggests that the majority percentage in the dataset is due to many outliers, negatively impacting data quality. In percentage terms, this implies that 20% of the labels correspond to precision, while each category of coherence, completeness, and reliability represents 10% of the total labels.
3.5. Selection of Methods and Evaluation Based on State-of-the-Art Metrics
In the fourth phase, modeling, machine learning algorithms were selected and applied to address the classification problem, which was considered a relevant aspect of data integrity analysis. The process began with a literature review, during which we identified the best multi-label classification algorithms to evaluate data as either integral or non-integral. In this context, we used multi-label classification algorithms to assign multiple labels that describe the data quality, considering various strategies and metrics to select the most suitable ones for the proposal [13].
Among the approaches considered, the Binary Relevance algorithm was identified, which treats each label as an independent binary classification problem; however, its limitation lies in not accounting for the interrelationships between labels. In contrast, Classifier Chains allow previous label predictions to influence subsequent ones, capturing dependencies between them more effectively [36]. The Label Powerset approach converts the multi-label problem into a multi-class classification problem, treating each unique combination of labels as a class, which can be efficient if the number of combinations is limited [14]. Although traditionally applied in multi-class classification, the One-vs-Rest method adapts to multi-label problems by training a classifier for each label [37]. Finally, the Ensemble approach (RakelD) utilizes a set of classifiers to improve overall accuracy by combining classifications from different models and leveraging the advantages of chained classifiers [38].
These algorithms were evaluated using specific metrics for multi-label classification, such as Exact Match, Precision, Recall, F1 Score, and Hamming Precision. While there are different metrics, we used the most prominent ones, the Hamming Precision and the Exact Match ratio, as they effectively represent the models’ performance in classifying data based on integrity [37].
Hamming Precision is the proportion of correct labels about the total number of labels. On the other hand, Exact Match measures the percentage of instances where all predicted labels exactly match the actual labels.
This allowed for a comprehensive evaluation of the models’ classification performance. Figure 4 exposes the evaluation results.
We used an Analysis of Variance (ANOVA) to validate the results in Figure 5. This allowed us to identify significant differences between the classification algorithms evaluated: Binary Relevance, Classifier Chains, Label Powerset, One-vs-Rest, and Ensemble (RakelD) [39]. With an F-statistic of approximately 13.22 and a p-value of 2.00404, we concluded that at least two classification methods have significantly distinct performances. The Ensemble (RakelD) approach was the best algorithm, consistently showing the highest metrics.
This approach is particularly advantageous in imbalanced datasets or those with noise. Combining multiple models enables the ensemble to capture patterns from different classes and mitigate the bias toward the majority class. Furthermore, in the presence of noise, the ensemble compensates for the errors of individual models, thereby improving the overall accuracy of the predictions.
After identifying that Ensemble Learning is the most suitable approach to address the data integrity issue, several variants of this method were evaluated, including Bagging and Boosting, through state-of-the-art algorithms. Among them, the following were considered: Bagging (RandomForest), which generates multiple versions of the classifier by averaging the results to improve accuracy; Gradient Boosting and XGBoost, both sequential boosting approaches that iteratively optimize errors; Extra Trees, a variant of RandomForest that introduces more randomization to prevent overfitting; Random Subspace, which applies Bagging to random subsets of features; and RUSBoost, designed to handle imbalanced datasets by combining undersampling and boosting. These techniques were compared regarding precision, recall, F1 score, hamming accuracy, and exact match ratio to determine the most effective data integrity detection.
After evaluating each of the proposals using different metrics see Figure 4, it was determined that following the ANOVA analysis of the classification algorithms, which included Bagging (RF), Boosting (GB), Boosting (XG), Extra Trees, Random Subspace, and RUSBoost, an F-statistic of 15.05 and a p-value of were obtained, indicating significant differences among the evaluated models. Bagging (RF) stood out as the best model, achieving an average score of 0.83, significantly surpassing the other algorithms, whose average scores ranged from 0.70 to 0.78 [39]. This superior performance suggests that Bagging (RF) can remarkably reduce variance and improve accuracy. Given the significant differences found, it is recommended to use Bagging (RF) as the preferred option for classification tasks in the context of data integrity.
Finally, the Bagging (RF) algorithm was evaluated using hard and soft voting techniques to determine which technique better supports the algorithm’s solutions. These techniques help improve the model’s accuracy and robustness by combining the predictions of multiple classifiers. Hard voting uses the most votes from the classifiers to make the final decision, selecting the class that receives the most votes, which is effective when individual classifiers have similar performance and a more stable solution is sought. On the other hand, soft voting considers the probabilities of each class predicted by the classifiers, deciding based on the sum of these probabilities. It can improve performance when some classifiers are more reliable than others.
After evaluating the models, it is established that, after implementing voting techniques in the Bagging method with Random Forest (RF), the analysis of the voting methods reveals that hard voting outperforms soft voting in terms of performance (see Figure 6), which is reflected in the evaluated metrics. ANOVA analysis allowed us to determine that the differences in the results are statistically significant, as indicated by a t-statistic of 5.97 and a p-value of 0.0019. It suggests that the hard voting method is preferable and performs better than soft voting in this context.
Identifying the characteristics that affect the quality and reliability of the data is fundamental for sound decision making. In this regard, hard voting can significantly improve the accuracy of the solutions implemented to assess data integrity [40] by demonstrating better classification performance.
3.6. A Hybrid Approach for Evaluating Data Integrity in ML Models Based on the Results of the Model Evaluation
These models are available externally and are used when the smart contract requires validating the integrity of the data. A multi-level weighted voting technique combines the predictions of multiple models and makes a final decision. To use the proposed Integrity Multi-level Weighted Voting (IMWV), the data integrity scenario initially expresses hard voting as follows:
(1)
In this equation:
-
is the final prediction;
-
represents the prediction of the model for input ;
-
is class ;
-
is the number of models considered;
-
is an indicator function that counts how many models predict class .
This model selects the class that receives the most votes among the models, allowing the smart contract to choose the best option when evaluating the integrity of the data. The process ensures that the data meet the established criteria.
The proposal for integrity validation considers four key characteristics: accuracy, reliability, completeness, and consistency. It combines the hard voting method with a weighting technique that distributes variable weights across these integrity characteristics. The proposal includes a formal mathematical approach, pseudocode, and a detailed numerical example, illustrating the implementation process in which each model contributes a specific weight to the final vote.
The proposal considers multi-label prediction models, represented as , ,…., , responsible for generating predictions for each test instance. Specific integrity metrics are calculated for each model :
-
Precision (): Evaluates the accuracy of the data provided by the oracle regarding the actual values.
-
Reliability (): Measures the oracle’s ability to maintain data consistency over time.
-
Completeness (): Assesses if the data are complete and covers all necessary aspects for the smart contract.
-
Consistency (): Measures the coherence of the provided data, both within the same source and across different sources.
Each integrity characteristic has a relevance value that reflects its relative impact on the quality of the oracle’s data. The relevance of each characteristic is calculated as the proportion of its effects within the Oracle system. It is formalized as follows:
(2)
where is the value assigned to the integrity characteristic , reflecting its impact on the quality of data.Once the relevance of each characteristic is calculated, a weight is assigned to each characteristic based on its significance. The weights are calculated by normalizing the relevance of each characteristic so that the sum of all weights equals 1:
(3)
This step ensures that the weights reflect the relative importance of each characteristic in the final voting process. For this system, the weights represent the relative importance of each integrity characteristic. In this example, the following weights are assigned, where Figure 7 shows the representation of each initial integrity characteristic in this scenario:
(4)
As data is collected and the system evolves, the weights assigned to the integrity characteristics can be adjusted dynamically. It is achieved through a learning rate η, which updates the weights based on the impact of each characteristic on decision making. The formula for dynamic updating is as follows:
(5)
where is the change in the relevance of the characteristic during iteration , calculated as:(6)
This process allows the weights to adjust continuously to better reflect the system’s current state.
In this proposal, the weights assigned to each integrity characteristic precision, reliability, completeness, and consistency reflect their relative importance in validation quality. Precision is given a higher weight (0.4) due to its critical role in the accuracy of predictions in classification systems, particularly in the validation of volatile data integrity, where errors can have financial consequences. Although precision is prioritized, the other characteristics are also integrated to ensure system stability. Additionally, the weights can be adjusted dynamically based on historical and test results, optimizing the balance in weighted voting without allowing any one characteristic to dominate excessively.
The purpose of the voting method is to combine the contributions of all integrity characteristics to determine the final class. For each class , the score is calculated as the weighted sum of the integrity characteristics:
(7)
where is the updated integrity characteristic and is the value of that characteristic for class The class with the highest score will be selected as the final prediction.The final score of each class is calculated by summing the weighted contributions of all integrity characteristics. The class with the highest score will be the final prediction:
(8)
This score reflects the total quality of the data provided by the oracle, considering all the key integrity characteristics. Selecting the class with the highest score ensures the most reliable final prediction.
Each model . The prediction value of each model is multiplied by its integrity score to obtain its weighted contribution
(9)
This step ensures that each model’s contribution is weighted according to its quality and reliability, improving the accuracy of the voting process.
Once the weighted contributions of all models are calculated, they are summed for each possible class. It generates an accumulated score for each class, as shown in the following expressions:
(10)
where 1 () is an indicator is an indicator function that takes the value 1 if matches the corresponding class (0 or 1), and 0 otherwise.The class with the highest accumulated score is selected as the final prediction:
(11)
This process ensures that the final class selected has the highest support regarding the weighted contributions from all models.
An example:
Models:
Integrity characteristics: , , .
Model predictions for a test instance (binary classification example):
Initial integrity characteristics for each model:
Relevance of each characteristic:
Step 1: Calculation of Feature Relevance
The relevance of each feature is calculated and understood as the relative impact of each integrity feature on data quality. The relevance values are normalized to ensure that the sum of the relevancies is 1.
Example of relevance calculation ( for each feature:
Step 2: Assigning Weights to Integrity Characteristics
Weights are assigned to the integrity characteristics based on the calculated relevances. The weights are the proportion of the significance of each feature to the total sum of relevance.
Step 3: In this step, the initial weights can be dynamically adjusted if any variation in model characteristics occurs, for example, if the accuracy of a model improves. After an evaluation, the characteristic values are updated.
Normalized relevance :
Adjusted weights:
Step 4: Impact of Each Feature.
Calculation of weighted contributions:
Sum of contributions:
Total weighted contributions Model 1
Sum of contributions:
Total weighted contributions Model 2 .2185 + 0.2497 + 0.1943 + 0.1875 = 0.8500
Sum of contributions:
Total weighted contributions Model
Sum of contributions:
Total weighted contributions Model 4
Step 5: Weighted Voting Method.
From step 5, the weighted contributions for each model were computed using the normalized weights of the integrity characteristics and the model predictions. These results are now applied to calculate the total weight for each predicted class (1 or 0).
Final Model Weights Based on Contributions:
Model Predictions:
Class 1: Contributions from
Models predicting 1:
-
Total Weighted Votes for Class 1
Class 0: Contributions from
Models predicting 0:
-
Total Weighted Votes for Class 0
The class with the highest cumulative weight is selected as the final prediction:
Step 6: After determining the final class through the weighted voting process, the next step is identifying the best-performing model among those predicting the final class. This is achieved by comparing their total weighted contributions.
Best model: (highest contribution: 0.8786)
In Algorithm 1, we show a smart contract based on the pseudocode, which represents the application of the coffee futures contract scenario. This contract was designed to ensure the integrity of the data related to coffee production by utilizing an oracle and a voting system based on bagging models, as described previously. We developed The CoffeeFuturesContract smart contract specifically to manage and validate these data. It allows coffee producers to request validation of the data being processed. By invoking the validateData() function, the validity of the data is verified through a multi-level weighted voting process. This voting system considers the contribution of different prediction models, weighted according to their performance in integrity characteristics such as accuracy, reliability, completeness, and consistency. In this way, the contract ensures that only validated data are used in coffee futures transactions.
Algorithm 1. Integrity Multi-level Weighted Voting (IMWV) algorithm |
# Input: |
3.7. Evaluation in a Simulated Blockchain Environment
In the final implementation phase, once the model has been trained and evaluated, Bagging with four different models, including Random Forest (RF), Extra Trees (Extremely Randomized Trees), Bagged SVM, Bagged KNN, and the proposed IMWV is implemented in a test system using Ethereum technologies, with a test network in Ganache and Truffle. The smart contract will use the model to validate data integrity in the context of futures contracts, as presented in the proposed application architecture, shown in Figure 8.
We designed a test to validate the models in a 60-day scenario where various variables will be requested twice daily, including altitude, temperature, humidity, precipitation, variety, and coffee price. These variables, which tend to show high volatility and significant changes in the initial stages of cultivation, will be sent to the smart contract through an oracle. This evaluation aims to verify the integrity of the data transmitted to the contract, ensuring its accuracy and consistency. Table 5 asses the variables.
3.8. Testing and Deployment of Smart Contract on a Test Network with the Best-Evaluated Method
The proposal’s implementation uses Ganache, a technology that provides a test blockchain to simulate a local network environment. This environment is crucial as it allows for testing and debugging smart contracts before deploying them on public networks, ensuring their functionality is appropriate and error-free. In this case, the smart contract is deployed on a test network called CONTRATOS_FUTUROS_PRUEBA, specifically designed to simulate the conditions and transactions of the coffee futures contract scenario.
Additionally, Truffle Solidity is used to program and develop the smart contract, a widely used framework in the Ethereum ecosystem. Truffle provides tools for compiling, deploying, and managing smart contracts efficiently, making integrating and managing contracts in the testing environment easier.
As for the contract design, as shown in Figure 7, it begins with a variable call through the Oracle request. This step is essential because it allows for obtaining external information (in this case, related to coffee production data) validated through the smart contract. The oracle acts as a bridge between the external world and the blockchain, ensuring that the data used in the contracts are relevant and aligned with the actual context of transactions, such as coffee production for futures contracts.
In the smart contract’s data integrity validation process, the multi-level weighted hard voting method is implemented as a key indicator to assess whether the data meet the predefined integrity criteria. Figure 8 describes the techniques and exposes the results of several models, with precisely four bagging models predefined after the tests conducted in previous sections. These models provide their respective evaluations and perform the integrity, determining whether the analyzed data meets the required quality standards. The implementation of the IMWV process ensures that most of the models support the final decision. That is, if more than half of the models conclude that the data are valid, the data are accepted by the smart contract. This approach strengthens the system’s reliability, reducing the impact of individual erroneous or biased results and enhancing the overall robustness and accuracy of the evaluation.
Two daily tests were conducted, the results of which are detailed in the corresponding table. A latency test was also performed to measure the time required to complete this evaluation. For these tests, we used an HP ENVY 17 Leap Motion SENB computer with an Intel(R) Core (TM) i7-4702MQ processor (8 CPUs) and 16 GB of RAM in a local environment set up with the Ganache test network. We present the results of the two daily data transmissions in Figure 8.
In Figure 9, the latency evaluation conducted during the data integrity validation process reveals that the time required to complete the verification is crucial for the performance of smart contracts. The data indicate that latency remains within acceptable limits despite the complexity of the IMWV process and the use of multiple bagging models, reflecting an efficient system design.
However, latency can vary depending on network load and transaction complexity, highlighting the importance of continuously monitoring and optimizing latency to ensure optimal performance. An increase in latency can cause delays in decision making and risks of inconsistencies in the data. The effectiveness of the IMWV method depends on how quickly the models cast their votes; therefore, high latency can compromise the integrity of the final decision. In this regard, continuous latency optimization is essential to maintain trust in blockchain systems and their viability in real-world applications.
On the other hand, after conducting the integrity validation following 60 tests of the data sent by the oracle, Figure 10 shows that the integrity validation, determined by the “hard voting” method, reveals a high success rate in transaction generation. Of the 60 tests, 59 resulted in successful transactions, while one test (number 11) failed to generate a transaction. This finding indicates a high success rate in the data validation system, suggesting that the verification process is generally adequate. However, the clear indication of failure in the test highlights the importance of identifying and addressing the reasons behind this error, as a single non-integral piece of data can compromise the system’s overall integrity. This result also emphasizes the need for continuous monitoring and optimization of the validation process to prevent future failures and ensure that most transactions are generated smoothly.
Finally, in Figure 11, it is observed that regarding the computational complexity of the IMWV model, the results show moderate variability in training times and consistent memory usage. As the number of oracles increases, the training times fluctuate slightly, but generally remain within a narrow range, i.e., between 0.0192 and 0.0292 seconds. This behavior suggests that the model efficiently handles the increase in the number of samples without a significant expansion in processing time. On the other hand, the memory usage remains constant at approximately 940.7 MB as the number of oracles increases, indicating that the model does not experience a noticeable increase in resource consumption with more samples. In terms of error, fluctuations in MSE are observed, with values ranging between 0.0044 and 0.0481, which could be related to the complexity of fitting the model to different data sizes.
4. Conclusions
The data integrity validation proposal based on Ensemble Learning and Multi-level weighted hard voting algorithm has proven effective in detecting and controlling non-integral data in coffee futures-oriented smart contracts. By implementing this method in a test environment with Ganache, high precision levels were observed, achieving a 98% success rate in generating validated transactions, highlighting the robustness of the approach. The combination of bagging models and hard voting allows for capturing multiple data perspectives, which contributes to greater accuracy in the classification process and reduces the risk of erroneous decisions in smart contracts.
When comparing the proposal with methods used by other decentralized oracles, such as Chainlink, Band Protocol, and Tellor, it becomes evident that each employs different techniques to ensure data integrity in the blockchain. Chainlink, for instance, uses consensus algorithms with incentives to penalize dishonesty and reward accuracy, while Band Protocol aggregates data from multiple sources, applying a consensus algorithm to ensure information quality. The proposal presented in this study stands out due to its focus on various models and Integrity Multi-level Weighted Voting (IMWV), offering a competitive advantage by improving system reliability in the face of inconsistent data compared to validation approaches that rely on a single consensus model.
Additionally, latency is a critical factor in data validation for smart contracts. This study’s latency remained within acceptable limits for most tests, reflecting efficient system design. However, latency could be impacted by network load and transaction complexity, underscoring the importance of continuously monitoring and adjusting the system to optimize performance. Since the effectiveness of the hard voting method depends on the speed with which models cast their votes, an increase in latency can compromise the integrity of the final decision, highlighting the need to manage this parameter proactively.
This proposed method provides a replicable and adaptable solution for other scenarios within the blockchain ecosystem that rely on oracles. Its modular design allows for incorporating new integrity models or metrics as needed, extending its applicability beyond futures contracts. Furthermore, this work paves the way to explore additional enhancements, such as incorporating advanced machine learning techniques to predict integrity scores and leveraging decentralized networks to mitigate reliance on single data sources. The combination of these elements could further strengthen trust in blockchain-based systems.
To conclude, as future work, it is proposed to evaluate the approach using more methods and various strategies, such as vector attacks and cybersecurity approaches. This will allow the model to be tested against potential threats and evaluate its performance in more complex scenarios, where factors such as data integrity and security are critical. Additionally, there are plans to explore defense techniques that strengthen the model’s reliability and resilience against potential vulnerabilities, ensuring its effectiveness in environments with higher security risks.
C.C.O.: Conceptualization, Data curation, Funding acquisition, Investigation, Software, Supervision, Validation, Visualization, Writing—original draft, Writing—review and editing. G.R.-G.: Conceptualization, Data curation, Formal Analysis, Funding acquisition, Investigation, Project administration, Resources, Software, Supervision, Validation, Writing—original draft, Writing—review and editing. J.C.C.: Conceptualization, Data curation, Formal Analysis, Funding acquisition, Methodology, Project administration, Resources, Software, Validation, Visualization, Writing—original draft, Writing—review and editing. All authors have read and agreed to the published version of the manuscript.
The data presented in this study are available on request from the corresponding author.
The authors are grateful to the Telematics Engineering Group (GIT) of the University of Cauca and the Sistema General de Regalías de Colombia (SGR).
The authors declare no conflict of interest.
Footnotes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Figure 1. The Figure shows the representation of a coffee futures contract, specifically for Colombian coffee. It indicates the electronic symbol KC, used on the Intercontinental Exchange (ICE) to refer to Arabica coffee futures. Additionally, it details the contract size, which corresponds to 37,500 pounds, and the type of coffee, identified as washed Arabica.
Figure 4. Evaluation results of multi-label classification algorithms for data integrity assessment.
Figure 5. Evaluation results of ensemble algorithms for data integrity assessment.
Figure 6. Performance comparison of hard and soft voting techniques in multi-label classification.
Figure 7. Initial distribution of the weights assigned in the integrity assessments.
Figure 10. Results of integrity tests in transactions generated using the proposed method.
Variables for understanding coffee futures contracts.
Variable | Type of Variable | Values | Reference Phase |
---|---|---|---|
Altitude site | Numerical variable | 1200, 1800 (meters above sea level) | Production phase |
Temperature site | Numerical variable | 20, 25, 30 (degrees Celsius) | Production phase |
Humidity site | Numerical variable | 60, 65, 70, 75 (% relative humidity) | Production phase |
Precipitation site | Numerical variable | 80, 100, 120, 150 (mm/month) | Production phase |
Variety | Categorical variable | Arabica, Robusta | Production phase |
Phosphorus (P) | Numerical variable | 20, 30, 40, 50 (mg/kg soil) | Production phase |
Potassium (K) | Numerical variable | 150, 200, 250 (mg/kg soil) | Production phase |
Calcium (Ca) | Numerical variable | 2, 3, 4 (mg/kg soil) | Production phase |
Magnesium (Mg) | Numerical variable | 1, 1.5, 2 (mg/kg soil) | Production phase |
Drip irrigation | Categorical variable | Yes, No | Production phase |
Pest control | Categorical variable | Yes, No | Production phase |
Nitrogen (N) | Numerical variable | 40, 50, 60 (mg/kg soil) | Production phase |
Phosphorus (P) (fertilizer usage) | Numerical variable | 30, 40, 50 (kg/ha) | Production phase |
Potassium (K) (fertilizer usage) | Numerical variable | 200, 220, 240 (kg/ha) | Production phase |
Calcium (Ca) (fertilizer usage) | Numerical variable | 2, 3, 3.5 (kg/ha) | Production phase |
Magnesium (Mg) (fertilizer usage) | Numerical variable | 1, 1.5, 2 (kg/ha) | Production phase |
Pulping | Categorical variable | Mechanical, Manual | Post-harvest phase |
Fermentation | Numerical variable | 24, 36, 48 (hours) | Post-harvest phase |
Washing and drying | Categorical variable | Washed, Natural | Post-harvest phase |
Roasting | Categorical variable | Light, Medium, Dark | Processing phase |
Cup Score | Numerical variable | 80, 85, 90, 95 (points) | Marketing phase |
Coffee Load Price | Numerical variable | 3000, 3500, 4000 (COP per load) | Marketing phase |
Price USD to COP | Numerical variable | 3500, 3550, 3600 (COP per USD) | Marketing phase |
Contract type | Categorical variable | Direct sale, Export, Cooperative | Marketing phase |
Packaging | Categorical variable | Vacuum, Paper bags, Glass | Marketing phase |
Storage | Numerical variable | 15, 20, 25 (degrees Celsius) | Transformation phase |
Distribution | Categorical variable | Direct sale, Export, Cooperative | Marketing phase |
Data integrity characteristics for selected coffee cultivation variables.
Variable | Precision | Completeness | Consistency | Reliability |
---|---|---|---|---|
Temperature | Integral: 20, 25, 30 | Integral: | Integral: Same value across all records | Integral: |
Humidity | Integral: 60, 65, 70, 75 | Integral: | Integral: Same values across all documents | Integral: Measured |
Precipitation | Integral: | Integral: | Integral: Same | Integral: Data from |
Cup Score | Integral: | Integral: | Integral: Same | Integral: |
Price per Load | Integral: | Integral: Recorded for each batch; | Integral: Consistent | Integral: Based on |
Data integrity labeling for coffee cultivation variables.
Parameter | Description | Value/Configuration |
---|---|---|
Algorithm | Type of neural network used for simulation | GANs + LSTM |
Phosphorus (P) | Simulated fertilizer usage (kg/ha) | 30, 40, 50 |
Potassium (K) | Simulated fertilizer usage (kg/ha) | 200, 220, 240 |
Calcium (Ca) | Simulated fertilizer usage (kg/ha) | 2, 3, 3.5 |
Magnesium (Mg) | Simulated fertilizer usage within an appropriate range | To define |
GAN Loss Function | Measures the difference between real and generated data | Binary Cross-Entropy |
GAN Optimizer | Optimizes the loss function | Adam (lr = 0.0002, β1 = 0.5) |
Latent Space (GAN) | The dimensionality of the latent space for the generator input | 100 |
LSTM Units | Number of neurons per LSTM layer | 50–100 |
LSTM Regularization | Prevents overfitting in LSTM | Dropout 0.2–0.3 |
Epochs | Number of iterations over the training data | 1000 (adjustable based on model performance) |
Data integrity labeling for coffee crop variables in a binary manner complying with integrity and non-integrity.
Site | Site | Site | Variety | Precision | Precision | Consistency Irrigation | Consistency Variety | Completeness | Reliability |
---|---|---|---|---|---|---|---|---|---|
1424.72 | 19.57 | 73.58 | Bourbon | 1 | 1 | 1 | 1 | 1 | 1 |
1770.43 | 19.48 | 77.08 | Bourbon | 1 | 1 | 1 | 1 | 1 | 1 |
1639.20 | 23.44 | 76.40 | Bourbon | 1 | 1 | 0 | 1 | 1 | 1 |
1559.20 | 19.50 | 67.31 | Typica | 1 | 1 | 0 | 1 | 0 | 1 |
1293.61 | 19.63 | 67.24 | Caturra | 1 | 1 | 0 | 0 | 1 | 1 |
Key variables for daily smart contract data requests.
Variable | Description | Frequency | Data Type |
---|---|---|---|
Altitude | Altitude of the cultivation region (in meters) | Twice a day | Numeric |
Temperature | Current temperature in the cultivation region | Twice a day | Numeric (°C) |
Humidity | Relative humidity in the region | Twice a day | Numeric (%) |
Precipitation | Level of precipitation (in mm) | Twice a day | Numeric |
Variety | Variety of coffee being cultivated | Static (once) | Text |
Coffee Price | Market price of coffee | Twice a day | Numeric (COP) |
References
1. Caldarelli, G. Before Ethereum. The Origin and Evolution of Blockchain Oracles. IEEE Access; 2023; 11, pp. 50899-50917. [DOI: https://dx.doi.org/10.1109/ACCESS.2023.3279106]
2. Wang, H.; Zhang, J. Blockchain Based Data Integrity Verification for Large-Scale IoT Data. IEEE Access; 2019; 7, pp. 164996-165006. [DOI: https://dx.doi.org/10.1109/ACCESS.2019.2952635]
3. Al-Breiki, H.; Rehman, M.H.U.; Salah, K.; Svetinovic, D. Trustworthy Blockchain Oracles: Review, Comparison, and Open Research Challenges. IEEE Access; 2020; 8, pp. 85675-85685. [DOI: https://dx.doi.org/10.1109/ACCESS.2020.2992698]
4. Breidenbach, L.; Cachin, C.; Chan, B.; Coventry, A.; Ellis, S.; Juels, A.; Koushanfar, F.; Miller, A.; Magauran, B.; Moroz, D. et al. Chainlink 2.0: Next Steps in the Evolution of Decentralized Oracle Networks. Withepaper 2021, pp. 1–136. Available online: https://research.chain.link/whitepaper-v2.pdf (accessed on 1 January 2021).
5. Zhao, Y.; Kang, X.; Li, T.; Chu, C.K.; Wang, H. Toward Trustworthy DeFi Oracles: Past, Present, and Future. IEEE Access; 2022; 10, pp. 60914-60928. [DOI: https://dx.doi.org/10.1109/ACCESS.2022.3179374]
6. Sata, B.; Berlanga, A.; Chanel, C.P.C.; Lacan, J. Connecting AI-based Oracles to Blockchains via an Auditable Auction Protocol. Proceedings of the 2021 3rd Conference on Blockchain Research & Applications for Innovative Networks and Services (BRAINS); Paris, France, 27–30 September 2021; pp. 23-24. [DOI: https://dx.doi.org/10.1109/BRAINS52497.2021.9569808]
7. Papadouli, V.; Papakonstantinou, V. A preliminary study on artificial intelligence oracles and smart contracts: A legal approach to the interaction of two novel technological breakthroughs. Comput. Law Secur. Rev.; 2023; 51, 10586. [DOI: https://dx.doi.org/10.1016/j.clsr.2023.105869]
8. Wang, Y.; Liu, H.; Wang, J.; Wang, S. Efficient data interaction of blockchain smart contract with oracle mechanism. Proceedings of the 2020 IEEE 9th Joint International Information Technology and Artificial Intelligence Conference (ITAIC); Chongqing, China, 11–13 December 2020; Volume 2020, pp. 1000-1003. [DOI: https://dx.doi.org/10.1109/ITAIC49862.2020.9338784]
9. Farao, A.; Paparis, G.; Panda, S.; Panaousis, E.; Zarras, A.; Xenakis, C. INCHAIN: A cyber insurance architecture with smart contracts and self-sovereign identity on top of blockchain. Int. J. Inf. Secur.; 2024; 23, pp. 347-371. [DOI: https://dx.doi.org/10.1007/s10207-023-00741-8]
10. van der Voort, H.; van Bulderen, S.; Cunningham, S.; Janssen, M. Data science as knowledge creation a framework for synergies between data analysts and domain professionals. Technol. Forecast. Soc. Change; 2021; 173, 121160. [DOI: https://dx.doi.org/10.1016/j.techfore.2021.121160]
11. Lou, J.; Lu, W. Construction information authentication and integrity using blockchain-oriented watermarking techniques. Autom. Constr.; 2022; 143, 104570. [DOI: https://dx.doi.org/10.1016/j.autcon.2022.104570]
12. Ordoñez, C.C.; Organero, M.M.; Ramirez-Gonzalez, G.; Corrales, J.C. Smart Contracts as a Tool to Support the Challenges of Buying and Selling Coffee Futures Contracts in Colombia. Agriculture; 2024; 14, 845. [DOI: https://dx.doi.org/10.3390/agriculture14060845]
13. Tarekegn, A.N.; Giacobini, M.; Michalak, K. A review of methods for imbalanced multi-label classification. Pattern Recognit.; 2021; 118, 107965. [DOI: https://dx.doi.org/10.1016/j.patcog.2021.107965]
14. Bogatinovski, J.; Todorovski, L.; Džeroski, S.; Kocev, D. Comprehensive comparative study of multi-label classification methods. Expert Syst. Appl.; 2022; 203, 117215. [DOI: https://dx.doi.org/10.1016/j.eswa.2022.117215]
15. Wang, H.; Liu, Y.; Li, Y.; Lin, S.-W.; Artho, C.; Ma, L.; Liu, Y. Oracle-Supported Dynamic Exploit Generation for Smart Contracts. IEEE Trans. Dependable Secur. Comput.; 2022; 19, pp. 1795-1809. [DOI: https://dx.doi.org/10.1109/TDSC.2020.3037332]
16. Zhang, Y.; Bao, Z.; Wang, Q.; Lu, N.; Shi, W.; Chen, B. OWL: A data sharing scheme with controllable anonymity and integrity for group users. Comput. Commun.; 2023; 209, pp. 455-468. [DOI: https://dx.doi.org/10.1016/j.comcom.2023.07.022]
17. Begg, T.C.-C. Database Systems A Practical Approach to Design, Implementation, and Management; 6th ed. Always Learning Pearson: Boston, MA, USA, 2015.
18. Ezzat, S.K.; Saleh, Y.N.M.; Abdel-Hamid, A.A. Blockchain Oracles: State-of-the-Art and Research Directions. IEEE Access; 2022; 10, pp. 67551-67572. [DOI: https://dx.doi.org/10.1109/ACCESS.2022.3184726]
19. Heiss, J.; Eberhardt, J.; Tai, S. From oracles to trustworthy data on-chaining systems. Proceedings of the 2019 2nd IEEE International Conference on Blockchain (Blockchain); Atlanta, GA, USA, 14–17 July 2019; pp. 496-503. [DOI: https://dx.doi.org/10.1109/Blockchain.2019.00075]
20. Nhung, N.T.; Ngan, N.N.; Hong, T.T.; Cuong, N.D. Hedging with commodity futures: Evidence from the coffee market in Vietnam. Invest. Manag. Financ. Innov.; 2020; 17, pp. 61-75. [DOI: https://dx.doi.org/10.21511/imfi.17(4).2020.06]
21. Min Agricultura, Agricultura por Contrato. Coseche y Venda a la Fija. 2019; Available online: https://www.minagricultura.gov.co/Paginas/Coseche-venda-a-la-fija.aspx (accessed on 1 May 2019).
22. Tröster, B.; Gunter, U. The Financialization of Coffee, Cocoa and Cotton Value Chains: The Role of Physical Actors. Dev. Change; 2023; 54, pp. 1550-1574. [DOI: https://dx.doi.org/10.1111/dech.12802]
23. Almi’ani, K.; Lee, Y.C.; Alrawashdeh, T.; Pasdar, A. Graph-Based Profiling of Blockchain Oracles. IEEE Access; 2023; 11, pp. 24995-25007. [DOI: https://dx.doi.org/10.1109/ACCESS.2023.3254535]
24. Patel, N.S.; Bhattacharya, P.; Patel, S.B.; Tanwar, S.; Kumar, N.; Song, H. Blockchain-Envisioned Trusted Random Oracles for IoT-Enabled Probabilistic Smart Contracts. IEEE Internet Things J.; 2021; 8, pp. 14797-14809. [DOI: https://dx.doi.org/10.1109/JIOT.2021.3072293]
25. Ellis, S.; Juels, A.; Nazarov, S. ChainLink: A Decentralized Oracle Network. 2017; Available online: https://link.smartcontract.com/whitepaper (accessed on 1 May 2017).
26. Srinawakoon, S. Decentralized Data Curation Protocol. Bandprotocol. 2018; Available online: https://www.bandprotocol.com/ (accessed on 1 May 2018).
27. Apis, D.; Benligiray, B. Decentralized APIs for Web 3.0. api3.org. 2018; Available online: https://api3.org/ (accessed on 1 July 2018).
28. Oracle, T. The Oracle TELLOR. Tellor.io. 2023; Available online: https://tellor.io/whitepaper/ (accessed on 1 July 2023).
29. NEST: Decentralized Martingale Network B the Accuracy of the NEST Price. nestprotocol.org. 2023; Available online: https://www.nestprotocol.org/doc/ennestwhitepaper.pdf (accessed on 1 July 2023).
30. Chainx. Chainx Whitepaper. chainx.org. 2019; Available online: https://chainx.org/ (accessed on 1 July 2019).
31. Gazzola, P.; Pavione, E.; Barge, A.; Fassio, F. Using the Transparency of Supply Chain Powered by Blockchain to Improve Sustainability Relationships with Stakeholders in the Food Sector: The Case Study of Lavazza. Sustainability; 2023; 15, 7884. [DOI: https://dx.doi.org/10.3390/su15107884]
32. Ordoñez, C.C.; Gonzales, G.R.; Corrales, J.C. Blockchain and agricultural sustainability in South America: A systematic review. Front. Sustain. Food Syst.; 2024; 8, 1347116. [DOI: https://dx.doi.org/10.3389/fsufs.2024.1347116]
33. Bager, S.L.; Lambin, E.F. Sustainability strategies by companies in the global coffee sector. Bus. Strateg. Environ.; 2020; 29, pp. 3555-3570. [DOI: https://dx.doi.org/10.1002/bse.2596]
34. Navidan, H.; Moshiri, P.F.; Nabati, M.; Shahbazian, R.; Ghorashi, S.A.; Shah-Mansouri, V.; Windridge, D. Generative Adversarial Networks (GANs) in networking: A comprehensive survey & evaluation. Comput. Netw.; 2021; 194, 108149. [DOI: https://dx.doi.org/10.1016/j.comnet.2021.108149]
35. Rivolli, A.; Read, J.; Soares, C.; Pfahringer, B.; de Carvalho, A.C.P.L.F. An empirical analysis of binary transformation strategies and base algorithms for multi-label learning. Mach. Learn.; 2020; 109, pp. 1509-1563. [DOI: https://dx.doi.org/10.1007/s10994-020-05879-3]
36. Sangkatip, W.; Chomphuwiset, P.; Bunluewong, K.; Mekruksavanich, S.; Okafor, E.; Surinta, O. Improving Neural Network-Based Multi-Label Classification With Pattern Loss Penalties. IEEE Access; 2024; 12, pp. 52237-52248. [DOI: https://dx.doi.org/10.1109/ACCESS.2024.3386841]
37. García-Pedrajas, N.E.; Cuevas-Muñoz, J.M.; Cerruela-García, G.; de Haro-García, A. A thorough experimental comparison of multi-label methods for classification performance. Pattern Recognit.; 2024; 151, 110342. [DOI: https://dx.doi.org/10.1016/j.patcog.2024.110342]
38. Zhou, Z.-H. Ensemble Learning BT—Encyclopedia of Biometrics; Li, S.Z.; Jain, A. Springer: Boston, MA, USA, 2009; pp. 270-273.
39. Wold, S. Analysis of variance (ANOVA). Chemom. Intell. Lab. Syst.; 1989; 6, pp. 259-272. [DOI: https://dx.doi.org/10.1016/0169-7439(89)80095-4]
40. Peppes, N.; Daskalakis, E.; Alexakis, T.; Adamopoulou, E.; Demestichas, K. Performance of Machine Learning-Based Multi-Model Voting Ensemble Methods for Network Threat Detection in Agriculture 4.0. Sensors; 2021; 21, 7475. [DOI: https://dx.doi.org/10.3390/s21227475] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/34833551]
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The oracle problem in blockchain refers to the critical need to obtain reliable external data for the correct execution of smart contracts. Dependence on these external sources involves risks of manipulation and inaccuracies that can compromise automated decisions on the blockchain. Although solutions such as decentralized oracles and consensus mechanisms have been developed, ensuring data integrity remains a significant challenge. A validation approach based on Integrity Multi-level Weighted Voting (IMWV) is proposed to address this need. This model employs a multi-level weighted voting scheme, assigning differentiated weights to Oracle data sources and their derived decisions. It optimizes the accuracy of validated information and reduces variability in volatile environments, such as coffee futures contracts in Colombia. After conducting 60 tests, the system achieved 59 successful transactions, confirming the effectiveness of the validation process. A single failure highlighted the importance of continuous monitoring to identify and correct errors, thus protecting the system’s integrity. This IMWV-based proposal represents a significant contribution by increasing the reliability of smart contracts, offering an adaptable approach to address the oracle problem in blockchain, and laying the groundwork for future research.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer