🖥️
Term Finance v1 Developer Documentation
  • Overview
  • Term Finance Protocol
    • Term Repo
      • Term Auction Group
        • Initialization Parameters
        • Administrative Functions
      • Term Servicer Group
        • Initialization Parameters
        • Administrative Functions
      • Term Repo Token
        • Initialization Parameters
        • Administrative Functions
    • Protocol Contracts
      • Price Feeds
    • Conventions
    • Terminology
  • Access Controls
    • Upgradeability
  • Deployed Contracts
    • Smart Contract Audits
    • Formal Verification
    • [Ethereum]
    • [Avalanche]
  • Protocol Security
    • Smart Contract Monitoring
    • Front-End Security
  • Solidity API - latest
    • Term Repo Class
      • Term Auction Group
        • TermAuction.sol
        • TermAuctionBidLocker.sol
        • TermAuctionOfferLocker.sol
      • Term Servicer Group
        • TermRepoServicer.sol
        • TermRepoLocker.sol
        • TermRepoCollateralManager.sol
        • TermRepoRolloverManager.sol
      • TermRepoToken.sol
    • Protocol Class
      • TermController.sol
      • TermEventEmitter.sol
      • TermInitializer.sol
      • TermPriceConsumerV3.sol
  • Solidity API - 0.5.31
    • Term Repo Class
      • Term Auction Group
        • TermAuction.sol
        • TermAuctionBidLocker.sol
        • TermAuctionOfferLocker.sol
      • Term Servicer Group
        • TermRepoServicer.sol
        • TermRepoLocker.sol
        • TermRepoCollateralManager.sol
        • TermRepoRolloverManager.sol
      • TermRepoToken.sol
    • Protocol Class
      • TermController.sol
      • TermEventEmitter.sol
      • TermInitializer.sol
      • TermPriceConsumerV3.sol
  • Solidity API - 0.5.32
    • Term Repo Class
      • Term Auction Group
        • TermAuction.sol
        • TermAuctionBidLocker.sol
        • TermAuctionOfferLocker.sol
      • Term Servicer Group
        • TermRepoServicer.sol
        • TermRepoLocker.sol
        • TermRepoCollateralManager.sol
        • TermRepoRolloverManager.sol
      • TermRepoToken.sol
    • Protocol Class
      • TermController.sol
      • TermEventEmitter.sol
      • TermInitializer.sol
      • TermPriceConsumerV3.sol
  • Solidity API - 0.6.0
    • Term Repo Class
      • Term Auction Group
        • TermAuction.sol
        • TermAuctionBidLocker.sol
        • TermAuctionOfferLocker.sol
      • Term Servicer Group
        • TermRepoServicer.sol
        • TermRepoLocker.sol
        • TermRepoCollateralManager.sol
        • TermRepoRolloverManager.sol
      • TermRepoToken.sol
    • Protocol Class
      • TermController.sol
      • TermEventEmitter.sol
      • TermInitializer.sol
      • TermPriceConsumerV3.sol
  • Solidity API - 0.9.0
    • Term Repo Class
      • Term Auction Group
        • TermAuction.sol
        • TermAuctionBidLocker.sol
        • TermAuctionOfferLocker.sol
      • Term Servicer Group
        • TermRepoServicer.sol
        • TermRepoLocker.sol
        • TermRepoCollateralManager.sol
        • TermRepoRolloverManager.sol
      • TermRepoToken.sol
    • Protocol Class
      • TermController.sol
      • TermEventEmitter.sol
      • TermInitializer.sol
      • TermPriceConsumerV3.sol
  • DeFiSafety - detailed report
  • Github Repo
  • Periphery Contracts
    • Blue Sheets
      • Core Architecture
      • Core Functionality
      • Administration
      • Deployed Contracts
        • Smart Contract Audits
        • [Ethereum]
      • Solidity API - latest
        • RepoTokenLinkedList.sol#RepoTokenLinkedList
        • RepoTokenLinkedList.sol#RepoTokenLinkedListStorageV1
        • RepoTokenLinkedListEventEmitter.sol
        • TermDiscountRateAdapter.sol
    • Github Repo
    • Term Strategy Vaults
      • Core Architecture
        • Yearn V3 Framework
        • Term Integration
      • Core Functionality
        • YearnV3 Base Operations
        • Term Protocol Operations
          • Core Integration
          • Portfolio Valuation
          • Protocol Interactions
          • Portfolio Constraints
      • Administration
        • Yearn Roles & Governance
        • Term Vault Governance
      • Configuration Guide
      • Deployed Contracts
        • Smart Contract Audits
        • [Ethereum]
      • Solidity API - latest
        • RepoTokenList.sol#RepoTokenList
        • RepoTokenList.sol#RepoTokenListData
        • RepoTokenList.sol#RepoTokenListNode
        • RepoTokenUtils.sol#RepoTokenUtils
        • Strategy.sol#Strategy
        • TermAuctionList.sol#TermAuctionList
        • TermAuctionList.sol#PendingOffer
        • TermAuctionList.sol#TermAuctionListData
        • TermAuctionList.sol#TermAuctionListNode
        • TermDiscountRateAdapter.sol#TermDiscountRateAdapter
        • TermVaultEventEmitter.sol#TermVaultEventEmitter
        • TermFinanceVaultWrappedVotesToken.sol#TermFinanceVaultWrappedVotesToken
    • Github Repo
Powered by GitBook
On this page
  • Overview
  • Validation and Risk Management (Shared Across Methods)
  • Auction Participation
  • Direct Repo Token Liquidity
  1. Periphery Contracts
  2. Term Strategy Vaults
  3. Core Functionality
  4. Term Protocol Operations

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

RepoToken Eligibility

Not Blacklisted

repoTokenBlacklist[repoToken] == false

Recognized in TermController

_isTermDeployed(repoToken) == true

Not Matured

redemptionTimestamp > block.timestamp

Collateral Requirements

maintenanceCollateralRatios >= minCollateralRatio

Portfolio Constraints

(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.

function submitAuctionOffer(
    ITermAuction termAuction,
    address repoToken,
    bytes32 idHash,
    bytes32 offerPriceHash,
    uint256 purchaseTokenAmount
) external returns (bytes32[] memory)
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.

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.

Last updated 4 months ago