Skip to main content

AtomicCatalogue

Git Source

Inherits: IAtomicCatalogue, Catalogue

Contract that provides view and aggregation functions for atomic auctions without having to know the specific auction module address

Functions

constructor

constructor(address auctionHouse_) Catalogue(auctionHouse_);

payoutFor

Returns the payout for a given lot and amount

function payoutFor(uint96 lotId_, uint256 amount_) external view returns (uint256);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot
amount_uint256Amount of quoteToken to purchase with (in native decimals)

Returns

NameTypeDescription
<none>uint256payout Amount of baseToken (in native decimals) to be received by the buyer

priceFor

Returns the price for a given lot and payout

function priceFor(uint96 lotId_, uint256 payout_) external view returns (uint256);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot
payout_uint256Amount of baseToken (in native decimals) to be received by the buyer

Returns

NameTypeDescription
<none>uint256price The purchase price in terms of the quote token

maxPayout

Returns the max payout for a given lot

function maxPayout(uint96 lotId_) external view returns (uint256);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot

Returns

NameTypeDescription
<none>uint256payout The maximum amount of baseToken (in native decimals) that can be received by the buyer

maxAmountAccepted

Returns the max amount accepted for a given lot

function maxAmountAccepted(uint96 lotId_) external view returns (uint256);

Parameters

NameTypeDescription
lotId_uint96ID of the auction lot

Returns

NameTypeDescription
<none>uint256maxAmount The maximum amount of quoteToken (in native decimals) that can be accepted by the auction

_withFee

Adds a conservative fee estimate to priceFor or maxAmountAccepted calls

function _withFee(uint96 lotId_, uint256 price_) internal view returns (uint256 priceWithFee);