ICollateralBidActions

Git Source

Inherits: ICommonActions

Functions

buyCollateral

Buys collateral tokens from a collateral auction

This method will fail if the purchased amount is lower than the minimum, or the bid higher than the specified amount

function buyCollateral(
  address _coinJoin,
  address _collateralJoin,
  address _collateralAuctionHouse,
  uint256 _auctionId,
  uint256 _minCollateralAmount,
  uint256 _bidAmount
) external;

Parameters

NameTypeDescription
_coinJoinaddressAddress of the CoinJoin contract
_collateralJoinaddressAddress of the CollateralJoin contract
_collateralAuctionHouseaddressAddress of the CollateralAuctionHouse contract
_auctionIduint256Id of the auction to bid on
_minCollateralAmountuint256Minimum amount of collateral tokens to buy [wad]
_bidAmountuint256Amount of system coins to bid [wad]

Errors

ColActions_InvalidAdjustedBid

Throws if the adjusted bid is invalid

error ColActions_InvalidAdjustedBid();

ColActions_InsufficientCollateralReceived

Throws if the received collateral is less than the minimum

error ColActions_InsufficientCollateralReceived(uint256 _minCollateralAmount, uint256 _received);