A reinforcement learning model for the reliability of blockchain oracles

Mona Taghavi, Jamal Bentahar, Hadi Otrok, Kaveh Bakhtiyari

Research output: Contribution to journalArticlepeer-review

8 Scopus citations


Smart contracts struggle with the major limitation of operating on data that is solely residing on the blockchain network. The need of recruiting third parties, known as oracles, to assist smart contracts has been recognized with the emergence of blockchain technology. Oracles could be deviant and commit ill-intentioned behaviors, or be selfish and hide their actual available resources to gain optimal profit. Current research proposals employ oracles as trusted entities with no robust assessment mechanism, which entails a risk of turning them into centralized points of failure. The need for an effective method to select the most economical and rewarding oracles that are self-interested and act independently is somehow neglected. Thus, this paper proposes a Bayesian Bandit Learning Oracles Reliability (BLOR) mechanism to identify trustless and cost-efficient oracles. Within BLOR, we learn the behavior of oracles by formulating a Bayesian cost-dependent reputation model and utilize reinforcement learning (knowledge gradient algorithm) to guide the learning process. BLOR enables all the blockchain validators to verify the obtained results while running the algorithm at the same time by dealing with the randomness issue within the limited blockchain structure. We implement and experiment with BLOR using Python and the Solidity language on Ethereum. BLOR is benchmarked against several models where it proved to be highly efficient in selecting the most reliable and economical oracles with a fair balance.

Original languageBritish English
Article number119160
JournalExpert Systems with Applications
StatePublished - 15 Mar 2023


  • Blockchain oracle
  • Multi-armed bandit
  • Reinforcement learning
  • Reputation model
  • Smart contract


Dive into the research topics of 'A reinforcement learning model for the reliability of blockchain oracles'. Together they form a unique fingerprint.

Cite this