# Introducing Cred Protocol

Cred Protocol's on a mission to bring trust and transparency to web3.

Cred Protocol's on a mission to bring trust and transparency to web3 by quantifying lending risk at scale.  We analyze on-chain and off-chain data to evaluate an account owners ability and willingness to fulfill obligations, specifically to repay loans.  &#x20;

Cred Protocol offers a suite of credit services including:

* Credit Scoring
* Credit Reporting
* Credit Monitoring
* Credit Explanation
* Accountability services

Please join the [Cred Community Discord Server](https://discord.gg/MtDHUX9mD6) where the Cred Protocol team and members of the community look forward to helping you understand and use Cred Protocol.


# How does it work?

How is the Cred Score calculated? What factors influence the score? Do some factors matter more than others?

## **Feature Selection**&#x20;

Our machine learning credit score model is comprised of a set of features that have been selected to capture the holistic view of an account's on-chain risk. When combined, they create a predictive score that quantifies the creditworthiness of an account.&#x20;

As the web3 ecosystem continues to grow and mature, we are always looking to add features that inform the model and improve the score. This process of continuous development is driven by our search for new data sources as they emerge, including new lending protocols, chains, and broader web3 projects. &#x20;

## **Credit Factors**&#x20;

We believe that central to the power of the Cred Score is ensuring that our partners, and beneficial owners of the accounts we score, understand the features that inform our model. This allows for projects to best use the score to quantify risk, and empowers individuals to take action to improve their score over time.&#x20;

Revealing the individual features that contribute to the score would potentially lead to people being able to 'game' the score, and improve their score without improving their underlying fundamental behaviours. In order to preserve the score's integrity but also provide transparency, the features are grouped into high-level 'Credit Factors'. &#x20;

A table of the Credit Factors, alongside a more detailed breakdown of each factor is listed below:

<table><thead><tr><th width="195">Credit Factors</th><th width="393.3333333333333">Description</th><th width="218.66666666666669">Impact</th></tr></thead><tbody><tr><td>Borrowing History</td><td>Features linked to historical loan repayment performance.</td><td>Most</td></tr><tr><td>Account Composition</td><td>Features linked to the asset breakdown within an account.</td><td>High</td></tr><tr><td>Account Health</td><td>Features linked to the size and volume of activity within an account.</td><td>Medium</td></tr><tr><td>Interactions</td><td>Features linked to the account's involvement in the web3 ecosystem.</td><td>Medium</td></tr><tr><td>Trust</td><td>Features linked to trust and transparency.</td><td>Low</td></tr><tr><td>New Credit</td><td>Features linked to recent and open credit history.</td><td>Low</td></tr></tbody></table>

### **Borrowing History**&#x20;

These features relate to an account's previous borrowing and repayment behaviour. These features span a variety of lending protocols and take into consideration not only successful repayments and historical liquidations, but also where relevant, other examples of 'adverse events' including previous examples of late payment and delinquency.&#x20;

Whilst liquidations are penalised, they are also taken within the context of the account's entire borrowing history, such that an account with two liquidations for every ten borrows will score more highly than an account with two liquidations for every hundred borrows.   Patterns of borrowing and liquidations are considered also, for example two liquidations followed by ten successful borrows is considered differently from ten successful borrows followed by two liquidations.

If an account has borrowed across multiple lending protocols, then the features within 'Borrowing History' capture the entire scope of lending history. If an account has had a liquidation on Aave, but multiple successful repayments on Compound then it would still be possible for the account to score well in the 'Borrowing History' factor.&#x20;

Given that these features directly correlate with likely future repayment behaviour, this Credit Factor has the highest weighting in our model. All other Credit Factors being equal, an account that has exhibited good prior repayment performance will score more highly than an account that has never borrowed before.&#x20;

### **Account Composition**&#x20;

Account Composition features relate to the assets and tokens that are held within the account, it gives valuable insights into the behaviour and risk profile of a user, and so this group of features carries a high weight in the model.

These features group tokens into categories that capture the reputation, utility, and volatility of a token and the implied risk of holding them. The 'Account Composition' factor seeks to illuminate the different risk profiles associated with how an account is curated, understanding that there is a difference between an account that holds a high number or stablecoin tokens compared to one that holds a high number of yield farming tokens.

### **Account Health**&#x20;

These features relate to the value and volume of transactions associated with an account, as well as the account's overall balance. We look at the value and volume of transactions in and out of a account to understand the frequency and scale of an account's involvement in the ecosystem.&#x20;

Whilst a high balance and a large number of transactions do not necessarily indicate strong repayment behaviour for an account with no borrowing history, all other factors being equal, an account that has a high balance and lots of transactions will score higher than an account with a low balance and fewer transactions.&#x20;

Our model applies a medium weight to this factor, acknowledging that whilst important this factor does not explicitly relate to prior lending history.

### **Interactions**&#x20;

These features are linked to an account's involvement in different type of projects within the web3 ecosystem. The Interactions Credit Factor primarily examines the NFTs within an account, gleaning insights from the type, value and number of the NFTs to understand the communities that an account is a part of, or associated with, and the risk insights that can be taken from that.&#x20;

The Interactions Credit Factor has a medium weight in our model given the prevalence of NFTs within accounts, and the strong signals that they can provide about the way that the beneficial account owner interacts with the ecosystem. &#x20;

### **Trust**&#x20;

The features within the Trust Credit Factor seek to capture the web3 reputation of the account, by assessing whether the account likely belongs to an institution, human, or bot, and whether the account has any identity attestation NFTs or has interacted with protocols that require KYC.&#x20;

Trust and transparency are crucial to creating a healthy ecosystem, and all other credit factors being equal, an account that has demonstrated a strong reputation with a human owner will score more highly than an account operated by a bot.&#x20;

However given that we acknowledge the entire range of reputation and identity within the ecosystem from pseudonymity to fully KYCd, this Credit Factor has a low weight in our model, to ensure that pseudonymous accounts with strong performance in other Credit Factors can still score well.

### **New Credit**&#x20;

This factor groups features related to the most recent lending behaviour of an account, and the trends associated with it. The 'New Credit' Credit Factor provides a window into the 'live' creditworthiness of an account, acknowledging that an account's borrowing activity can change over time either as the user's behaviour and motivations develop, or as the macro-environment within crypto changes.

Given the nascent nature of the lending ecosystem within web3, and the fact that new accounts are constantly interacting with lending protocols for the first time, this factor currently has a low weight in the model, but we anticipate this will increase over time as more data and trends become available. &#x20;


# Score distribution

Cred's score reflects an account's ability to fulfill obligations relative to the whole population of accounts.

Cred's score is informed by, and incorporates "probability of default" but it is not a direct probability.  Rather it reflects the distribution of "probaliity of default" across the population of accounts.  An Excellent Cred Score means a lower probability of loan default relative to others, whereas a Low Cred Score implies a higher probability of loan default relative to others.

| Rating    | Percentage of population | Approximate score ranges |
| --------- | ------------------------ | ------------------------ |
| Excellent | 27%                      | -1000                    |
| Very good | 20%                      |                          |
| Good      | 34%                      |                          |
| Fair      | 12%                      |                          |
| Low       | 7%                       | 300-                     |


# Chains and protocols

Cred Protocol's credit services are based on activity from various EVM-compatible chains, lending protocols, and their different versions.

## Chains supported&#x20;

* Ethereum&#x20;
* Arbitrum
* Optimism
* Polygon
* Avalanche
* Celo
* Fantom
* Binance

## Lending Protocol coverage

| Protocol     | Version | Chain     |
| ------------ | ------- | --------- |
| Compound     | 2       | Ethereum  |
| Teller       | 2       | Polygon   |
| Teller       | 2       | Ethereum  |
| Aave         | 2       | Ethereum  |
| Aave         | 2       | Ethereum  |
| Aave         | 2       | Avalanche |
| Aave         | 3       | Ethereum  |
| Aave         | 3       | Arbitrum  |
| Aave         | 3       | Avalanche |
| Aave         | 3       | Optimism  |
| Aave         | 3       | Fantom    |
| Aave         | 3       | Polygon   |
| Banker Joe   | 1       | Avalanche |
| BenQi        | 1       | Avalanche |
| D-Force      | 1       | Ethereum  |
| D-Force      | 1       | Avalanche |
| D-Force      | 1       | Binance   |
| D-Force      | 1       | Optimism  |
| D-Force      | 1       | Polygon   |
| Geist        | 1       | Fantom    |
| Iron Bank    | 1       | Ethereum  |
| Iron Bank    | 1       | Avalanche |
| Iron Bank    | 1       | Fantom    |
| Liquity      | 1       | Ethereum  |
| MakerDao     | 1       | Ethereum  |
| Radiant      | 1       | Arbitrum  |
| Radiant      | 2       | Binance   |
| Radiant      | 2       | Arbitrum  |
| Uwu          | 1       | Ethereum  |
| Venus        | 1       | Binance   |
| Vesta        | 1       | Arbitrum  |
| Morpho       | 1       | Ethereum  |
| Moola Market | 1       | Celo      |

## Chains supporting enhanced non-lending data&#x20;

* Ethereum&#x20;
* Arbitrum
* Optimism
* Polygon &#x20;
* Celo
* Base

In order to provide the most compete on-chain risk perspective available, we have an extensive backlog of integrations.  Check back regularly to see the latest integrations. &#x20;

If you'd like us to prioritize specific chains, protocols or versions, drop us a line in our [Discord Integrate channel](https://discord.gg/PSF7Tn2ZRZ) or send us an [email](mailto:product@credprotocol.com?subject=Protocol+coverage+request).


# Model release notes

Cred Protocol is continually ingesting on-chain data to train and test our credit models.  This page contains the main highlights of each model version update.

## v1.5.1

*28 Dec 2023*

The latest model has been updated to better reward accounts with stable token composition in their wallets. We have also addressed a small bug for accounts on the Celo blockchain.

## v1.5.0

*09 Sept 2023*

The Cred Score, Report and Summary API now have complete coverage of non-lending behaviour on Celo. Accounts with activity on Celo will now have this taken into account in their score and report

## v1.4.6

*30 Aug 2023*

The Cred Score now includes data from Impact Market and Good Dollar on the Celo blockchain. These universal basic income (UBI) protocols enable users to build a financial history, which can then be scored by Cred Protocol

## v1.4.5

*29 June 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Radiant V2 on Arbitrum and Binance Smart Chain

## v1.4.4

*6 June 2023*

The latest model release considers limited or no-borrowing history more conservatively resulting in declines in Cred Score for these accounts. Overall, the score is slightly more conservative for the majority of accounts.

## v.1.4.3

*24 May 2023*

We have adjusted the time-weighting of Cred Scores. This feature applies a decay factor to events based on their recency, resulting in more up-to-date scores. By reducing the weight of past events, we provide you with more relevant and contextually accurate scores.

## v1.4.2

*17 May 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Banker Joe on Avalanche

## v1.4.1

*11 May 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Geist Finance on Fantom

## v1.4.0

*9 May 2023*

We are happy to announce that the Cred Score, Report and Summary APIs are now cross-chain for all accounts with activity on Polygon! To do this, we have integrated new non-lending features on Polygon.

## v1.3.4

*13 April 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Iron Bank Protocol on Avalanche, Ethereum and Fantom

## v1.3.3

*6 April 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Iron Bank Protocol on Avalanche

## v.1.3.2

*30 March 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Venus Protocol&#x20;

## v1.3.1

*28 March 2023*

The latest model considers limited- or no- borrowing history more conservatively resulting in \~5-10 point decline in Cred Score. We have also introduced a new non-lending feature that rewards accounts with substantial cross-chain activity.

## v1.3.0

*27 March 2023*

The Cred Score, Report and Summary API now have complete coverage of non-lending behaviour on Optimism. Accounts with activity on Optimism will now have this taken into account in their score and report

## v1.2.1

*24 March 2023*

The Cred Score, Report and Summary API now have complete coverage of borrowing behaviour on Vesta Finance

## v1.2.0

*22 March 2023*

We are happy to announce that the Cred Score model is now cross-chain for all of its non-lending features. Accounts with transactions on Arbitrum will now have this activity reflected in the score.

To do this, we have integrated new non-lending features on these chains to enable a cred score for any account regardless of whether they have borrowing history or not. We will be announcing further cross-chain coverage for additional chains in the coming weeks.&#x20;

## v1.1.5

*20 March 2023*

The Cred Score model now has coverage of borrowing behaviour on Radiant v1 on Arbitrum&#x20;

## v1.1.4

*17 March 2023*

The Cred Score model has been updated to greater reward borrowers that have made multiple regular repayments on their loans. This change underlines our commitment to incentivise and reward borrowers who are active custodians of creditworthiness

## v1.1.3

*9 March 2023*&#x20;

The Cred Score model now has coverage of borrowing behaviour on Liquity&#x20;

## v1.1.2

*2 March 2023*

The Score model now has complete coverage of borrowing behaviour across all chains for Aave v3 (Arbitrum, Avalanche, Fantom, Optimism, Polygon & Ethereum)

## v1.1.1

*22 February 2023*

The Score is now informed by borrowing history on the recently launched Aave V3 on Ethereum. In addition, the score now also assesses the liquidity of tokens in a wallet.&#x20;

A more conservative approach has been taken to users with limited or no borrowing history resulting in a \~25 point decline in the Cred Score.

## v1.1.0

*14 February 2023*&#x20;

The latest upgrade to our crypto credit score model, now features support for MakerDAO protocol.&#x20;

As one of the earliest and most prominent protocols in the cryptocurrency space, we recognise its significance in shaping the industry. With this addition, our credit scoring system will ingest data from MakerDAO, Aave V2, Compound V2 and Teller V2, providing a more comprehensive score. We are excited to continue advancing our technology to better serve the crypto community.

## v1.0.6

*10 February 2023*

The latest model considers limited- or no- borrowing history more conservatively resulting in \~25 point decline in Cred Score.  Informed by transaction and borrowing activity associated with capital-efficient and under-collateralized lending, the consequence of loan "default" now has an even greater effect on creditworthiness.

## v1.0.5

*3 January 2023*

Enhanced evaluation of loan liquidations, delinquencies and defaults, resulting in lower scores for accounts associated with these events.

## v1.0.4

*16 December 2022*

Update in model parameters to slightly boost the Cred scores of those with strong lending history and significantly reduce scores of those with limited lending history and/or sequential liquidations.

Fix on errors for accounts with both Aave V2 Ethereum and Teller V2 Ethereum / Polygon history.

## v1.0.3

*2 December 2022*&#x20;

Inclusion of new features related to the quality of tokens within the wallet.

A tweak in how we assess accounts with no borrowing history. The new model places more emphasis on previous borrowing history and so those accounts without borrowing history have seen their scores fall 10-14%.

## v1.0.2

*8 November 2022*&#x20;

Significant upgrades to the universal feature set which is greatly expanded to improve wallet creditworthiness evaluation and increase accuracy. The model now takes into account attributes covering a wide variety of factors.

## v1.0.1

*9 September 2022*&#x20;

Merging of the previous multi-track model into the universal Cred Score model which retains the strong predictive power for borrowing-related outcomes but also capitalizes on the flexibility offered by the universal feature set.

## v1.0.0

*7 July 2022*&#x20;

Initial multi-track model with distinct scoring mechanisms for accounts with and without borrowing history. Accounts with no borrowing history are evaluated based on "universal features" covering on-chain activity of interest.  Accounts with borrowing history are evaluated by a model with strong predictive power for borrowing-related outcomes ([methodology and predictive proof](https://credprotocol.medium.com/cred-protocol-building-a-decentralized-credit-score-9e1bde1d2b48)).


# Model Context

Additional context on modeling considerations and trade-offs.

**Flash Loans in Cred Score version >= 1.0.4 and Cred Report version >= 2.0.0**&#x20;

*21 December 2022*

Aave V2’s Flash Loans are indexed separately from other lending protocol events to avoid an unwanted skew effect on Cred Scores for the wider lending and borrowing community. As a result, Cred Reports for accounts with Flash Loans do not reflect Flash borrowing or repayment amounts as part of their protocol summary stats.&#x20;

For those accounts, global summary values and protocol summary values may not add up to the same amounts. Any liquidations enabled by these Flash Loans are still indexed and applied normally to the Cred Score and Cred Report.


# FAQ

The answers to all your questions, at least the main ones!

If you don't seen an answer you're looking for, please ask in the [Cred Community Discord Server](https://discord.gg/MtDHUX9mD6). The Cred Protocol team and community members are ready to jump in an help.&#x20;

## How does it work?

Cred Protocol uses on-chain analytics to quantify lending risk at scale.  We correlate transaction history with the account owners ability to fulfil obligations, specifically, repay loans.&#x20;

Our machine learning credit score model is comprised of a set of features that have been selected to capture the holistic view of an account's on-chain risk. When combined, they create a predictive score that quantifies the creditworthiness of an account.&#x20;

As the web3 ecosystem continues to grow and mature, we are always looking to add features that inform the model and improve the score. This process of continuous development is driven by our search for new data sources as they emerge, including new lending protocols, chains, and broader web3 projects. &#x20;

## What factors affect my score?

Revealing the individual features that contribute to the score would potentially lead to people being able to 'game' the score, and improve their score without improving their underlying fundamental behaviours. In order to preserve the score's integrity but also provide transparency, the features are grouped into high-level 'Credit Factors'. &#x20;

A table of the Credit Factors, alongside a more detailed breakdown of each factor is listed below:

<table><thead><tr><th width="195">Credit Factors</th><th width="393.3333333333333">Description</th><th width="218.66666666666669">Impact</th></tr></thead><tbody><tr><td>Borrowing History</td><td>Features linked to historical loan repayment performance.</td><td>Most</td></tr><tr><td>Account Composition</td><td>Features linked to the asset breakdown within an account.</td><td>High</td></tr><tr><td>Account Health</td><td>Features linked to the size and volume of activity within an account.</td><td>Medium</td></tr><tr><td>Interactions</td><td>Features linked to the account's involvement in the web3 ecosystem.</td><td>Medium</td></tr><tr><td>Trust</td><td>Features linked to trust and transparency.</td><td>Low</td></tr><tr><td>New Credit</td><td>Features linked to recent and open credit history.</td><td>Low</td></tr></tbody></table>

To find out more about the credit factors, [read here](/how-does-it-work)

## How do I improve my score?

The easiest way to improve your score is to use lending protocols, take out loans and then repay them successfully, this demonstrates strong creditworthiness that will be reflected in a higher credit score.&#x20;

However there are ways to improve your credit score beyond interacting with lending protocols. The [Credit Factors](/how-does-it-work) represent groups of features that contribute to the score, improving behaviour in any of these areas would have a positive impact on your score.   &#x20;

## Why is my account unscorable?

We are able to score any account with on-chain Ethereum mainnet transactions, if your account does not have any Ethereum mainnet transactions then it will not be given a score. Once your account has transactions it will be possible to score it.&#x20;

Similarly, rather than giving a brand new account with no transactions a score of 0, we will return 'Unscorable' as there are insufficient transactions to generate a score.&#x20;

## What if I have multiple wallets?&#x20;

We are able to provide a score to a single account on the basis of its transaction history. Similarly if you have a number of accounts, we are able to amalgamate their combined transaction history to produce a single score for the entire group.&#x20;

## How do you stop someone 'gaming' the score?&#x20;

Our score is designed so that creditworthiness is informed by legitimate account activity.  We have layers of on-chain analysis, fraud mitigation techniques and a suite of [Accountability APIs](https://beta.credprotocol.com/docs/api#tag/sanction) that surface consequence for bad actors.  We don't publish exact details of our scoring algorithm to mitigate manipulation.

## How do you mitigate someone boosting their credit score by transacting with their own accounts?

Using on-chain analytics, we’re able to track transactions which pass between different accounts and back to the same account helping to mitigate “self dealing” which may inflate transaction volumes and aspects of the score. Other aspects of the score are focused on [Trust](https://docs.credprotocol.com/how-does-it-work) and evaluate multiple “proofs of humanity” ranging from verified credentials to fully KYC’d identities which make it more difficult for an account to be abandoned or transferred.

## How do you prevent someone building up a good credit score, taking out a loan and then intentionally defaulting?

The short answer, is: where appropriate we verify identit&#x79;***.***  We use proprietary on-chain analytics to mitigate fraud and partner with leading identity verification and attestation protocols to support the credit decisioning process.  In addition, we’re actively exploring privacy-preserving identity attestation approaches which combine security and pseudonymity. [Learn more](https://credprotocol.medium.com/mitigating-credit-fraud-in-the-world-of-web3-776a17be8a22).


# Qualifying access to products

Qualifying access to products is a way to ensure that eligible individuals and entities are able to access appropriate products or services. This can be done for a variety of reasons, such as to protect the interests of the provider, to ensure that the product is being used by the intended audience, or to mitigate risk.

One example of qualifying access to products is a lending pool. A lending pool may only be accessed by accounts with an “Excellent” credit score. This is because the provider of the lending pool may want to minimize the risk of default on loans, and therefore only wants to provide loans to individuals or entities that have a proven track record of responsibly managing credit.&#x20;

Another example is a yield aggregation protocol that may only offer specific pools to accounts with credit scores over 800. This is because the provider of the yield aggregation protocol may want to ensure that only the most financially stable individuals or entities are able to access the pools, which may have a higher risk.


# Personalizing product experiences

Personalizing product experiences is a way to tailor the user experience to the account owner's specific needs and preferences. By doing so, the product or service can be made more relevant and useful to the user. This can be achieved by using data and analytics to understand the account's asset level and creditworthiness and then using that information to customize the user experience.

One way to personalize product experiences is to align the user experience with a user's asset level and creditworthiness. For example, if a user has a high asset level and creditworthiness, they may be offered more complex and advanced financial products such as high risk/reward yield strategies.&#x20;

On the other hand, if a user has a low asset level and creditworthiness, they may be offered lower risk financial products such as liquid staking derivatives.&#x20;

Additionally, product capabilities may be promoted that are popular with account owners with similar levels of creditworthiness. This can help users to identify products and services that are most relevant to their needs and interests. Overall, personalizing product experiences can help to increase customer satisfaction and engagement with protocols, products and services.


# Engaging and educating users

Engaging and educating users is an important aspect of expanding access to DeFi products. By measuring and communicating on-chain financial behavior, protocols, wallets and partners can help their users to better understand the products and services they're using and how they can benefit from them - leading to increased customer satisfaction and engagement, which can ultimately result in increased revenue.

One key area of engagement and education is credit scores. As soon as people have a credit score, they often want to know how they can improve it. Users recognize that creditworthiness enables them to access financial products on beneficial terms, and they are looking for guidance on healthy behavior that can help them to improve their credit scores.&#x20;

Financial providers can engage and educate users by providing tools and resources such as educational content, credit score calculators, and personalized financial coaching. Additionally, as the web3 and DeFi space is relatively new, guidance on how to engage with these products in a healthy way is important. This can include information on how to manage risks, how to evaluate the trustworthiness of different providers, and how to stay safe and secure when using these products.&#x20;

Overall, engaging and educating users is an important aspect of expanding access to web3 services, and is essential for building trust and fostering customer loyalty.


# Under-collateralized lending

In traditional finance, consumer lending is a $4.5T market that's enabled by credit reporting bureaus and credit scoring agencies.

*In DeFi, accounts are assumed to be "unscorable" requiring lenders to over-collateralize loans, limiting access and utility.  Cred Protocol quantifies on-chain lending risk at scale by building one of the first decentralized credit scores.  We're on a mission to expand access to DeFi lending to regular people and underserved communities, helping them access financial resources that make a meaningful difference to their lives.*

“Lending” is one of the biggest applications of Decentralized Finance (DeFi) with $40B of loans being serviced by the top three lending protocols; Aave, Compound, MakerDAO (on the Ethereum blockchain).

Most DeFi lending is over-collateralized, which has the benefit of reducing systemic default risk at the expense of capital efficiency.  “Over-collateralization” isn’t suitable for consumer lending, where borrowers want leverage their good reputation to amplify their access to financial resources beyond what they currently have.

Institutional under-collateralized lending is happening today through protocols such as Maple Finance and TrueFi however loans are approved by governance token-holders so risk-underwriting  is fundamentally “human powered” and limited in scale.

Consumer lending in traditional finance is a $4.5T market, almost three times larger than the $1.5T institutional lending market, however DeFi-powered under-collateralized consumer loans aren’t happening in DeFi *yet*.  To enable consumer lending, we need to quantify risk at scale, which requires an algorithmic approach, which is a “credit score”.  That's what we're building at Cred Protocol.


# Credit Oracles

Cred Protocol provides credit oracles that enables smart contracts to incorporate credit risk into their decision processes, whether it's qualifying access to a product, personalizing the product experience or informing the terms of a loans, Cred's score can be accessed on-chain on Ethereum and Arbitrum mainnet.


# Motivation

Integrating with our Cred Score oracle on-chain allows you to provide a quantification of creditworthiness for any wallet - leveraging the machine learning models we have developed over the last year to power this score. Once integrated, the continual improvements we make to this score will automatically benefit your application without any further work required on your end.

{% content-ref url="/pages/1vaIQOM0mZsLV8PI4OHY" %}
[Use Cases](/developers/credit-oracles/use-cases)
{% endcontent-ref %}


# Supported Chains

At the moment, the Cred score can be integrated on following chains:

{% tabs %}
{% tab title="Arbitrum Goerli (Testnet)" %}
LINK contract address:

```
0xd14838A68E8AFBAdE5efb411d5871ea0011AFd28
```

Operator address:

```
0xAB8E43Bfc194cC1Fba6bABA2eB19CD5147DE9233
```

Job ID:

```
4edf5606607b4521a83ff313a09e2606
```

{% endtab %}

{% tab title="Polygon Mumbai (Testnet)" %}
LINK contract address:

```
0x326C977E6efc84E512bB9C30f76E30c160eD06FB
```

Operator address:

```
0xA010e2CD70e76F3d8Ac6159f33aA716F95435ff2
```

Job ID:

```
4edf5606607b4521a83ff313a09e2606
```

{% endtab %}
{% endtabs %}


# Oracle Architecture

Overview of the information flow during an oracle request.

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.

<figure><img src="/files/A8yfjOjWDoNVf8nxAvGR" alt="The information flow during an oracle request"><figcaption><p>The information flow during an oracle request</p></figcaption></figure>

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.


# Requester.sol

How to deploy the Requester smart contract on chosen chain to fulfill on-chain Cred score requests

(In case you are deploying on the Arbitrum Goerli) You can learn how to get LINK testnet tokens in your MetaMask in the first guide of our Cred Oracle Integration series: <https://credprotocol.medium.com/how-to-get-arbitrum-testnet-eth-and-other-tokens-in-5-minutes-28b6851cb4af>.

## Smart Contract Deployment

The Requester.sol can be deployed using the Remix IDE:

**\[WARNING: Repo requires manual change of the oracle and LINK token address for the deployment on proper chain. The comments in the contract should provide you the correct parameters]**

<https://remix.ethereum.org/#url=https://github.com/credprotocol/chainlink-request/blob/master/contracts/Requester.sol&optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js>

1. On the Compile tab, click the Compile button for `Requester.sol`. Remix automatically selects the compiler version and language from the pragma line in the smart contract unless you select a specific version manually.
2. On the Deploy and Run tab, configure the following settings:
   1. Select "Injected Provider" as your Environment. The Javascript VM environment cannot access your oracle node. **\[WARNING: Make sure your MetaMask network is the one you want to deploy your contract on & you have the parameters set for]**
   2. Select the `Requester` contract from the Contract menu.
3. Click Deploy. MetaMask prompts you to confirm the transaction.
4. After you deploy the contract, a link to Arbiscan displays at the bottom. Open that link in a new tab to keep track of the transaction.
5. If the transaction is successful, a new address displays in the Deployed Contracts section.

## Requesting Cred Score

In order to get the request fulfilled, you need to send some LINK to your smart contract. One request costs 0.1 LINK. If you try to request your Cred score and the smart contract does not have enough LINK, it will give you a `gasEstimation` error.&#x20;

In Remix, call the `requestCredScore` function and sign the transaction in your MetaMask. After you see a successful transaction message in Remix, the background process have started and you should have your score on-chain soon.

(Wait for around 30 seconds from the point when the `requestCredScore` function was successfully called - it takes some time to pass the information to the API, wait for the response and to put that response back on chain) After waiting, click on 'currentScore' and your Cred score should be visible on-chain.

If your Cred score is 0, there are several reasons that might be causing this:

* your wallet has 0 transactions, or
* your Cred score has not updated yet to the chain
* general error of our endpoint

You can check your Cred score for free at <https://app.credprotocol.com/> and that can help you double check whether the value on-chain is correct.


# Use Cases

List of potential use cases of the Cred score

* Asynchronous service that would improve your loan parameters
  * both sides - lending & borrowing
* A filtering service for responsible actors in public sales
* Analysis tools for the actors holding certain tokens or providing liquidity


# Medium

List of Medium articles by Cred Protocol

{% embed url="<https://credprotocol.medium.com/how-to-get-arbitrum-testnet-eth-and-other-tokens-in-5-minutes-28b6851cb4af>" %}

{% embed url="<https://credprotocol.medium.com/how-to-integrate-with-the-cred-score-oracle-arbitrum-goerli-da286aae26c7>" %}


