# Protocol Interactions

### Overview

In addition to the standard ERC-4626 methods implemented via Yearn V3 base operations, Term's custom strategy extends the **BaseStrategy** to include two key Term-specific functionalities:

1. **Auction Participation**: Enables the submission of offers into Term auctions, callable only by a designated manager.
2. **Direct Repo Token Liquidity**: Allows public users to sell repoTokens into the vault.

### **Validation and Risk Management (Shared Across Methods)**

| **Validation Criteria**                                    | **Description**                                                                             |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">**RepoToken Eligibility**</mark> |                                                                                             |
| Not Blacklisted                                            | `repoTokenBlacklist[repoToken] == false`                                                    |
| Recognized in TermController                               | `_isTermDeployed(repoToken) == true`                                                        |
| Not Matured                                                | `redemptionTimestamp > block.timestamp`                                                     |
| Collateral Requirements                                    | `maintenanceCollateralRatios >= minCollateralRatio`                                         |
| <mark style="color:blue;">**Portfolio Constraints**</mark> | *(from StrategyState struct)*                                                               |
| Maximum Maturity                                           | Ensures the weighted average maturity of the portfolio is below `timeToMaturityThreshold`.  |
| Reserve Ratio                                              | Maintains at least `requiredReserveRatio` for liquidity.                                    |
| Exposure Limits                                            | Verifies that exposure to a single repoToken does not exceed `repoTokenConcentrationLimit`. |

**Additiona Safeguards**:

* Reentrancy guards prevent recursive exploits in state-modifying functions.
* Pausable operations allow emergency suspension.
* Role-based access control ensures restricted access where required.
* Configurable blacklist functionality excludes prohibited repoTokens.

### Auction Participation

Callable by `MANAGER` only. Allows `MANAGER` to submit an offer into an eligible Term auctions, provided the offer satisfies  all portfolio risk constraints.

```solidity
function submitAuctionOffer(
    ITermAuction termAuction,
    address repoToken,
    bytes32 idHash,
    bytes32 offerPriceHash,
    uint256 purchaseTokenAmount
) external returns (bytes32[] memory)
```

```solidity
function deleteAuctionOffers(address, bytes32[]) external
```

**Features**:

* Submits an offer into a Term auction after passing validation and portfolio risk checks.
* Restricted to the `MANAGER` role for controlled access.

### Direct Repo Token Liquidity

The `sellRepoToken` method provides a public interface for users to sell repoTokens into the vault.

```solidity
function sellRepoToken(
    address repoToken,
    uint256 repoTokenAmount
) external
```

**Features**:

* Facilitates liquidity by allowing users to sell repoTokens to the vault.
* Applies the `discountRateMarkup` to determine the repoToken's value.


---

# 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/periphery-contracts/curated-vaults/core-functionality/term-protocol-operations/protocol-interactions.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.
