Protocol Contracts

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.

ContractDescription and Key Functions

Initializes a Term Repo

INITIALIZER_APPROVAL_ROLE

setupTerm: Validates Term Repo contracts against the Term Controller contract, emits initialization events during deployment and pairs validated Term Repo contracts with Protocol Contracts

INITIALIZER_APPROVAL_ROLE

setupAuction: Validates Term Auction contracts against the Term Controller contract, emits initialization events during deployment and pairs Term Auction contracts with Protocol Contracts and Term Repo contracts

ADMIN_ROLE

pauseDeploying: Triggers revert when trying to call setupTerm or setupAuction

ADMIN_ROLE

unpauseDeploying: Resumes Term Initializer for regular deployment

Designates the Protocol treasury and reserve wallet address as well as maintain a ledger of validly deployed Protocol contracts

getTreasuryAddress: External view function that returns the Treasury wallet address

getProtocolReserveAddress: External view function that returns the Protocol Reserve allet address

isTermDeployed: External view function that returns a boolean indicating whether a given contract address was validly deployed by the Protocol

DEVOPS_ROLE

updateTreasuryAddress: Updates or changes treasury address where servicing fees are collected

DEVOPS_ROLE

updateProtocolReserveAddress: Updates or changes reserve address where protocol liquidated damages are collected

ADMIN_ROLE

updateControllerAdminWallet: Updates or changes Controller Admin wallet

CONTROLLER_ADMIN_ROLE

markTermDeployed: Marks a smart contract as a valid Protocol deployment and adds address to Term Controller contract

CONTROLLER_ADMIN_ROLE

unmarkTermDeployed: Removes a previously validated smart contract address from the Term Controller contract

A centralized price oracle contract that feeds pricing data to Term Repo contracts

usdValueOfTokens: External function, returns value of tokens denominated in USD given an amount and a token address

DEVOPS_ROLE

addNewTokenPriceFeed: Callable by Admin, adds/subscribes to a new price feed

DEVOPS_ROLE

removeTokenPriceFeed: Callable by Admin, removes/unsubscribes from a previously added price feed

A centralized event emitter that records various important Protocol events to the blockchain

<internal only>

Last updated