For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

uint256 YEAR_SECONDS

AUCTION_LOCKER

bytes32 AUCTION_LOCKER

AUCTIONEER

bytes32 AUCTIONEER

COLLATERAL_MANAGER

bytes32 COLLATERAL_MANAGER

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

ROLLOVER_MANAGER

ROLLOVER_TARGET_AUCTIONEER_ROLE

INITIALIZER_ROLE

DIAMOND_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

termRepoBalancedThreshold

threshold for determining whether term repo is balanced

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

submitRepurchasePayment

Allows DIAMOND_ROLE to submit repurchase payment on behalf of a borrower

Parameters

Name
Type
Description

borrower

address

The address of the borrower making the repurchase payment

amount

uint256

The amount of purchase token to submit for repurchase

burnCollapseExposure

Parameters

Name
Type
Description

amountToBurn

uint256

The amount of TermRepoTokens to burn

burnCollapseExposure

Allows DIAMOND_ROLE to burn and collapse exposure on behalf of a borrower

Parameters

Name
Type
Description

borrower

address

The address of the borrower whose exposure is being collapsed

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 verified users 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

mintOpenExposure

This method allows DIAMOND_ROLE to open repurchase price exposure against a TermRepoToken mint on behalf of a borrower outside of a Term Auction to create new supply

Parameters

Name
Type
Description

borrower

address

The address of the borrower for whom exposure is being minted

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

mintOpenExposureFromIntent

Mint open exposure for intent-based order settlement (DIAMOND_ROLE)

This method allows DIAMOND_ROLE to open repurchase price exposure against a TermRepoToken mint for intent-based orders

Parameters

Name
Type
Description

borrower

address

The address of the borrower for whom exposure is being minted

lender

address

The address of the lender providing the purchase tokens

purchaseTokenAmount

uint256

The amount of purchase tokens being lent

collateralAmounts

uint256[]

An array containing collateral token amounts for each token in the collateral basket

offerRate

uint256

The interest rate for the position (percentage in 1e18 format)

isRoutedCollateral

bool

Whether the collateral tokens are already routed to the contract

Return Values

Name
Type
Description

[0]

uint256

Amount of Term Repo Tokens minted

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

sender

address

The address of the sender

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

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

_submitRepurchasePaymentInternal

_burnCollapseExposureInternal

_mintOpenExposureInternal

_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