4.1 On-chain structure

OpenDeFi mainnet off-chain data. Regarding to deploying ChainToOracle-related smart contracts, the main functions include cross-chain assets, request and response, integrity verification, node registration and token mortgage, statistical monitoring, payment processing and others.

On-chain contract

The core is the ChainToOracle contract, which initiates a formatted data demand request and waits for the oracle to respond. The on-chain contract also includes cross-chain asset agency, which is carried out through the DeCredit cross-chain bridge.

Decentralized Monitoring System

DeCredit's monitoring system has achieved complete decentralization, avoiding the centralized security problems brought by the monitoring system. The monitoring system selects an integer of n/2 in a polling manner to form a temporary monitoring node, and the node saves the records of node indicators and network statistics under the chain, including:

· Basic information of nodes: total number (selected), number of node selections sorted, unprocessed nodes, node performance level

· Node weight, Node uptime, Node latency

· Node credit: Node service quality rating, including correct rate and response rate of reported results, etc.

Registration system

DeCredit needs to pledge a certain amount of token to become a legal oracle node. The lock-up period is TIME, and their deposit address and payment address are registered in the registration contract. The deposit can make the system resistant to sybil attacks and improve the security of the system. Nodes need to obtain "mining" rewards and earn handling fees in a fast and correct way to obtain centralized results, and will be fined if the response times out.

Payment system

Rewards for data requests will be sent to the current group selected to process the request and distributed to honest members. These payments will first be stored into a payment contract, where node operators can check and withdraw their earnings.

最后更新于