Skip to content

Commit

Permalink
feat: add orcle introduction docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ipromise2324 committed Jan 1, 2024
1 parent 65f12f2 commit 509e5bc
Show file tree
Hide file tree
Showing 17 changed files with 147 additions and 24 deletions.
7 changes: 7 additions & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
sidebar_position: 1
---

# Welcome to Tic Ton Docs

Ton Dynasty offers Tic Ton Oracle - a purely decentralized oracle on Ton. In this document, we will first introduce what an Oracle is. Then, we will discuss how Tic Ton utilizes Ton's features and the Game Theory mechanism to implement a unique Oracle on Ton.
7 changes: 7 additions & 0 deletions docs/oracle/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "What is Oracle?",
"position": 1,
"link": {
"type": "generated-index"
}
}
31 changes: 31 additions & 0 deletions docs/oracle/applications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
sidebar_position: 4
---
# What are the applications of Oracles?
Oracles serve as a bridge connecting the real world off-chain with DeFi projects, supply chain management, gaming, insurance, and more on the market. Here are some examples of data instances where oracles might interact with DApps:

- Data from capital markets, such as tokenized assets or stock prices.

- Geographical data for tracking progress in supply chains.

- Verification needed for insurance contracts.

- Sports outcomes for betting markets.

Additionally, oracles can be used in various other scenarios:

- Weather data for agricultural contracts or derivatives.

- Real estate prices for property-related financial instruments.

- Flight or shipping delays information for travel and logistics insurance.

- Political events or election results for prediction markets.

- Consumer price indices for adjusting the value of stablecoins or other financial instruments.

- Crowdsourced information for decentralized decision-making or governance systems.

- Personal identity verification for accessing restricted services or areas.

![Alt text](../../image/application.png)
17 changes: 17 additions & 0 deletions docs/oracle/function.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 2
---
# What can Oracle do ?
One of the primary functions of oracles is to aid in cryptocurrency investment. They track the prices of cryptocurrencies and can buy or sell them based on these fluctuations, making it easier to keep an investment portfolio up to date.

Another significant function is that oracles can integrate cryptocurrencies with the real world. For instance, suppose you and a friend are betting on an NBA basketball game through a smart contract:
```
First, both parties agree to the terms and lock the funds in the contract;
After the game, the blockchain oracle notifies the smart contract of the outcome;
Finally, the smart contract sends the funds to the winner of the bet.
```
Additionally, oracles help manage derivatives, insurance, and other risk management techniques. For example, farmers can use oracles to manage agricultural derivatives to guard against bad weather destroying their crops and ensure they receive insurance payouts during extreme climatic conditions.

![Alt text](../../image/function_oracle.png)
10 changes: 10 additions & 0 deletions docs/oracle/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
sidebar_position: 1
---

# What is Oracle ?
We recognize that the blockchain realm operates as a self-contained native network. However, if we aim to make it functional in everyday scenarios and need to import external data onto the blockchain, such as the current stock market trends, the price of a gallon of milk, or the latest sports scores, what approach should we take?

At this juncture, the blockchain domain requires a trustworthy information conduit, which is where oracles come into play. Through these oracles, a variety of DApps and smart contracts can access data outside the blockchain network, acting as a conduit between the on-chain universe and real-world dynamics.

![Alt text](../../image/oracle_intro.png)
17 changes: 17 additions & 0 deletions docs/oracle/risks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Current Challenges with Oracles
Current Challenges with Oracles
Oracles face certain issues as they are the primary source of external data for blockchains, which lack direct access to real-world information. The reliance on oracles becomes problematic if they are centralized, drawing data from a single source, and if that data is tainted, it can lead to irreversible damages. Additionally, oracles are susceptible to cyber-attacks. Summarizing, oracles must adhere to crucial criteria:

1. **Accuracy**: The data provided by the oracle must be a true reflection of the real-world scenario. This is a basic but vital requirement, not just for oracles but for any system supplying data to the blockchain, aiming to provide faultless information.

2. **Sensitivity**: Complementing accuracy, oracles must promptly react to real-world data changes. For instance, if the exchange rate of two tokens fluctuates within minutes, the oracle should promptly update its data to maintain accuracy. Essentially, the essence of accuracy is embedded in its responsiveness.

3. **Resistance to Attacks**: Given that blockchain transactions are irreversible and often involve significant assets, it's imperative that oracles are fortified against cyber threats. If compromised, the results can be catastrophic, especially on DeFi platforms that manage substantial user assets.

4. **Independent Verification**: A unique feature of decentralized oracles is their ability to allow direct data verification by any participant, contrasting with centralized systems that rely on a select group of verifiers. This direct verification feature fosters a trustless environment in decentralized oracles.

5. **Open Quotation System**: This system allows for unrestricted participation, where individuals can join or exit anytime, adding a layer of complexity due to the lack of fixed constraints.

In essence, while oracles are crucial for smart contract execution and the wider blockchain ecosystem, ensuring their security, accuracy, and robustness against manipulation and attacks is paramount. This demands a careful balance of decentralization, direct verification, and continuous monitoring to maintain the integrity and trustworthiness of the data they provide.

![Alt text](../../image/risks.png)
25 changes: 25 additions & 0 deletions docs/oracle/types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
sidebar_position: 3
---
# What are types of Oracles?
Oracles, designed to facilitate interaction between blockchains and external data, come in various forms, including but not limited to the following types:

## Hardware and Software Oracles:
Hardware oracles typically provide data occurring in the real world. For example, in supply chain management, if an object with an RFID tag arrives at a specific warehouse, that data can be sent to a smart contract for logistics tracking.

Conversely, software oracles usually offer data from digital resources like websites, servers, or databases and are currently the most potent type of oracle.

## Input and Output Oracles:
Oracles establish a bidirectional communication channel with blockchains, enabling data input and output. While output oracles can pass blockchain data to the external world, input oracles are more likely to convey off-chain or real-world data to the blockchain.

For input oracles, a common scenario might be placing a buy order if a certain asset reaches a specific price. On the other hand, output oracles are used to alert the external world about events happening on the chain.

## Centralized and Decentralized Oracles:
Centralized oracles are managed by a single entity and act as the sole data source for smart contracts. While convenient, relying on a single information source can be risky, as the contract's validity wholly depends on the entity responsible for the oracle. They are also more susceptible to malicious attacks or security vulnerabilities.

Decentralized oracles aim to resemble blockchains in that they do not rely on a single information source, making the information passed to smart contracts more reliable. Chainlink is a well-known example of a decentralized oracle project.

## Human Oracles:
Individuals with expertise in specific areas can sometimes act as oracles. They may gather information from various sources, check its legitimacy, and input it into smart contracts.

As people can use cryptography to verify their identity, the likelihood of fraudsters impersonating them and providing tampered data is low. However, this approach still carries the risks associated with centralization.
File renamed without changes.
7 changes: 7 additions & 0 deletions docs/ticton/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "Tic Ton Oracle",
"position": 1,
"link": {
"type": "generated-index"
}
}
11 changes: 6 additions & 5 deletions docs/arch.md → docs/ticton/arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
sidebar_position: 3
---
# How is the Tic Ton Oracle operated?
Welcome to the insightful exploration of the Tic Ton Oracle's operation. This section provides a comprehensive understanding of its innovative decentralized mechanism. We delve into the architecture and the step-by-step process that underlines the Oracle's functionality, offering a detailed view of its unique approach to maintaining accuracy and integrity in decentralized data verification. Let's embark on this journey to understand how the Tic Ton Oracle revolutionizes data validation and security.

## Architecture
![Alt text](../image/architecture.jpg)
![Alt text](../../image/architecture.jpg)

## In-Depth Architecture Breakdown
**You can envision the Tic Ton Oracle as the story below:**
Expand All @@ -17,17 +18,17 @@ the Watchmaker receives a reward. Timekeepers also earn rewards for correcting e
The funds for these rewards come from customers who pay to check the current time.

## Step1: Provide price by Watchmaker
![Alt text](../image/step1.png)
![Alt text](../../image/step1.png)

## Step2: Verify price by Timekeeper
![Alt text](../image/step2.png)
![Alt text](../../image/step2.png)
When the Timekeeper believes an Alarm's quote (1 TON / 2 USDT) is incorrect and the actual price should be 1 TON / 3 USDT, they can use 2 USDT to purchase the 1 TON.However, they must also provide a new, correct quote and transfer an amount double that of the exploited Alarm. If the original Watchmaker contributed 1 TON and 2 USDT, the Timekeeper must then transfer 2 TON and 6 USDT (representing 1 TON / 3 USDT) to the Oracle. The Oracle will then create an Alarm to record this quote and allow other Timekeepers to review it for arbitrage opportunities. Through this method, malicious quotes require asset commitment to the Oracle, but they also provide Timekeepers with arbitrage opportunities, each requiring a double asset deposit. As the arbitrage process repeats, the threshold for submitting malicious quotes increases.

## Step3: Protocols get price
![Alt text](../image/step3.png)
![Alt text](../../image/step3.png)
Protocols can retrieve prices from Tic Ton Oracle while paying some basic fees.

## Summary

![Alt text](../image/summary.jpg)
![Alt text](../../image/summary.jpg)

File renamed without changes.
4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { themes as prismThemes } from 'prism-react-renderer';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Tic Ton',
tagline: 'Tick Tock Tic Ton!',
tagline: 'Tick Tock! Tic Ton! Innovative price oracle for TON',
favicon: 'img/TICTON-LAST.png',

// Set the production url of your site here
Expand Down Expand Up @@ -93,7 +93,7 @@ const config = {
items: [
{
label: 'Introduction',
to: '/docs/Introduction',
to: '/docs/intro',
},
],
},
Expand Down
Binary file added image/application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/function_oracle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/oracle_intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/risks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 18 additions & 17 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,26 @@

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #1cb3c0;
--ifm-color-primary-dark: #159a9a;
--ifm-color-primary-darker: #0f8082;
--ifm-color-primary-darkest: #096668;
--ifm-color-primary-light: #2dc8ca;
--ifm-color-primary-lighter: #3ddcd5;
--ifm-color-primary-lightest: #4ee1e3;
/* Light Mode */
--ifm-color-primary: #018ed3; /* Primary color */
--ifm-color-primary-dark: #005281; /* Darker shade */
--ifm-color-primary-darker: #003c5c; /* Even darker shade */
--ifm-color-primary-darkest: #002d44; /* Darkest shade */
--ifm-color-primary-light: #33a1e0; /* Lighter tint */
--ifm-color-primary-lighter: #66b5ed; /* Even lighter tint */
--ifm-color-primary-lightest: #99c9f0; /* Lightest tint */
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
--ifm-color-primary: #27d7e8;
--ifm-color-primary-dark: #1ab2c2;
--ifm-color-primary-darker: #108a9b;
--ifm-color-primary-darkest: #0a6270;
--ifm-color-primary-light: #3edcf2;
--ifm-color-primary-lighter: #5eeffc;
--ifm-color-primary-lightest: #7ff5ff;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
/* Dark Mode */
--ifm-color-primary: #4ba9d9; /* A lighter primary color for contrast */
--ifm-color-primary-dark: #018ed3; /* Original primary as dark variant */
--ifm-color-primary-darker: #0074b7; /* Slightly darker variant */
--ifm-color-primary-darkest: #005281; /* Darkest shade from light mode */
--ifm-color-primary-light: #7bc7e4; /* Lighter tint */
--ifm-color-primary-lighter: #a8d6ef; /* Even lighter tint */
--ifm-color-primary-lightest: #d4e5f9; /* Lightest tint */
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.1);
}

0 comments on commit 509e5bc

Please sign in to comment.