LiquidationJob
Inherits: Authorizable, Modifiable, Job, 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) validParams;
Parameters
Name | Type | Description |
---|---|---|
_liquidationEngine | address | Address of the LiquidationEngine contract |
_stabilityFeeTreasury | address | Address of the StabilityFeeTreasury contract |
_rewardAmount | uint256 | Amount of tokens to reward per job transaction [wad] |
workLiquidation
Rewarded method to liquidate a SAFE
function workLiquidation(bytes32 _cType, address _safe) external reward;
Parameters
Name | Type | Description |
---|---|---|
_cType | bytes32 | Bytes32 representation of the collateral type |
_safe | address | Address 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(Job, Modifiable);
_validateParameters
Internal function to be overriden with custom logic to validate parameters
function _validateParameters() internal view override(Job, Modifiable);