> For the complete documentation index, see [llms.txt](https://docs.bima.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bima.money/bima-credit-score-bcs.md).

# BIMA Credit Score (BCS)

The BIMA Credit Score (BCS) is a proprietary algorithm designed to assess the risk level of a Bitcoin address based on its on-chain activity. This scoring system is integrated into [**Bima Occam**](https://occam.bima.money/) to provide Occam users on the BIMA platform with comprehensive risk assessment capabilities.

The score ranges from 0 to 100, where a higher score indicates lower risk. The calculation involves fetching data from multiple Bitcoin blockchain APIs (Blockstream, Mempool, BlockCypher, Blockchain.info) and combining various metrics.

### **1. Data Points Collected**

The algorithm primarily relies on the following data points for a given Bitcoin address:

* **Transaction Count (`txCount`):** Total number of transactions associated with the address.
* **Total Received BTC (`totalReceivedBtc`):** The cumulative amount of Bitcoin received by the address.
* **Total Sent BTC (`totalSentBtc`):** The cumulative amount of Bitcoin sent from the address.
* **UTXO Balance BTC (`utxoBalanceBtc`):** The current unspent transaction output balance of the address.
* **Address Age (`addressAgeDays`):** The number of days since the address first appeared on the blockchain.
* **Recent Transaction Activity:** Whether the address has had a transaction within the last 30 days.

### **2. Scoring Logic**

The Bima Credit Score is calculated by assigning points based on these metrics. The specific weighting and contribution of each factor are as follows:

* **Transaction Count:** Each transaction contributes `2` points to the score.
  * `score += txCount * 2`
* **Total Received BTC:** Contributes up to `50` points. The contribution is capped to prevent excessively large transactions from skewing the score.
  * `score += Math.min(totalReceivedBtc * 0.5, 50)`
* **UTXO Balance BTC:** Contributes up to `30` points. This reflects the current holdings of the address.
  * `score += Math.min(utxoBalanceBtc * 1, 30)`
* **Address Age:** Older addresses are generally considered more established and less risky.
  * If `addressAgeDays` > 365 days: `+20` points
  * If `addressAgeDays` > 180 days: `+10` points
  * `if (addressAgeDays > 365) score += 20; else if (addressAgeDays > 180) score += 10;`
* **Recent Transaction Activity:** Addresses with recent activity are often seen as active and potentially more legitimate.
  * If a transaction occurred within the last 30 days: `+15` points
  * `if (recentTxTime && now - recentTxTime < 60 * 60 * 24 * 30) score += 15;`

The final score is then clamped between 0 and 100:

`score = Math.min(Math.max(score, 0), 100)`

### **3. Risk Level Assignment**

Based on the calculated Bima Credit Score, a risk level is assigned for Occam users:

* **Low Risk:** Score between 70 and 100.
  * Indicates high creditworthiness with minimal default risk, suitable for standard transactions.
* **Medium Risk:** Score between 40 and 69.
  * Indicates a moderate risk profile requiring standard monitoring and due diligence.
* **High Risk:** Score between 0 and 39.
  * Indicates an elevated default risk requiring enhanced due diligence and careful consideration.

***

*The BIMA Credit Score is currently implemented in BIMA Occam to help users make informed decisions when interacting with Bitcoin addresses on the platform.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bima.money/bima-credit-score-bcs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
