LiquidatorBase.sol
LiquidatorBase
factory
contract IChromaticMarketFactory factory
OnlyAccessableByDao
error OnlyAccessableByDao()
Throws an error indicating that the caller is not the DAO.
OnlyAccessableByMarket
error OnlyAccessableByMarket()
Throws an error indicating that the caller is not a registered market.
onlyDao
modifier onlyDao()
Modifier to restrict access to only the DAO.
Throws an OnlyAccessableByDao
error if the caller is not the DAO.
onlyMarket
modifier onlyMarket()
Modifier to check if the calling contract is a registered market.
Throws an OnlyAccessableByMarket
error if the caller is not a registered market.
constructor
constructor(contract IChromaticMarketFactory _factory) internal
Constructor function.
Parameters:
Name Type Description _factory contract IChromaticMarketFactory The address of the Chromatic Market Factory contract.
liquidate
function liquidate(address market, uint256 positionId) public
Liquidates a position in a market.
Parameters:
Name Type Description market address The address of the market contract. positionId uint256 The ID of the position to be liquidated.
claimPosition
function claimPosition(address market, uint256 positionId) public
Claims a position in a market.
Parameters:
Name Type Description market address The address of the market contract. positionId uint256 The ID of the position to be claimed.
_getFeeInfo
function _getFeeInfo() internal view virtual returns (uint256 fee, address feePayee)