🖥️
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
  • TermRepoToken
  • ADMIN_ROLE
  • DEVOPS_ROLE
  • MINTER_ROLE
  • BURNER_ROLE
  • INITIALIZER_ROLE
  • decimalPlaces
  • termContractPaired
  • mintingPaused
  • burningPaused
  • redemptionValue
  • termRepoId
  • mintExposureCap
  • config
  • emitter
  • whileMintingNotPaused
  • whileBurningNotPaused
  • notTermContractPaired
  • constructor
  • initialize
  • pairTermContracts
  • resetMintExposureCap
  • totalRedemptionValue
  • burn
  • burnAndReturnValue
  • mintRedemptionValue
  • mintTokens
  • decrementMintExposureCap
  • decimals
  • pauseMinting
  • unpauseMinting
  • pauseBurning
  • unpauseBurning
  • _authorizeUpgrade
  1. Solidity API - 0.5.31
  2. Term Repo Class

TermRepoToken.sol

This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment. This is an ERC-20 contract to track claims to the aggregate repurchase obligations due on the r

TermRepoToken

This is an ERC-20 contract to track claims to the aggregate repurchase obligations due on the repurchase date across all borrowers to a Term Repo

This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment

ADMIN_ROLE

bytes32 ADMIN_ROLE

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

MINTER_ROLE

bytes32 MINTER_ROLE

BURNER_ROLE

bytes32 BURNER_ROLE

INITIALIZER_ROLE

bytes32 INITIALIZER_ROLE

decimalPlaces

uint8 decimalPlaces

termContractPaired

bool termContractPaired

mintingPaused

bool mintingPaused

burningPaused

bool burningPaused

redemptionValue

uint256 redemptionValue

The number of purchase tokens redeemable

termRepoId

bytes32 termRepoId

mintExposureCap

uint256 mintExposureCap

config

struct TermRepoTokenConfig config

emitter

contract ITermEventEmitter emitter

whileMintingNotPaused

modifier whileMintingNotPaused()

whileBurningNotPaused

modifier whileBurningNotPaused()

notTermContractPaired

modifier notTermContractPaired()

constructor

constructor() public

initialize

function initialize(string termRepoId_, string name_, string symbol_, uint8 decimalPlaces_, uint256 redemptionValue_, uint256 mintExposureCap_, address termInitializer_, struct TermRepoTokenConfig config_) external

pairTermContracts

function pairTermContracts(address termRepoServicer_, contract ITermEventEmitter emitter_, address devopsMultisig_, address adminWallet_) external

resetMintExposureCap

function resetMintExposureCap(uint256 mintExposureCap_) external

totalRedemptionValue

function totalRedemptionValue() external view returns (uint256)

Calculates the total USD redemption value of all outstanding TermRepoTokens

Return Values

Name
Type
Description

[0]

uint256

totalRedemptionValue The total redemption value of TermRepoTokens in USD

burn

function burn(address account, uint256 amount) external

Burns TermRepoTokens held by an account Reverts if caller does not have BURNER_ROLE

Parameters

Name
Type
Description

account

address

The address of account holding TermRepoTokens to burn

amount

uint256

The amount of TermRepoTokens to burn without decimal factor

burnAndReturnValue

function burnAndReturnValue(address account, uint256 amount) external returns (uint256)

Burns TermRepoTokens held by an account and returns purchase redemption value of tokens burned Reverts if caller does not have BURNER_ROLE

Parameters

Name
Type
Description

account

address

The address of account holding TermRepoTokens to burn

amount

uint256

The amount of TermRepoTokens to burn without decimal factor

Return Values

Name
Type
Description

[0]

uint256

totalRedemptionValue Total redemption value of TermRepoTokens burned

mintRedemptionValue

function mintRedemptionValue(address account, uint256 redemptionAmount) external returns (uint256)

Mints TermRepoTokens in an amount equal to caller specified target redemption amount The redemptionValue is the amount of purchase tokens redeemable per unit of TermRepoToken Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

account

address

The address of account to mint TermRepoTokens to

redemptionAmount

uint256

The target redemption amount to mint in TermRepoTokens

Return Values

Name
Type
Description

[0]

uint256

numTokens The amount of Term Repo Tokens minted

mintTokens

function mintTokens(address account, uint256 numTokens) external returns (uint256)

Mints an exact amount of TermRepoTokens Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

account

address

The address of account to mint TermRepoTokens to

numTokens

uint256

The exact number of term repo tokens to mint

decrementMintExposureCap

function decrementMintExposureCap(uint256 supplyMinted) external

Decrements the mintExposureCap Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

supplyMinted

uint256

The number of Tokens Minted

decimals

function decimals() public view virtual returns (uint8)

Return Values

Name
Type
Description

[0]

uint8

uint8 A uint8 that specifies how many decimal places a token has

pauseMinting

function pauseMinting() external

unpauseMinting

function unpauseMinting() external

pauseBurning

function pauseBurning() external

unpauseBurning

function unpauseBurning() external

_authorizeUpgrade

function _authorizeUpgrade(address impl) internal

required override by the OpenZeppelin UUPS module

Parameters

Name
Type
Description

impl

address

new impl address for proxy upgrade

Last updated 1 year ago