auctioneer
Auctioneer contract client for interacting with the Autonity Protocol Auctioneer. Provides methods to bid on debt liquidations and interest auctions, and read auction data.
Methods
bidDebt()
bidDebt(
debtor,
liquidatableRound,
ntnAmount): Promise<ContractTransactionResponse>
Place a bid to liquidate a CDP that is undercollateralized.
The caller must send the debt amount in ATN (via msg.value), and ntnAmount must be less than or equal to maxLiquidationReturn for the caller to successfully execute a liquidation.
Parameters
Parameter | Type | Description |
---|---|---|
debtor | AddressLike | The address of the CDP owner |
liquidatableRound | BigNumberish | The earliest round in which the CDP was liquidatable |
ntnAmount | BigNumberish | The amount of NTN to receive in exchange for paying off the debt |
Returns
Promise
<ContractTransactionResponse
>
Promise resolving to the transaction response
bidInterest()
bidInterest(auction, ntnAmount): Promise<ContractTransactionResponse>
Place a bid on an interest auction.
Parameters
Parameter | Type | Description |
---|---|---|
auction | BigNumberish | The ID of the auction |
ntnAmount | BigNumberish | The amount of NTN to pay for the interest (must be greater than or equal to minInterestPayment) |
Returns
Promise
<ContractTransactionResponse
>
Promise resolving to the transaction response
getAuction()
getAuction(auction): Promise<Auction>
Get an auction by ID.
Parameters
Parameter | Type | Description |
---|---|---|
auction | BigNumberish | The ID of the auction |
Returns
Promise
<Auction
>
Promise resolving to the auction data
getCollateralToken()
getCollateralToken(): Promise<string>
Get the address of the collateral token.
Returns
Promise
<string
>
Promise resolving to the address of the collateral token
getConfig()
getConfig(): Promise<Config>
Get the current Auctioneer configuration.
Returns
Promise
<Config
>
Promise resolving to the current configuration
getProceedAddress()
getProceedAddress(): Promise<string>
Get the proceed address.
Returns
Promise
<string
>
Promise resolving to the proceed address
maxLiquidationReturn()
maxLiquidationReturn(debtor, liquidatableRounds): Promise<bigint>
Get the maximum amount of NTN that can be returned to a liquidator for a given CDP.
Parameters
Parameter | Type | Description |
---|---|---|
debtor | AddressLike | The address of the CDP owner |
liquidatableRounds | BigNumberish | The earliest round in which the CDP was liquidatable |
Returns
Promise
<bigint
>
Promise resolving to the maximum liquidation return amount
minInterestPayment()
minInterestPayment(auction): Promise<bigint>
Get the minimum amount of NTN that can be paid for an interest auction.
Parameters
Parameter | Type | Description |
---|---|---|
auction | BigNumberish | The ID of the auction |
Returns
Promise
<bigint
>
Promise resolving to the minimum interest payment amount
openAuctions()
openAuctions(): Promise<Auction[]>
Get all open interest auctions.
Returns
Promise
<Auction
[]>
Promise resolving to an array of all open interest auctions