> For the complete documentation index, see [llms.txt](https://docs.creditcoin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.creditcoin.org/attestcoin-protocol/attestcoin-readability.md).

# Attestcoin Readability

Attestcoin Protocol's readability allows Creditcoin users and contracts to read the state of any source chain. Readability relies on two key steps:

1. **Attestation** - Proactively tracking and reaching consensus on the state changes of source blockchains.
2. **Transaction Proving** - Once a user/builder has decided they want to read a piece of source chain data, the transaction containing that data must be proven. To save on-chain compute, we generate proofs off-chain then verify them on-chain. Then data from the proven transaction can be used to by smart contracts on Creditcoin.

With these two steps, Creditcoin contracts can connect to many previously isolated pools of data and liquidity.

## **Attestcoin Protocol's Readability Breakdown** <a href="#data-provisioning-flow" id="data-provisioning-flow"></a>

The diagram below depicts how the Attestcoin Protocol provides data from source *chains* to Attestcoin Smart Contracts on Creditcoin.

{% hint style="info" %}
This diagram uses some old terminology and is pending replacement. The term Creditcoin Decentralized Oracle below would now be called "Attestation chain & Block Prover Precompile"
{% endhint %}

<figure><img src="/files/eC8n9W7MvK6w6Rl19C9A" alt=""><figcaption></figcaption></figure>

The diagram above illustrates the cross-chain movement of data using Attestcoin Protocol's readability.&#x20;

### **Provisioning Steps**

* 1-2. Attestors listen for new source chain blocks, vote on attestations, and store those attestations on-chain. These are used later by the Block Prover Precompile to prove source chain transactions.&#x20;
* 3a. Meanwhile, dApp builders listen for the emission of events on the source chain which are relevant to their dApp.&#x20;
* 3b. When an event is detected, dApp builders send a request to the proof generation server asking for proofs of the transaction containing the target event.&#x20;
* 3c. The transaction and proofs are submitted to a dApp's Attestcoin Smart Contract, which forwards them to the Block Prover Precompile.&#x20;
* 4\. The Block Prover Precompile verifies merkle and continuity proofs, signaling whether or not the source chain transaction is valid&#x20;
* 5\. The dApp's Attestcoin Smart Contract decodes the verified transaction, extracting the relevant event. It then uses the event to trigger dApp logic and emit events.

## **Attestcoin Protocol's Readability Example Use Case** <a href="#creditcoin-oracle-example-use-case" id="creditcoin-oracle-example-use-case"></a>

The following diagram demonstrates use of the Attestcoin Protocol (formerly called USC) to power cross-chain loans:

<figure><img src="/files/qndwWddj1AHAKhvwyhWi" alt=""><figcaption></figcaption></figure>

Red arrows represent the attestation process. Blue arrows represent the proving process which generates proofs for queries that are then verified synchronously by the Block Prover Precompile.
