Cred Protocol
  • Introducing Cred Protocol
  • How does it work?
  • Score distribution
  • Chains and protocols
  • Model release notes
    • Model Context
  • FAQ
  • Use cases
    • Qualifying access to products
    • Personalizing product experiences
    • Engaging and educating users
    • Under-collateralized lending
  • Developers
    • API documentation
    • Credit Oracles
      • 📖Motivation
      • ⛓️Supported Chains
      • 🎰Oracle Architecture
      • 🏗️Requester.sol
      • 🎆Use Cases
      • 📘Medium
  • Additional
    • Careers
Powered by GitBook
On this page
  1. Developers
  2. Credit Oracles

Oracle Architecture

Overview of the information flow during an oracle request.

PreviousSupported ChainsNextRequester.sol

Last updated 2 years ago

The system of getting data on-chain requires several components to work together to achieve the result. Hence it is reasonable to break it down to pieces.

The flow of information starts at the Requester smart contract where the user initiates the on-chain credit request. There is a requestCredScore() function that will be called to initiate this request.

Chainlink Oracle has an event listener that will be triggered once the requestCredScore() function has been called and it will start to process the request.

It will contact the Alchemy API to get the wallet address of the request initatior and pass it as a parameter to our Cred API to get the Cred score for it.

After the Cred score is returned to the Chainlink Oracle, it will then parse it, encode it and send it in an on-chain transaction to the Requester smart contract where it is stored in the requestCredScore() variable. The score is then accessible to everything on-chain from that variable.

🎰
The information flow during an oracle request
The information flow during an oracle request