Educational Byte: How to and why create your own oracle on Obyte?
2024-7-26 01:26:55 Author: hackernoon.com(查看原文) 阅读量:4 收藏

Oracles are another interesting way to customize your experience in the Obyte ecosystem. They're like bridges that connect decentralized networks to the outside world. Distributed ledgers are excellent at securely storing and verifying data, but they can't access real-world information on their own. Oracles solve this by fetching data from external sources and feeding it into their system, enabling smart contracts to interact with real-world events, prices, and information.

Oracles work by collecting data from various sources like APIs, websites, sensors, or other off-chain data providers. They upload this data to the chain and then you can find it by the address of the one who posted it (e.g., this is an Obyte oracle address, identical to any other wallet address: I2ADHGP4HL6J37NQAD73J7E5SKFIXJOT). Some oracles use a decentralized approach where multiple data sources are used to ensure accuracy and prevent manipulation. This mechanism helps ensure that the data is trustworthy and tamper-proof.

On the other hand, you can easily set up your own personal oracle (data feed) for your specific use case, or let it be created by a close party, like a member of your family or coworker. This way, the oracle can offer any personalized information you can count on to make transactions among your inner circle, or with business partners. In Obyte, it’s possible to create your own oracle in a few minutes, without coding or technical steps.

Potential Uses

The use cases for oracles are vast and varied. In finance, they can provide real-time price feeds for cryptocurrencies and traditional assets, enabling decentralized finance (DeFi) applications like lending, trading, and insurance. In supply chain management, oracles can track and verify the status of goods in transit. They can also be used in gaming to bring in real-world events to affect gameplay, or in weather forecasting to trigger payouts in weather-based insurance policies.

As for a personal oracle, the uses are only defined by yourself, because the data can only come from yourself. For instance, we can register the successful completion of a specific task by Alice (a daughter, a coworker, a partner, etc.). A conditional payment from the wallet could use this information to release funds automatically if we use that oracle address (the wallet address of the oracle operator) to create the smart contract (Chat – [Registered Contact] - Recipient’s address – Offer smart contract).

** **

Human or customized oracles could also work for rewards in family tokens. For example, parents can create an oracle that tracks if specific tasks are completed by their children. A supervisor (such as a parent) can create an oracle by sending data into the Obyte DAG, such as a task's completion status.

When a child completes a task, the supervisor updates the oracle with a value like "Yes." The family token system can then automatically trigger a reward, sending the predefined tokens from the family treasury to the child’s wallet as a reward for completing the task. The same principle could apply to anything you like to use it for.

Steps without coding

First of all, you’ll need to download and back up an Obyte wallet, available as a light app for desktop and mobile. Next, in the “Receive” section, you can click “Get Me Coins” to buy some GBYTEs, needed for transaction fees —you’ll need around $0.00001 per transaction. There are other ways to buy GBYTEs with traditional money, and you can consult them in this full guide.

Once the app is installed and with some GBYTEs available to spend, go to the “Send” section of the wallet. At the top of this page, you should see “What to send,” and a list below. From that list, instead of any asset, select “Data into datafeed (searchable).” To advance further, your account needs to be of a single address. If it’s not, then you’ll need to switch to your already created single-address account or create a new one from the main menu (Add account – Plain Account – Single Address Account). All new accounts are single-address by default.

Beyond this, you’ll only need to fill the values of your data feed (oracle) in any way you want, including a name/title, and a result/answer. For instance, the name could be “Mary’s task,” and the result could be “Done.” Press “Send,” type your password if required, and that’s it! A small transaction fee will be taken from your wallet, and the oracle will be published on the Obyte DAG, available for everyone to consult —including smart contracts.

** **

Creating your own oracle here is easy, fast, secure, and inexpensive. Now, if you know how to code and want to make it more advanced, you can always check our documentation to create an oracle from scratch.


Featured Vector Image by Freepik


文章来源: https://hackernoon.com/educational-byte-how-to-and-why-create-your-own-oracle-on-obyte?source=rss
如有侵权请联系:admin#unsafe.sh