> For the complete documentation index, see [llms.txt](https://constant-finance.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://constant-finance.gitbook.io/docs/v0/concepts/positions.md).

# Positions

A Position is the isolated onchain record of a single borrower's loan. It holds the collateral, tracks debt by asset, and enforces the terms and risk limits established when the loan opens.

## What a Position Records

At a high level, every Position records:

* the borrower;
* the maturity;
* one or more debt-asset buckets;
* remaining principal and accrued borrower interest;
* fixed borrower and supplier rates for each debt asset;
* registered ERC-20 and NFT collateral;
* the Config selected when the Position was created; and
* whether the Position is open or closed.

A standard Basic Position begins with one debt asset. A Position created through refinance may carry forward the old Position's supported debt-asset set under newly signed rates and terms.

## Basic and Refinanced Positions

**Basic Position** and **Refinanced Position** describe how a Position was opened. They are not different core contract types.

* A Basic Position starts with a standard Borrow Order matched against one or more Supply Orders.
* A Refinanced Position is the new Position created while an older Position is settled in the same transaction.

After origination, both follow the same model for collateral, debt, health, repayment, and liquidation.

## Lifecycle

```mermaid
stateDiagram-v2
    [*] --> Active: Orders settle
    Active --> Active: Partial repayment
    Active --> Closed: Full repayment
    Active --> Closed: Old Position refinanced
    Active --> Liquidatable: Unhealthy or past maturity
    Liquidatable --> Active: Partial liquidation
    Liquidatable --> Closed: Debt fully settled
```

While a Position is open, its debt accrues interest and it can receive repayments. Once all debt is cleared, the Position closes and returns its remaining collateral to the borrower.

Reaching maturity does not close a Position automatically. If debt remains, it continues to exist and the Position becomes eligible for liquidation.

## Collateral Management

A Position may hold supported ERC-20 assets and supported Uniswap V3 LP NFTs. The borrower can add collateral at any time. Collateral can be removed only if the Position remains within its health boundary afterward, or if the Position has already closed.

The Position—not the Gateway or a Constant NFT—is the final authority over its registered collateral and health.

## Debt Management

A Position's debt changes when:

* interest accrues over time;
* the Position receives debt assets and synchronizes a repayment;
* the old Position is settled during a refinance; or
* a liquidator returns debt assets after receiving eligible collateral.

Repayment first updates the borrower's Position debt. The corresponding supplier amounts are then recorded in Constant NFT escrow for later claims.

## Isolation and Configuration

When a Position is created, it binds the Config selected by the Position Builder. If the Builder later chooses a different Config, existing Positions continue to use the one they received at creation.

Transferring a Constant NFT also leaves the Position unchanged. The borrower still owes the same debt under the same rates and maturity; only the right to claim a supplier share moves to the NFT's new owner.


---

# 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://constant-finance.gitbook.io/docs/v0/concepts/positions.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.
