> ## Documentation Index
> Fetch the complete documentation index at: https://blackswan-23965643.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How Loan Defaults Impact Your BlackSwan Credit Score

> A default occurs when a loan is not repaid by the deadline. Understand how defaults are recorded, how they impact your trust score, and how to recover.

A **default** occurs when a borrower fails to repay a loan by its on-chain deadline. BlackSwan records defaults permanently and they have a direct, lasting impact on a wallet's credit profile. Understanding how defaults work — and how to avoid them — is essential to maintaining a healthy Trust Ratio.

## How Defaults Are Recorded

BlackSwan enforces loan deadlines entirely on-chain. When a loan's repayment deadline passes without full repayment, the protocol automatically marks the loan as defaulted. This updates the borrower's on-chain credit record immediately:

* The wallet's `defaults` count increments by one
* The defaulted amount is excluded from `totalRepaidUsd`
* The Trust Ratio is recalculated to reflect the default

There is no grace period and no manual review — the on-chain record is updated automatically and immutably.

## Impact on Your Credit Profile

Defaulting on a loan has cascading effects on your credit standing within BlackSwan:

* **Lowers your Trust Ratio** — Your core creditworthiness score decreases, potentially significantly depending on your existing history.
* **Can lower your Trust Tier** — A drop in Trust Ratio may move you into a lower letter tier (e.g., from B to C or D), affecting how lenders perceive your risk profile.
* **Increases your APR** — A lower trust tier results in a higher borrowing cost on future loans, directly increasing the price you pay to borrow.

<Warning>
  Defaults have a significant and lasting negative impact on your Trust Ratio. Because BlackSwan's credit history is immutable and recorded on-chain, there is no way to remove or dispute a default. The only path to recovery is rebuilding your score through consistent, on-time repayments over time.
</Warning>

## Recovering from a Default

BlackSwan does not offer automatic recovery or score resets. If your wallet has defaulted, you can rebuild your Trust Ratio by:

1. **Resuming borrowing with small loans** — Smaller loans are easier to repay and each successful repayment contributes positively to your score.
2. **Repaying every loan on time** — Consistent on-time repayment gradually improves your `successfulLoans` count relative to your `defaults` count.
3. **Increasing volume over time** — As your repayment track record grows, larger successful loans contribute more meaningfully to score recovery.

Recovery takes time and there are no shortcuts. The weight of a default diminishes only as positive repayment history accumulates.

## Checking Default Count Before Lending

If you are a lender or protocol, you can query a borrower's default count before extending credit using the `getCreditHistory` method.

<CodeGroup>
  ```javascript JavaScript theme={null}
  import { BlackSwanClient } from "blackswan-sdk";

  const client = new BlackSwanClient({ apiKey: "YOUR_API_KEY" });

  const history = await client.getCreditHistory("0xBorrowerWalletAddress");

  if (history.defaults > 0) {
    console.log(`Warning: This wallet has ${history.defaults} recorded default(s).`);
  } else {
    console.log("No defaults on record. Borrower has a clean repayment history.");
  }
  ```

  ```python Python theme={null}
  from blackswan import BlackSwanClient

  client = BlackSwanClient(api_key="YOUR_API_KEY")

  history = client.get_credit_history("0xBorrowerWalletAddress")

  if history["defaults"] > 0:
      print(f"Warning: This wallet has {history['defaults']} recorded default(s).")
  else:
      print("No defaults on record. Borrower has a clean repayment history.")
  ```

  ```bash REST theme={null}
  curl -X GET "https://api.blackswan.finance/v1/history/0xBorrowerWalletAddress" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

You can also combine this with the `trustRatio` and `trustTier` from the credit score endpoint to build a comprehensive picture of borrower risk before committing funds. See [Loan History](/concepts/loan-history) for the full set of fields available.
