# Term Finance Protocol

The contracts that make up the Term Finance Protocol are broadly divided into two classes: (i) "evergreen" Protocol Contracts that govern at the protocol level; and (ii) "serial" Term Repos that are instances of Term Finance Protocol's implementation of tri-party repo on-chain. This second class of "single-use" serial contracts are necessarily finite in nature given that each Term Repo is limited to a fixed-term and has a fixed maturity or [repurchase date](/term-finance-protocol/terminology.md#repurchase-date).

### Protocol Contract Class

Protocol contracts are evergreen contracts at the protocol level that govern and apply across all Term Repos. The following contracts belong to this class and handle protocol level authentication, security controls, event logging and manage centralized price feeds.

* `TermEventEmitter.sol`
* `TermController.sol`
* `TermInitializer.sol`
* `TermPriceConsumerV3.sol`

<figure><img src="/files/ttCGLHyvQ9QW71PgODnA" alt=""><figcaption><p>Protocol Contracts are "evergreen" contracts that are deployed once and govern the entire Protocol</p></figcaption></figure>

### Term Repo Class

The Term Repo Class are a class of smart contracts that are serially deployed. Each repo maturity (and corresponding set of key terms) require the deployment of a separate instance of the entire class and are governed by the Protocol Contracts. The class of smart contracts belonging to the Term Repo Class can be further split into three subclasses or groups.

#### Term Servicer Group

The Term Servicer group of contracts enforce the terms of a Term Repo arrangement and automate the settlement and collateral management functions handled by the collateral agent in the TradFi context. The relationship between each contract within the Term Servicer Group is always 1:1 and a new instance of the entire set is deployed for each Term Repo arrangement.

* `TermRepoCollateralManager.sol`
* `TermRepoServicer.sol`
* `TermRepoRolloverManager.sol`
* `TermRepoLocker.sol`

#### Term Repo Token

The Term (Repo) Token is an ERC-20 contract that registers claims of lenders to a Term Repo arrangement against the total aggregate [repurchase price](/term-finance-protocol/terminology.md#repurchase-price) due on the [repurchase date](/term-finance-protocol/terminology.md#repurchase-date) (Total Outstanding Repurchase Exposure) from all borrowers to the same. A new instance of the Repo Token is deployed for each Term Repo arrangement.

* `TermRepoToken.sol`

<figure><img src="/files/nHu5sQHJX2r4dZJsXD6P" alt=""><figcaption><p>Contracts within the Term Auction Group are "serially" deployed in sets</p></figcaption></figure>

#### Term Auction Group

The Term Auction group of contracts contain the logic to handle and process bid and offer submissions, determine an auction clearing price, and to settle and clear a Term Auction. The relationship between each contract in the Term Auction Group is always 1:1 and a new instance of the entire set is deployed for each Term Auction.

* `TermAuction.sol`
* `TermAuctionBidLocker.sol`
* `TermAuctionOfferLocker.sol`

<figure><img src="/files/rb84vHisZvqWlBL2A1RE" alt=""><figcaption><p>Contracts within the Term Auction Group are "serially" deployed in sets</p></figcaption></figure>

The relationship between the Term Auction Group and the Term Repo Group ***can be*** many to one (but is typically 1:1). Where a new instance of the Term Auction Group is deployed and paired with a previously auctioned Term Repo, this is known as a "re-opening" auction.

<figure><img src="/files/LGnZdYxfZLwMyIMUd6zi" alt=""><figcaption><p>The relationship between each instance of a Term Auction and a Term Repo can be many to one</p></figcaption></figure>

### Putting it together

To review, the Protocol Contracts govern all instances of the Term Repo Group contracts. Within the Term Repo Group, each Term Repo instance is comprised of a unique set of Term Servicer Group contracts + Term Repo Token deployments. Positions within each Term Repo arrangement are "opened" by a Term Auction, which is comprised of a unique set of Term Auction Group deployments, and multiple Term Auctions can be deployed to open positions in the same Term Repo.

<figure><img src="/files/2skVF3yUEwdMtnoRE84R" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://developers.term.finance/term-finance-protocol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
