TermAuctionBidLocker.sol
This contract belongs to the Term Auction group of contracts and is specific to a Term Repo deployment. This contract handles and proceesses Term Auction bid submissions
TermAuctionBidLocker
This contract handles and proceesses Term Auction bid submissions
This contract belongs to the Term Auction group of contracts and is specific to a Term Repo deployment
MAX_BID_PRICE
uint256 MAX_BID_PRICEMAX_BID_COUNT
uint256 MAX_BID_COUNTTHREESIXTY_DAYCOUNT_SECONDS
uint256 THREESIXTY_DAYCOUNT_SECONDSADMIN_ROLE
bytes32 ADMIN_ROLEAUCTIONEER_ROLE
bytes32 AUCTIONEER_ROLEDEVOPS_ROLE
bytes32 DEVOPS_ROLEINITIALIZER_ROLE
bytes32 INITIALIZER_ROLEROLLOVER_MANAGER
bytes32 ROLLOVER_MANAGERtermRepoId
bytes32 termRepoIdtermAuctionId
bytes32 termAuctionIdauctionStartTime
uint256 auctionStartTimerevealTime
uint256 revealTimeauctionEndTime
uint256 auctionEndTimeminimumTenderAmount
uint256 minimumTenderAmountdayCountFractionMantissa
uint256 dayCountFractionMantissapurchaseToken
address purchaseTokencollateralTokens
mapping(contract IERC20Upgradeable => bool) collateralTokenstermRepoCollateralManager
contract ITermRepoCollateralManager termRepoCollateralManagertermRepoServicer
contract ITermRepoServicer termRepoServicertermPriceOracle
contract ITermPriceOracle termPriceOracleemitter
contract ITermEventEmitter emittertermAuction
contract ITermAuction termAuctionbids
mapping(bytes32 => struct TermAuctionBid) bidsbidCount
uint256 bidCounttermContractPaired
bool termContractPairedlockingPaused
bool lockingPausedunlockingPaused
bool unlockingPausedonlyWhileAuctionOpen
modifier onlyWhileAuctionOpen()onlyWhileAuctionRevealing
modifier onlyWhileAuctionRevealing()onlyBidder
modifier onlyBidder(address bidder, address authedUser)whenLockingNotPaused
modifier whenLockingNotPaused()whenUnlockingNotPaused
modifier whenUnlockingNotPaused()notTermContractPaired
modifier notTermContractPaired()constructor
constructor() publicinitialize
function initialize(string termRepoId_, string auctionId_, uint256 auctionStartTime_, uint256 revealTime_, uint256 auctionEndTime_, uint256 redemptionTimestamp_, uint256 minimumTenderAmount_, address purchaseToken_, contract IERC20Upgradeable[] collateralTokens_, address termInitializer_) externalpairTermContracts
function pairTermContracts(address termAuction_, contract ITermRepoServicer termRepoServicer_, contract ITermEventEmitter emitter_, contract ITermRepoCollateralManager termRepoCollateralManager_, contract ITermPriceOracle termPriceOracle_, address devopsMultisig_, address adminWallet_) externalpairRolloverManager
function pairRolloverManager(address rolloverManager) externalParameters
rolloverManager
address
The address of the TermRepoRolloverManager contract
lockBidsWithReferral
function lockBidsWithReferral(struct TermAuctionBidSubmission[] bidSubmissions, address referralAddress) external returns (bytes32[])Parameters
bidSubmissions
struct TermAuctionBidSubmission[]
An array of Term Auction bid submissions to borrow an amount of money at rate up to but not exceeding the bid rate
referralAddress
address
A user address that referred the submitter of this bid
Return Values
[0]
bytes32[]
A bytes32 array of unique on chain bid ids.
lockRolloverBid
function lockRolloverBid(struct TermAuctionBid bid) externalParameters
bid
struct TermAuctionBid
A struct containing details of the bid
lockBids
function lockBids(struct TermAuctionBidSubmission[] bidSubmissions) external returns (bytes32[])Parameters
bidSubmissions
struct TermAuctionBidSubmission[]
An array of bid submissions
Return Values
[0]
bytes32[]
A bytes32 array of unique on chain bid ids.
lockedBid
function lockedBid(bytes32 id) external view returns (struct TermAuctionBid)Parameters
id
bytes32
A bid Id
Return Values
[0]
struct TermAuctionBid
A struct containing details of the locked bid
revealBids
function revealBids(bytes32[] ids, uint256[] prices, uint256[] nonces) externalParameters
ids
bytes32[]
An array of bid ids of the bids to reveal
prices
uint256[]
An array of the bid prices to reveal
nonces
uint256[]
An array of nonce values to generate bid price hashes
unlockBids
function unlockBids(bytes32[] ids) externalunlockBids unlocks multiple bids and returns funds to the bidder
Parameters
ids
bytes32[]
An array of ids to unlock
getAllBids
function getAllBids(bytes32[] revealedBids, bytes32[] expiredRolloverBids, bytes32[] unrevealedBids) external returns (struct TermAuctionRevealedBid[], struct TermAuctionBid[])Parameters
revealedBids
bytes32[]
An array of the revealed offer ids
expiredRolloverBids
bytes32[]
An array of the expired rollover bid ids
unrevealedBids
bytes32[]
An array of the unrevealed offer ids
Return Values
[0]
struct TermAuctionRevealedBid[]
An array of TermAuctionRevealedBid structs containing details of the revealed bids
[1]
struct TermAuctionBid[]
An array of TermAuctionBid structs containing details of the unrevealed bids
auctionUnlockBid
function auctionUnlockBid(bytes32 id, address bidder, address[] bidCollateralTokens, uint256[] amounts) externalParameters
id
bytes32
A bytes32 bid id
bidder
address
The address of the bidder
bidCollateralTokens
address[]
The addresses of the token used as collateral
amounts
uint256[]
The amounts of collateral tokens to unlock
_lock
function _lock(struct TermAuctionBidSubmission bidSubmission, address authedUser) internal returns (struct TermAuctionBid)_lockRolloverBid
function _lockRolloverBid(struct TermAuctionBid bid) internal_unlock
function _unlock(bytes32 id, address bidder, address[] bidCollateralTokens, uint256[] amounts) internal_revealBid
function _revealBid(bytes32 id, uint256 price, uint256 nonce) internal_getAllBids
function _getAllBids(bytes32[] revealedBids, bytes32[] expiredRolloverBids, bytes32[] unrevealedBids) internal returns (struct TermAuctionRevealedBid[], struct TermAuctionBid[])Parameters
revealedBids
bytes32[]
An array of the revealed offer ids
expiredRolloverBids
bytes32[]
An array of the expired rollover bid ids
unrevealedBids
bytes32[]
An array of the unrevealed offer ids
Return Values
[0]
struct TermAuctionRevealedBid[]
An array of TermAuctionRevealedBid structs containing details of the revealed bids
[1]
struct TermAuctionBid[]
An array of TermAuctionBid structs containing details of the unrevealed bids
_truncateBidStruct
function _truncateBidStruct(struct TermAuctionBid bid) internal pure returns (struct TermAuctionRevealedBid revealed)This does not check the hash of the revealed bid price
Parameters
bid
struct TermAuctionBid
The TermAuctionBid to convert to TermAuctionRevealedBid
_processRevealedBidsForValidity
function _processRevealedBidsForValidity(bytes32[] revealedBids, uint256 unrevealedBidCount) internal returns (struct TermAuctionBid[], uint256, uint256, uint256)_isRolloverStillValid
function _isRolloverStillValid(struct TermAuctionBid revealedBid, contract ITermRepoServicer pairOffServicer) internal returns (bool)_isInInitialCollateralShortFall
function _isInInitialCollateralShortFall(uint256 bidAmount, address[] collateralTokens_, uint256[] collateralAmounts) internal view returns (bool)_isInMaintenanceCollateralShortFall
function _isInMaintenanceCollateralShortFall(uint256 bidAmount, uint256 bidPrice, address[] collateralTokens_, uint256[] collateralAmounts) internal view returns (bool)_fillRevealedBidsForAuctionClearing
function _fillRevealedBidsForAuctionClearing(bytes32[] revealedBids, uint256 auctionBidCount) internal returns (struct TermAuctionRevealedBid[])_generateBidId
function _generateBidId(bytes32 id, address user) internal view returns (bytes32)_processBidForAuction
function _processBidForAuction(bytes32 id) internalpauseLocking
function pauseLocking() externalunpauseLocking
function unpauseLocking() externalpauseUnlocking
function pauseUnlocking() externalunpauseUnlocking
function unpauseUnlocking() external_authorizeUpgrade
function _authorizeUpgrade(address impl) internalrequired override by the OpenZeppelin UUPS module
Parameters
impl
address
new impl address for proxy upgrade
Last updated