TermEventEmitter.sol
This contract operates at the protocol level and governs all instances of a Term Repo. This contract is a centralized event emitter that records important events to the blockchain
TermEventEmitter
This contract is a centralized event emitter that records important events to the blockchain
This contract operates at the protocol level and governs all instances of a Term Repo
DEVOPS_ROLE
INITIALIZER_ROLE
TERM_CONTRACT
TERM_DELISTER
constructor
initialize
pairTermContract
emitTermAuctionInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The id of the current Term Repo deployment being initialized |
termAuctionId | bytes32 | The id of the auction being initialized |
termAuction | address | The address of the auction contract being initialized |
auctionEndTime | uint256 | The end time of the auction being initialized |
version | string | The version tag of the smart contract deployed |
emitBidAssigned
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | A bid id |
amount | uint256 | The amount assigned to this bid |
emitOfferAssigned
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | An offer id |
amount | uint256 | The amount assigned to this offer |
emitAuctionCompleted
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The Term Auction id of auction completed |
timestamp | uint256 | The timestamp of the current block |
blockNumber | uint256 | The number of the current block |
totalAssignedBids | uint256 | The number of assigned bids in the auction |
totalAssignedOffers | uint256 | The number of assigned offers in the auction |
clearingPrice | uint256 | The clearing price of the auction |
emitAuctionCancelled
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of the auction cancelled |
nonViableAuction | bool | Auction not viable due to bid and offer prices not intersecting |
auctionCancelledforWithdrawal | bool | Auction has been cancelled for manual fund withdrawal |
emitCompleteAuctionPaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of the auction paused |
termRepoId | bytes32 | The Term Repo id associated with auction paused |
emitCompleteAuctionUnpaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of the auction unpaused |
termRepoId | bytes32 | The Term Repo id associated with auction unpaused |
emitTermAuctionBidLockerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with BidLocker initialized |
termAuctionId | bytes32 | The Term Auction id associated with BidLocker initialized |
termAuctionBidLocker | address | The address of the TermAuctionBidLocker contract being intialized |
auctionStartTime | uint256 | The time at which auction bids will be accepted for submission |
revealTime | uint256 | The time at which sealed auction bids can be revealed |
maxBidPrice | uint256 | The maximum bid price for the auction |
minimumTenderAmount | uint256 | The minimum tender amount for the auction |
dayCountFractionMantissa | uint256 | The day count fraction remainder |
emitBidLocked
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
bid | struct TermAuctionBid | A struct containing details of the locked bid |
referralAddress | address | The address of the referrer. Zero Address if none. |
emitBidRevealed
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | The bid id |
bidPrice | uint256 | The revealed price of the bid |
emitBidUnlocked
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | A bid id |
emitBidInShortfall
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | A bid id |
emitBidLockingPaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where bid locking is paused |
termRepoId | bytes32 | The Term Repo id where bid locking is paused |
emitBidLockingUnpaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where bid locking is unpaused |
termRepoId | bytes32 | The Term Repo id where bid locking is unpaused |
emitBidUnlockingPaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where bid unlocking is paused |
termRepoId | bytes32 | The Term Repo id where bid unlocking is paused |
emitBidUnlockingUnpaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where bid unlocking is unpaused |
termRepoId | bytes32 | The Term Repo id where bid unlocking is unpaused |
emitTermAuctionOfferLockerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with OfferLocker initialized |
termAuctionId | bytes32 | The Term Auction id associated with OfferLocker initialized |
termAuctionOfferLocker | address | The address of the TermAuctionOfferLocker contract being intialized |
auctionStartTime | uint256 | The time at which auction bids will be accepted for submission |
revealTime | uint256 | The time at which sealed auction bids can be revealed |
maxOfferPrice | uint256 | The maximum offer price for the auction |
minimumTenderAmount | uint256 | The minimum tender amount for the auction |
emitOfferLocked
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | An offer id |
offeror | address | The address of the offeror |
offerPrice | bytes32 | The offer price |
amount | uint256 | The amount of purchase tokens offered |
purchaseToken | address | The address of the purchase token being offered |
referralAddress | address | The address of the referrer. Zero Address if none. |
emitOfferRevealed
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | An offer id |
offerPrice | uint256 | The offer price revealed |
emitOfferUnlocked
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | A Term Auction id |
id | bytes32 | An offer id |
emitOfferLockingPaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where offer locking is paused |
termRepoId | bytes32 | The Term Repo id where offer locking is paused |
emitOfferLockingUnpaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where offer locking is unpaused |
termRepoId | bytes32 | The Term Repo id where offer locking is unpaused |
emitOfferUnlockingPaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where offer unlocking is paused |
termRepoId | bytes32 | The Term Repo id where offer unlocking is paused |
emitOfferUnlockingUnpaused
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of Term Auction where offer unlocking is unpaused |
termRepoId | bytes32 | The Term Repo id where offer unlocking is unpaused |
emitTermRepoCollateralManagerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with collateral manger being initialized |
termRepoCollateralManager | address | The address of the TermRepoCollateralManager contract being intialized |
collateralTokens | address[] | An array containing a list of the addresses of all accepted collateral tokens |
initialCollateralRatios | uint256[] | An array containing the initial collateral ratios for each collateral token |
maintenanceCollateralRatios | uint256[] | An array containing the maintenance collateral ratios for each collateral token |
liquidatedDamagesSchedule | uint256[] | An array containing the liquidated damages applicable to each collateral token |
emitPairReopeningBidLocker
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id for the Term Repo being reopened |
termRepoCollateralManager | address | The TermRepoCollateralManager address for the Term Repo being reopened |
termAuctionBidLocker | address | The new TermAuctionBidLocker to be paired for reopening |
emitCollateralLocked
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
collateralToken | address | The address of the collateral token locked |
amount | uint256 | The amount of collateral being locked |
emitCollateralUnlocked
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
collateralToken | address | The address of the collateral token locked |
amount | uint256 | The amount of collateral being unlocked |
emitLiquidation
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
liquidator | address | The address of the liquidator |
closureAmount | uint256 | The amount of repurchase exposure covered |
collateralToken | address | The address of the collateral tokens liquidated |
amountLiquidated | uint256 | The amount of collateral tokens liquidated |
protocolSeizureAmount | uint256 | |
defaultLiquidation | bool |
emitLiquidationPaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The id of Term Repo where liquidations are paused |
emitLiquidationUnpaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The id of Term Repo where liquidation is unpaused |
emitTermRepoServicerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with TermRepoServicer being initialized |
termRepoServicer | address | The address of the TermRepoServicer contract being initialized |
purchaseToken | address | The address of the purchase token |
maturityTimestamp | uint256 | The time at which repurchase is due |
endOfRepurchaseWindow | uint256 | The time at which the repurchase window ends |
redemptionTimestamp | uint256 | The time when redemption of Term Repo Tokens begins |
servicingFee | uint256 | percentage share of bid amounts charged to bidder |
version | string | The version tag of the smart contract deployed |
emitReopeningOfferLockerPaired
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id for the Term Repo being reopened |
termRepoServicer | address | The address of the TermRepoServicer contract for the Term Repo being reopened |
termAuctionOfferLocker | address | The TermAuctionOfferLocker to be paired for reopening |
termAuction | address | The address of the TermAuction contract to be paired for reopening |
emitOfferLockedByServicer
This event is not to be confused with OfferLocked by TermOfferLocker Both this event and OfferLocked will be triggered, this one specifically refers to corresponding action taken by Term Servicer
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
offeror | address | The address of the offeror |
amount | uint256 | The offer amount to be locked |
emitOfferUnlockedByServicer
This event is not to be confused with OfferUnlocked by TermOfferLocker Both this event and OfferLocked will be triggered, this one specifically refers to corresponding action taken by Term Servicer
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
offeror | address | The address of the offeror |
amount | uint256 | The offer amount to be unlocked |
emitOfferFulfilled
Parameters
Name | Type | Description |
---|---|---|
offerId | bytes32 | A unique offer id |
offeror | address | The address of the offeror |
purchasePrice | uint256 | The offer amount fulfilled |
repurchasePrice | uint256 | The repurchase price due to offeror at maturity |
repoTokensMinted | uint256 | The amount of Term Repo Tokens minted to offeror |
emitTermRepoTokensRedeemed
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
redeemer | address | The address of the redeemer |
redemptionAmount | uint256 | The amount of TermRepoTokens redeemed |
redemptionHaircut | uint256 | The haircut applied to redemptions (if any) due to unrecoverable repo exposure |
emitBidFulfilled
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
bidder | address | The address of the bidder |
purchasePrice | uint256 | The bid amount fulfilled in auction |
repurchasePrice | uint256 | The repurchase price due at maturity |
servicingFees | uint256 | The fees earned by the protocol |
emitExposureOpenedOnRolloverNew
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
purchasePrice | uint256 | The purchase price received from new TermRepo |
repurchasePrice | uint256 | The new repurchase price due at maturity of new TermRepo |
servicingFees | uint256 | The fees earned by the protocol |
emitExposureClosedOnRolloverExisting
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
amountRolled | uint256 | The repurchase exposure balance closed on old Term Repo |
emitRepurchasePaymentSubmitted
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
amount | uint256 | The amount submitted for repurchase |
emitMintExposureAccessGranted
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
authedUser | address | User granted mint exposure access |
emitMintExposure
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
minter | address | The address of the minter |
netTokensReceived | uint256 | The amount of Term Repo Tokens received by minter net of servicing fees |
servicingFeeTokens | uint256 | The number of Term Repo Tokens retained by protocol in servicing fees |
repurchasePrice | uint256 | The repurchase exposure opened by minter against Term Repo Token mint |
emitBurnCollapseExposure
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
borrower | address | The address of the borrower |
closeAmount | uint256 | The amount of repurchase exposure to close |
emitTermRepoRolloverManagerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with TermRepoRolloverManager being initialized |
rolloverManager | address | The address of the TermRepoRolloverManager contract being initialized |
emitRolloverTermApproved
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id of existing Term Repo |
rolloverTermAuctionId | bytes32 | The Term Auction Id that rollover bid will be submitted into |
emitRolloverTermApprovalRevoked
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id of existing Term Repo |
rolloverTermAuctionId | bytes32 | The Term Auction Id whose rollover approval is revoked |
emitRolloverElection
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id of existing Term Repo |
rolloverTermRepoId | bytes32 | The Term Repo Id of Rollover Term Repo |
borrower | address | The address of the borrower |
rolloverAuction | address | The address of the auction being rolled over to |
rolloverAmount | uint256 | The repurchase amount being rolled over |
hashedBidPrice | bytes32 | The hash of the rollover bid price |
emitRolloverCancellation
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id of existing Term Repo |
borrower | address | The address of the borrower |
emitRolloverProcessed
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id of existing Term Repo |
borrower | address | The address of the borrower |
emitTermRepoLockerInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with TermRepoLocker contract being initialized |
termRepoLocker | address | The address of the TermRepoLocker contract being initialized |
emitTermRepoLockerTransfersPaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
emitTermRepoLockerTransfersUnpaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | A Term Repo id |
emitTermRepoTokenInitialized
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with the TermRepoToken being initalized |
termRepoToken | address | The address of the TermRepoToken contract being initialized |
redemptionRatio | uint256 | The number of purchase tokens redeemable per unit of Term Repo Token at par |
emitTermRepoTokenMintingPaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with the TermRepoToken where minting is paused |
emitTermRepoTokenMintingUnpaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with the TermRepoToken where minting is unpaused |
emitTermRepoTokenBurningPaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with the TermRepoToken where burning is paused |
emitTermRepoTokenBurningUnpaused
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The Term Repo id associated with the TermRepoToken where burning is unpaused |
emitDelistTermRepo
Parameters
Name | Type | Description |
---|---|---|
termRepoId | bytes32 | The id of the Term Repo being delisted |
emitDelistTermAuction
Parameters
Name | Type | Description |
---|---|---|
termAuctionId | bytes32 | The id of the Term Auction being delisted |
emitTermContractUpgraded
Parameters
Name | Type | Description |
---|---|---|
proxy | address | address of proxy contract |
implementation | address | address of new impl contract proxy has been upgraded to |
_authorizeUpgrade
required override by the OpenZeppelin UUPS module
Last updated