Links

Summary

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 connect trusted external information through decentralized nodes. These nodes gather data from trusted sources, known as data providers, and calculate the oracle feed value using a consensus algorithm.
Figure 1 provides a visual representation of the UTXOs that a Charli3 Plutus V2 Contract holds at a specific contract address.
Charli3's Oracles leverage the Plutus V2 Validator and utilize features like Inline Datums, Reference Scripts, and Reference UTXOs introduced in the Vasil Hard Fork. Figure 1 illustrates the UTXOs created by a Charli3 Plutus V2 Contract to initiate operations.

Node operator backend

Charli3's Node Operator Backend software automates node transactions, enabling seamless updates of UTXO information and contract data through third-party services or custom data sources. The Backend efficiently communicates with the Contract's Node UTxOs, optimizing transaction processes. Developed in Python, the service leverages the Pycardano library for streamlined contract interaction.

Charli3's Network

Charli3's network consists of three components:
  • Oracle Smart Contract
  • Node Operator Backend.
  • Platform Operator Backend (oracle operator).
Figure 2: Depiction of Charli3's Network composed of Node Operators and their Interaction with the Oracle Smart Contract on the Cardano Blockchain.
Figure 3: Depiction of Charli3's Network composed of Platform Operator and its Interaction with the Oracle Smart Contract on the Cardano Blockchain.

Data consumers

Consumers can easily access the oracle feed by utilizing the read-only UTXO method to retrieve data from the Feed UTXO. Figure 4 visually depicts how a third-party contract interacts with the oracle, demonstrating the seamless flow of information retrieval.
Figure 4. Representation of a third-party contract (Swap-contract) accessing the oracle feed
In the following sections, we will delve into two Python demos that demonstrate the consumption (read-only UTxO) of C3 network feeds.
The first demo focuses on a basic example, illustrating how to access all live C3 network feeds and read the AggState configurations (How-to Guide: Feed Integration). We recommend this demo for beginners, offering a straightforward approach to reading a feed.
The second demo provides a high-level contract that showcases the utilization of a feed for facilitating asset sales from a liquidity pool to external users (Swap contract Demo ).