> For the complete documentation index, see [llms.txt](https://lucia-protocol.gitbook.io/lucia-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lucia-protocol.gitbook.io/lucia-protocol/system-functionality/borrower-operations.md).

# Borrower Operations

The Barn architecture within the Lucia Protocol permits users to access liquidity in a fully decentralized, permissionless environment through the establishment of individual collateral accounts, known as Sheds. Upon depositing collateral into a designated Shed, the assets are securely encased within the overarching Barn system, thus authorizing the user to draw liquidity in the form of LUCI stablecoins up to 100% of the asset's existing dollar valuation.

**Collateral Management: Shed Initialization and Asset Locking**

Upon depositing collateral into a designated Shed, users are empowered to draw liquidity through the Lucia Protocol's native stablecoin, LUCI, up to a ceiling defined by the existing dollar valuation of the collateral assets. The maximum liquidity draw is governed by the formula:

<figure><img src="/files/PWCWJknDhVi8TLEbBEDC" alt=""><figcaption></figcaption></figure>

**Minimum Collateralization Ratio (MCR)**

Each Shed is subject to a Minimum Collateralization Ratio (MCR) that varies in relation to the user's credit risk score. The MCR is an important constraint and is expressed as:

<figure><img src="/files/jSeVU7Oi9JwEYKHKwcXG" alt=""><figcaption></figcaption></figure>

Essentially, each Shed must adhere to a Minimum Collateralization Ratio (MCR), calibrated in accordance with the user's associated credit risk score. This ratio serves as an equation between the collateral's current dollar value and the amount of liquidity withdrawn in LUCI stablecoins.

Borrowers retain the flexibility to either pay down or augment their liquidity within the constraints of the established MCR. The protocol additionally enables users to improve their borrowing capacity as they cultivate a positive repayment history, thereby elevating their credit score. Users can equally recover their collateral within the same MCR limits, conferring upon them complete asset management autonomy.

**Borrower Flexibility and Credit Score Improvement**

Borrowers can choose to either repay their loans or expand their liquidity, provided these actions are within the confines of the predetermined MCR. The system also supports the enhancement of borrowing capacity as a function of positive repayment history, which subsequently elevates the user's credit score.

**Replenishment and Minimum Debt Thresholds**

Sheds can be replenished with additional collateral, thereby increasing the available LUCI liquidity. To maintain system integrity, a minimum debt threshold of 250 LUCI is imposed.

<figure><img src="/files/lMC2oIeTBdsow8PFyGHo" alt=""><figcaption></figcaption></figure>


---

# 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://lucia-protocol.gitbook.io/lucia-protocol/system-functionality/borrower-operations.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.
