TermRepoServicer.sol
This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment. This contract maintains records, collects and disburse repurchase payments.
TermRepoServicer
This contract maintains records, collects and disburse repurchase payments
This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment
YEAR_SECONDS
ADMIN_ROLE
AUCTION_LOCKER
AUCTIONEER
COLLATERAL_MANAGER
DEVOPS_ROLE
SPECIALIST_ROLE
ROLLOVER_MANAGER
ROLLOVER_TARGET_AUCTIONEER_ROLE
INITIALIZER_ROLE
termRepoId
totalOutstandingRepurchaseExposure
totalRepurchaseCollected
maturityTimestamp
endOfRepurchaseWindow
redemptionTimestamp
block timestamp at which term repo tokens can be redeemed
servicingFee
percentage share of bid amounts charged to bidder
shortfallHaircutMantissa
proportion of redemption value for redemption
purchaseToken
termRepoCollateralManager
termRepoRolloverManager
termRepoLocker
termRepoToken
termController
emitter
repurchaseExposureLedger
termContractPaired
notTermContractPaired
constructor
initialize
pairTermContracts
submitRepurchasePayment
The max repurchase amount is the repurchase balance less any amounts earmarked for rollover
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount of purchase token to submit for repurchase |
burnCollapseExposure
Parameters
Name | Type | Description |
---|---|---|
amountToBurn | uint256 | The amount of TermRepoTokens to burn |
getBorrowerRepurchaseObligation
Parameters
Name | Type | Description |
---|---|---|
borrower | address | The address of the borrower to query |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The total repurchase price due at maturity for a given borrower |
mintOpenExposure
This method allows SPECIALIST_ROLE to open repurchase price exposure against a TermRepoToken mint of corresponding value outside of a Term Auction to create new supply
Parameters
Name | Type | Description |
---|---|---|
amount | uint256 | The amount of Term Repo Tokens to mint |
collateralAmounts | uint256[] | An array containing an amount of collateral token for each token in collateral basket |
redeemTermRepoTokens
Parameters
Name | Type | Description |
---|---|---|
redeemer | address | The address of redeemer |
amountToRedeem | uint256 | The amount of TermRepoTokens to redeem |
isTermRepoBalanced
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | A boolean that represents whether the term repo locker is balanced |
lockOfferAmount
Parameters
Name | Type | Description |
---|---|---|
offeror | address | The address of the offeror |
amount | uint256 | The amount of purchase tokens to lock |
unlockOfferAmount
Parameters
Name | Type | Description |
---|---|---|
offeror | address | The address of the offeror |
amount | uint256 | The amount of purchase tokens to unlocked |
fulfillOffer
Parameters
Name | Type | Description |
---|---|---|
offeror | address | The address of the offeror |
purchasePrice | uint256 | The offer amount to fulfill |
repurchasePrice | uint256 | The repurchase price due to offeror at maturity |
offerId | bytes32 | Unique identifier for this offer |
fulfillBid
Parameters
Name | Type | Description |
---|---|---|
bidder | address | The address of the bidder |
purchasePrice | uint256 | The bid amount to fulfill |
repurchasePrice | uint256 | The repurchase price due at maturity |
collateralTokens | address[] | Collateral token addresses |
collateralAmounts | uint256[] | Collateral token amounts |
dayCountFractionMantissa | uint256 | Actual/360 day count fraction parameter from Term Auction Group |
approveRolloverAuction
Parameters
Name | Type | Description |
---|---|---|
termAuction | address | The address of a TermAuction contract to receive autioneer role |
openExposureOnRolloverNew
Parameters
Name | Type | Description |
---|---|---|
borrower | address | The address of the borrower rolling into new Term Repo |
purchasePrice | uint256 | The purchase price received from new TermRepo |
repurchasePrice | uint256 | The new repurchase price due at maturity of new TermRepo |
previousTermRepoLocker | address | The address of the old TermRepoLocker contract |
dayCountFractionMantissa | uint256 | Actual/360 day count fraction parameter from Term Auction Group |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The net purchase price received in after deducing protocol servicing fees |
closeExposureOnRolloverExisting
Parameters
Name | Type | Description |
---|---|---|
borrower | address | The address of the borrower |
rolloverSettlementAmount | uint256 | The amount of net proceeds received from new TermRepo to pay down existing repurchase obligation due to old Term Repo |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | A uint256 representing the proportion of total repurchase due to old Term Repo from borrower settled by proceeds from new TermRepo |
liquidatorCoverExposure
Parameters
Name | Type | Description |
---|---|---|
borrower | address | The address of the borrower |
liquidator | address | The address of the liquidator |
amountToCover | uint256 | The amount of repurchase exposure to cover in liquidation |
liquidatorCoverExposureWithRepoToken
Parameters
Name | Type | Description |
---|---|---|
borrower | address | The address of the borrower |
liquidator | address | The address of the liquidator |
amountOfRepoToken | uint256 | The amount of term tokens used to cover in liquidation |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | A uint256 representing purchase value of repo tokens burned |
grantMintExposureAccess
Parameters
Name | Type | Description |
---|---|---|
authedUser | address | The address of user granted acces to create mint exposure |
reopenToNewAuction
Parameters
Name | Type | Description |
---|---|---|
termAuctionGroup | struct TermAuctionGroup | A struct containing contract addresses of a Term Auction deployment to pair for a reopening of a TermRepo |
_isTermRepoBalanced
Truncation is by 4 decimal places due to the assumption that number of participants < 10000
_getMaxRepaymentAroundRollover
_repay
_parRedemption
_proRataRedemption
_authorizeUpgrade
required override by the OpenZeppelin UUPS module
Parameters
Name | Type | Description |
---|---|---|
impl | address | new impl address for proxy upgrade |
Last updated