How Takamaka s oracle works and what their goals are


Blockchain oracles are third-party information services that provide smart contracts with data from external sources.

In fact, oracles are bridges between the blockchain and the outside world and can be anything, such as a server, or a java microservice; this structure is necessary if we want to allow the blockchain to tap into off-chain data. In fact, blockchains and smart contracts cannot access data that is outside the network (data outside the blockchain).

For many contractual arrangements in the Blockchain, it is critical to have relevant information from the outside world to execute the agreement or more simply to automate a service, such as a refund, payment, marketplace, etc.

In fact, the data transmitted by oracles come in many forms, such as information, the completion of a payment or the temperature measured by a sensor, and much more.

This is where blockchain oracles come in, as they provide a link between off-chain and on-chain data, and they are critical within the blockchain ecosystem because they expand the scope in which smart contracts can operate.

These can be classified according to a number of functional characteristics that are also very different from each other, but in principle we will deal with the two most widely used: Software and Hardware Oracles.

Types of Oracles

Software oracles interact with online sources of information and transmit it to the blockchain, the information can come from online databases, servers, websites, in essence, any data source on the Web. In fact, software oracles are connected to the Internet not only to enable them to provide information to SmartContracts but also to transmit that information in real time on the blockchain. Software oracles are the most common oracles for the Blockchain.

Information typically provided by software oracles are: exchange rates, digital asset prices, real-time flight information, and any other Web information we need.

Hardware Oracles, on the other hand, are tools created to obtain information from physical states from the real world, and then make it available real-time on the Blockchain. Such data can be transmitted by electronic sensors such as IoT, barcode/QR scanners, RFID tags, robots and other reading devices that encode information. So-called Hardware oracles, translate events from the real world into bit code that can then be read and processed by SC's, which make decisions based on these inputs.

Takamaka's oracle

Takamaka's oracle is a bidirectional tool; anyone can interact with it through a transaction to its address.

In fact, this has more than one receiving address, each capable of performing multiple functions and different tasks

Those who use it can do so by sending a Tx and a message, paying with Takamaka tokens $TKG or $TKR. The oracle performs a check on the amount sent, returning the excess or canceling the transaction if there is a flaw in the payment.

After checking whether the amount sent is correct, it returns to the blockchain the response and the data requested by the user in the transaction. So Takamaka's oracle is for all intents and purposes a tool that looks at the blockchain, checking the transactions sent to its address, and if a Tx turns out to be compliant with the requests it can handle, it will fulfill it !

If properly programmed, the oracle can perform continuous transaction and message based interactions, capable of natively handling payments as well.

If you are the owner of the oracle, you could program it to do checkout and then manage payments that occurred on a certain address and in a more complex architecture also interact with a bank's API rather than a foreign exchange service or a weather station.

In a hypothetical Marketplace solution, Takamaka's oracle works by acquiring each copy of the gadgets on display, encoding them with a specific key that will be returned to each buyer. Only those who purchased that gadget along with that Public Key will be able to open and decode its contents.

Thus, the oracle does not currently interact with a SmartContract , but performs outgoing transactions such as payments and/or signatures with cryptographic keys, receiving incoming Transactions from any source.


Oracles provide a crucial service in the modern approach to blockchain systems, not only toward smart contracts but also as independent services capable of taking decision-making power and acting to give consequential solutions to inputs received from outside.

Although oracles introduce a significant risk because of the sources, because if the sources are not trusted, the data that feed Smart Contracts and thus the results on the blockchain can be compromised, they are essential tools for connecting and facilitating the emergence of applications involving Blockchain structures and off-chain data.

So it is very important that the data source is consistent and trusted

However, not all processes are brokered by an SC; in the case of Takamaka for example, the oracle is primarily designed to automate the sale of an electronic service from a provider.

In this sense it is the blockchain that is used as a guarantor, for

- The payment by the user

- The receipt of payment by the seller

- The secure exchange of keys between the two parties

- The hashing of digital content

- Cost-effective transactions

In fact, it is a billing system that minimizes misunderstandings in the sales process, and although it does not interact with SC's, Takamaka's is for all intents and purposes an oracle, since activation and interaction go through blockchain messaging