LiquidationJob

Git Source

Inherits: Job, Authorizable, Modifiable, ILiquidationJob

This contract contains rewarded methods to handle the SAFE liquidations

State Variables

shouldWork

Whether the liquidation job should be worked

bool public shouldWork;

liquidationEngine

Address of the LiquidationEngine contract

ILiquidationEngine public liquidationEngine;

Functions

constructor

constructor(
  address _liquidationEngine,
  address _stabilityFeeTreasury,
  uint256 _rewardAmount
) Job(_stabilityFeeTreasury, _rewardAmount) Authorizable(msg.sender);

Parameters

NameTypeDescription
_liquidationEngineaddressAddress of the LiquidationEngine contract
_stabilityFeeTreasuryaddressAddress of the StabilityFeeTreasury contract
_rewardAmountuint256Amount of tokens to reward per job transaction [wad]

workLiquidation

Rewarded method to liquidate a SAFE

function workLiquidation(bytes32 _cType, address _safe) external reward;

Parameters

NameTypeDescription
_cTypebytes32Bytes32 representation of the collateral type
_safeaddressAddress of the SAFE to liquidate

_modifyParameters

Internal function to be overriden with custom logic to modify parameters

This function is set to revert if not overriden

function _modifyParameters(bytes32 _param, bytes memory _data) internal override;