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_PRICE

MAX_BID_COUNT

uint256 MAX_BID_COUNT

THREESIXTY_DAYCOUNT_SECONDS

uint256 THREESIXTY_DAYCOUNT_SECONDS

ADMIN_ROLE

bytes32 ADMIN_ROLE

AUCTIONEER_ROLE

bytes32 AUCTIONEER_ROLE

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

INITIALIZER_ROLE

bytes32 INITIALIZER_ROLE

ROLLOVER_MANAGER

bytes32 ROLLOVER_MANAGER

termRepoId

bytes32 termRepoId

termAuctionId

bytes32 termAuctionId

auctionStartTime

uint256 auctionStartTime

revealTime

uint256 revealTime

auctionEndTime

uint256 auctionEndTime

minimumTenderAmount

uint256 minimumTenderAmount

dayCountFractionMantissa

uint256 dayCountFractionMantissa

purchaseToken

address purchaseToken

collateralTokens

mapping(contract IERC20Upgradeable => bool) collateralTokens

termRepoCollateralManager

contract ITermRepoCollateralManager termRepoCollateralManager

termRepoServicer

contract ITermRepoServicer termRepoServicer

termPriceOracle

contract ITermPriceOracle termPriceOracle

emitter

contract ITermEventEmitter emitter

termAuction

contract ITermAuction termAuction

bids

mapping(bytes32 => struct TermAuctionBid) bids

bidCount

uint256 bidCount

termContractPaired

bool termContractPaired

lockingPaused

bool lockingPaused

unlockingPaused

bool unlockingPaused

onlyWhileAuctionOpen

modifier onlyWhileAuctionOpen()

onlyWhileAuctionRevealing

modifier onlyWhileAuctionRevealing()

onlyBidder

modifier onlyBidder(address bidder, address authedUser)

whenLockingNotPaused

modifier whenLockingNotPaused()

whenUnlockingNotPaused

modifier whenUnlockingNotPaused()

notTermContractPaired

modifier notTermContractPaired()

constructor

constructor() public

initialize

function initialize(string termRepoId_, string auctionId_, uint256 auctionStartTime_, uint256 revealTime_, uint256 auctionEndTime_, uint256 redemptionTimestamp_, uint256 minimumTenderAmount_, address purchaseToken_, contract IERC20Upgradeable[] collateralTokens_, address termInitializer_) external

pairTermContracts

function pairTermContracts(address termAuction_, contract ITermRepoServicer termRepoServicer_, contract ITermEventEmitter emitter_, contract ITermRepoCollateralManager termRepoCollateralManager_, contract ITermPriceOracle termPriceOracle_, address devopsMultisig_, address adminWallet_) external

pairRolloverManager

function pairRolloverManager(address rolloverManager) external

Parameters

lockBidsWithReferral

function lockBidsWithReferral(struct TermAuctionBidSubmission[] bidSubmissions, address referralAddress) external returns (bytes32[])

Parameters

Return Values

lockRolloverBid

function lockRolloverBid(struct TermAuctionBid bid) external

Parameters

lockBids

function lockBids(struct TermAuctionBidSubmission[] bidSubmissions) external returns (bytes32[])

Parameters

Return Values

lockedBid

function lockedBid(bytes32 id) external view returns (struct TermAuctionBid)

Parameters

Return Values

revealBids

function revealBids(bytes32[] ids, uint256[] prices, uint256[] nonces) external

Parameters

unlockBids

function unlockBids(bytes32[] ids) external

unlockBids unlocks multiple bids and returns funds to the bidder

Parameters

getAllBids

function getAllBids(bytes32[] revealedBids, bytes32[] expiredRolloverBids, bytes32[] unrevealedBids) external returns (struct TermAuctionRevealedBid[], struct TermAuctionBid[])

Parameters

Return Values

auctionUnlockBid

function auctionUnlockBid(bytes32 id, address bidder, address[] bidCollateralTokens, uint256[] amounts) external

Parameters

_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

Return Values

_truncateBidStruct

function _truncateBidStruct(struct TermAuctionBid bid) internal pure returns (struct TermAuctionRevealedBid revealed)

This does not check the hash of the revealed bid price

Parameters

_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) internal

pauseLocking

function pauseLocking() external

unpauseLocking

function unpauseLocking() external

pauseUnlocking

function pauseUnlocking() external

unpauseUnlocking

function unpauseUnlocking() external

_authorizeUpgrade

function _authorizeUpgrade(address impl) internal

required override by the OpenZeppelin UUPS module

Parameters

Last updated