What do crypto oracles allow you to create?

Ivan Romanovich
6 min readJan 31, 2024

--

RedsTONe Oracle partership with TON opens new possibilities

Recently, news appeared about the partnership between the Redstone oracle and the TON blockchain. The emergence of such an oracle should open up opportunities for creating new projects on TON. But what can be created using oracles?

If we discard the dross, such as guessing the price of cryptocurrencies, lotteries and other things, it turns out that the ideas do not lie on the surface. You have uploaded some external information to the network and what next? After all, for the use of oracle information, you need to pay with cryptocurrency; accordingly, any transmitted information must generate a profit, in order to align incentives.

Therefore, in this article we will look at where and why oracles are used in the blockchain.

Proof of Reserve

The volatility of cryptocurrencies leads to the need for assets with a more or less stable exchange rate. One solution to this problem is stablecoins, tokens tied to fiat currency exchange rates or commodity quotes.

The value of such a token, and therefore the link to the rate, is provided by the issuing company; the security comes from the reserves of this issuer. This is where the need to confirm reserves arises. After all, if there is a token, it can be issued by anyone who confirms that it is really backed and its rate will not collapse in a couple of weeks.

An approach to solving this problem for large stablecoins like USDC and USDT is an audit, the results of which are discussed for a very long time after being made public. For example, what is meant by corporate bonds, which make up 60% of Tether’s collateral, and what specific securities are we talking about? Or is 61% backed by “risk-free” stablecoin assets sufficient?

Oracles can partially solve this problem. Suppose token reserves are stored in a bank, then validators supporting the oracle network can collect information via the API and then transmit it to the decentralized network where the stablecoin is issued. Thus, any user can get it. It looks like this:

An event means a transaction into a smart contract to carry out some action

An important consequence of such a scheme for confirming reserves will be a mechanism for issuing new stablecoins or burning existing ones in conjunction with information about the reserve. That is, if there are not enough reserves, it will not be possible to receive new stablecoins by transacting into a stablecoin smart contract.

This is especially useful for medium-sized projects, such as cross-chain bridges, that need to issue wrapped assets — “copies” of crypto assets issued on another blockchain using the original asset as collateral. Such projects have to have reserves in several networks and transmit information about them to the network where the bridge is laid.

Of course, a bank can deceive, but nevertheless, banks are subject to different requirements for data disclosure, financial reporting, etc., than a regular legal entity. a person who can issue a token and invest money anywhere. Plus, in this scheme, the bank will be an intermediary and not an issuer of the token.

Oracle infrastructure for automating trading strategies

Many blockchain services offer trading automation, for example, automatic portfolio rebalancing or something like that. Almost all such services involve constant monitoring of prices and changes in the blockchain. This leads to certain requirements for fault tolerance and availability, making the service a mission ciritical system.

Solutions with automation in the blockchain look like something simple only at first glance

Companies creating oracle protocols, understanding this need, create solutions for automating on-chain events, thus utilizing their infrastructure. And services that use such automation allow them to save money by shifting the problems of uptime and reliability to oracles.

One of the companies that uses automation from the Chainlink oracle recorded a good video where they compare the use of various solutions for automating work with smart contracts using the example of their trading robot.

Resiliency in new approaches to lending

Typically, decentralized lending protocols suggest locking your funds in smart contracts so that other users can borrow them. In return, they receive interest income, thereby imitating the role of a bank.

High volatility can lead to the fact that after the funds are unlocked, their value will become zero. In 2023, a new approach to solving this problem appeared. Borrowers are offered to secure the loan 110% with cryptocurrency (for example, Ethereum or Solana), and in return receive a stablecoin of this credit protocol. There is also no mandatory time when you need to make a reverse exchange by repaying the loan (the protocol makes money precisely on the commission).

This scheme allows you to wait out the bear market. I won’t go into detail about how such services work; you can read how it works in this technical documentation.

The problem with all such services is the need for constant access of protocol smart contracts to the USD/cryptocurrency pair on which the protocol is issued. Almost every operation requires the current value of the pair. This is where the fault tolerance of a decentralized oracle system turns out to be extremely important.

And the profit from possible fraud of the centralized API that gives the price is very high here, which cuts off the possibility of using anything other than an oracle in such protocols. An example of such a protocol could be liquidity or hedge.

Insurance

Sometimes oracles do not bring any innovative solutions, but simply speed up current processes. When deciding on insurance payments, it is necessary to take into account a large number of parameters, some of these parameters need to be checked and clarified, which leads to long periods of consideration of insurance applications.

Some parameters can be taken from oracles, thus relying on their mechanisms for ensuring data reliability. This speeds up the processing of applications, which is critical for the logistics sector

This speeds up the review process

One of the companies using a scheme for obtaining data from oracles for decisions on insurance claims is Otonomi.ai. There is a video here where the CEO of the company talks in more detail about interaction with oracles. Their interaction scheme is the simplest — they simply take from the smart contract the data received from the oracle when making decisions on insurance payments.

Derivatives market and data relevance

In simple terms, a derivative is an agreement under which the parties receive the right or undertake to perform certain actions in relation to the underlying asset. Such tools allow you to hedge risks in both fiat solutions and cryptocurrencies.

The creation of crypto derivatives protocols is associated with a number of technical difficulties, one of which is the importance of data relevance, i.e. receiving it without serious delays (Delay allows you to make money on such derivative solutions). Since this is a rather large topic, I suggest the reader consider it separately in this article. I especially note the diagram that shows how off-chain and on-chain oracle solutions solve the problem of data relevance.

Conclusion

Of course, there are many other examples, but I tried to focus specifically on the approaches, on how this or that property/mechanics of oracles is used, be it fault tolerance or automation mechanisms for working with smart contracts.

Also, within the framework of such an introductory article, I tried to describe everything clearly and concisely, without plunging into complex nuances. And I hope the appearance of oracles on TON will lead to the emergence of new Dapps.

If you want to learn more about the TON blockchain, I have open source lessons that will teach you how to create full-fledged applications on TON.

https://github.com/romanovichim/TonFunClessons_Eng

After some time, I will try to post tutorials on how to interact with Redstone oracles through smart contracts on the TON blockchain.

I’m posting new tutorials here: https://t.me/ton_learn

--

--