Infrastructure

Charli3 offers a suite of services that are integrated to provide consistent, accurate, and trustworthy information.

Cardano smart contracts as Oracles

Charli3's Oracle smart contracts connects trusted information from the external world through decentralized Charli3 nodes. The nodes periodically gather information from various trusted sources, referred to as data providers. The input from these nodes is then processed through a consensus algorithm, where the value of the feed is calculated.

Charli3's Oracles utilize the Plutus V2 Validator, taking advantage of features introduced in the Vasil Hard Fork, such as:

  • Inline Datums

  • Reference Scripts

  • and Reference UTXOs.

Figure 1 shows the UTXOs that a Charli3 Plutus V2 Contract creates to initiate operations.

*A Plutus V1 version is also available for use, which was developed prior to the Hard Fork. *

Node operator backend

Charli3's Node Operator Backend software automates transactions with Oracles. It allows node owners, who are responsible for updating UTXO information and providing contract data, to operate through third-party services. The Backend also optimizes transactions by communicating with the Contract's Node Pool. It's written in Python and uses the Pycardano library for contract interaction.

Charli3's Node Operator Backend software automates transactions with Oracles, enabling node owners to update UTXO information and provide contract data through third-party services or their data. The Backend optimizes transactions by communicating with the Contract's Node Pool and is written in Python, utilizing the Pycardano library for contract interaction.

Charli3's Network

Charli3's network consists of two components:

  • Oracle Smart Contract

  • Node Operator Backend.

The Smart Contract authorizes transactions on the Cardano blockchain using data from the Node Operator, which creates and uses UTXOs at a designated address. Refer to Figure 2.

Data consumers

Clients who consume data can access the oracle feed through two methods. The method to use depends on the version of the contract that generated the oracle. For Plutus V2, the Feed UTXO can be accessed by reading the Feed UTXO.

Figure 3 provides a high-level illustration of a third-party contract accessing information from an oracle. The dotted UTXO represents read-only use of the UTXO.

In the following section, we will review a third-party Python contract called Swap-contract, which utilizes an oracle feed to store the exchange rate of USDT and ADA. The contract facilitates the sale of assets to third-party users based on the oracle feed.

Last updated