🖥️
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
  • Protocol Contract Class
  • Term Repo Class
  • Putting it together

Term Finance Protocol

Last updated 1 year ago

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 .

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

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

  • TermRepoToken.sol

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

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.

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.

The Term (Repo) Token is an ERC-20 contract that registers claims of lenders to a Term Repo arrangement against the total aggregate due on the (Total Outstanding Repurchase Exposure) from all borrowers to the same. A new instance of the Repo Token is deployed for each Term Repo arrangement.

Contracts within the Term Auction Group are "serially" deployed in sets
Contracts within the Term Auction Group are "serially" deployed in sets
The relationship between each instance of a Term Auction and a Term Repo can be many to one
Protocol Contracts are "evergreen" contracts that are deployed once and govern the entire Protocol
repurchase date
repurchase price
repurchase date