# OScore

**OScore** is an on-chain credit score for programmable creditworthiness which is designed based on the Orange protocol. Its workflow illustrates how an **MP** and a **DP** work together in the Orange system.

## OScore Model

OScore can represent one's credit standing in DeFi systems. It is calculated using many different pieces of transaction data, including:&#x20;

* Payment history
* Liquidation history
* Amounts owed and repaid
* Credit mix
* Length of credit history&#x20;

It implements a customized model and quantification of on-chain behavior and interactions with existing DeFi protocols using Orange. This ensures the scoring methodology remains empirically sound and statistically valid.

## Data Synchronization

Consider the following diagram illustrating OScore's transaction data synchronization flow from **Ethereum,** which is the **DP** in this context.&#x20;

![](https://3912908296-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mg8zjiA8y_LrPWWUpa_%2F-MhBoH_3Blns_rW-KfCE%2F-MhBy8v-2OiBKdezunaC%2Farc2.png?alt=media\&token=eed19d9e-0165-4151-b704-4df95814378b)

#### Geth Node

* An Ethereum sync node

#### ETH Sync Service

* Synchronization service that listens and monitors transactions via the sync node
* Stores the relevant transaction data in a database
* Stores block data for contract executor to fetch

#### Contract Executor

* Listens to contract events via the sync node
* Logs relevant event data in a database

#### Database

* Stores transaction and event data

This data is stored in the database and fetched via an interface by the Orange system when the OScore model is invoked. Applications send invocation requests using an SDK. You can refer to the [**example here**](https://docs.orangeprotocol.io/developers/within-your-system#5-send-a-request-to-run-the-algorithm-with-selected-data)**.**
