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_ROLEDEVOPS_ROLE
bytes32 DEVOPS_ROLEMINTER_ROLE
bytes32 MINTER_ROLEBURNER_ROLE
bytes32 BURNER_ROLEINITIALIZER_ROLE
bytes32 INITIALIZER_ROLEdecimalPlaces
uint8 decimalPlacestermContractPaired
bool termContractPairedmintingPaused
bool mintingPausedburningPaused
bool burningPausedredemptionValue
uint256 redemptionValueThe number of purchase tokens redeemable
termRepoId
bytes32 termRepoIdmintExposureCap
uint256 mintExposureCapconfig
struct TermRepoTokenConfig configemitter
contract ITermEventEmitter emitterwhileMintingNotPaused
modifier whileMintingNotPaused()whileBurningNotPaused
modifier whileBurningNotPaused()notTermContractPaired
modifier notTermContractPaired()constructor
constructor() publicinitialize
function initialize(string termRepoId_, string name_, string symbol_, uint8 decimalPlaces_, uint256 redemptionValue_, uint256 mintExposureCap_, address termInitializer_, struct TermRepoTokenConfig config_) externalpairTermContracts
function pairTermContracts(address termRepoServicer_, contract ITermEventEmitter emitter_, address devopsMultisig_, address adminWallet_) externalresetMintExposureCap
function resetMintExposureCap(uint256 mintExposureCap_) externaltotalRedemptionValue
function totalRedemptionValue() external view returns (uint256)Calculates the total USD redemption value of all outstanding TermRepoTokens
Return Values
[0]
uint256
totalRedemptionValue The total redemption value of TermRepoTokens in USD
burn
function burn(address account, uint256 amount) externalBurns TermRepoTokens held by an account Reverts if caller does not have BURNER_ROLE
Parameters
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
account
address
The address of account holding TermRepoTokens to burn
amount
uint256
The amount of TermRepoTokens to burn without decimal factor
Return Values
[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
account
address
The address of account to mint TermRepoTokens to
redemptionAmount
uint256
The target redemption amount to mint in TermRepoTokens
Return Values
[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
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) externalDecrements the mintExposureCap Reverts if caller does not have MINTER_ROLE
Parameters
supplyMinted
uint256
The number of Tokens Minted
decimals
function decimals() public view virtual returns (uint8)Return Values
[0]
uint8
uint8 A uint8 that specifies how many decimal places a token has
getCollateralRequirements
function getCollateralRequirements() external view returns (address[] collateralTokens, uint256[] maintenanceRatios)Return Values
collateralTokens
address[]
An array of collateral token addresses eligible to serve as collateral backing this repoToken
maintenanceRatios
uint256[]
An array of maintenance ratios applicable to each collateral token backing this repoToken
pauseMinting
function pauseMinting() externalunpauseMinting
function unpauseMinting() externalpauseBurning
function pauseBurning() externalunpauseBurning
function unpauseBurning() external_authorizeUpgrade
function _authorizeUpgrade(address impl) internalrequired override by the OpenZeppelin UUPS module
Parameters
impl
address
new impl address for proxy upgrade
Last updated