> For the complete documentation index, see [llms.txt](https://docs.ts.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ts.finance/protocol-mechanisms/components/market.md).

# Market

A Market is where users can place orders for borrowing, lending, leveraging, and providing liquidity. Each Market includes the following essential elements and parameters, configured by the TermMax administrator:

* Debt Token: The token borrowers borrow and lenders lend (e.g., USDC).
* Collateral Token: The token borrowers use as collateral (e.g., PT-sUSDe-27Dec2024).
* Maturity Date: The date by which borrowers must repay the debt (e.g., December 28, 2024).
* Liquidation LTV (LLTV): The Loan-to-Value ratio at which liquidation is triggered. Liquidation occurs if the loan's LTV meets or exceeds the LLTV threshold due to a decline in collateral value or an increase in debt token value.
* Max LTV (MLTV): A more conservative LTV threshold with a built-in buffer, used to calculate the maximum amount of tokens that can be borrowed when a market maker (as a borrower) deposits collateral. The MLTV helps prevent immediate liquidation due to sudden market price fluctuations.
* Leverage Market: This is a flag indicating whether leverage is enabled for the market. Not all markets are suitable for leverage due to high risk of liquidation and other factors.

## Interest Calculation

The interest amount ($$I$$) on TermMax will be calculated based on the matched interest rate ($$r$$) and time ratio ($$\theta$$).

$$
\begin{cases}
t\_{M} := \text{maturity timestamp} \ t\_{m} := \text{matched timestamp} \ d:= \text{days from } t\_{m} \text{ to } t\_{M}
\end{cases}
$$

$$
d = \lceil \frac{t\_{M}-t\_{m}}{86400} \rceil
$$

$$
\theta = \lfloor \frac{d}{365} \rfloor
$$

$$
I = r \theta
$$

Open Time: The time at which the market opens for market makers and curators to create and activate range orders.


---

# 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.ts.finance/protocol-mechanisms/components/market.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.
