AccountingJob

Git Source

Inherits: Job, Authorizable, Modifiable, IAccountingJob

This contract contains rewarded methods to handle the accounting engine debt and surplus

State Variables

shouldWorkPopDebtFromQueue

Whether the pop debt from queue job should be worked

bool public shouldWorkPopDebtFromQueue;

shouldWorkAuctionDebt

Whether the auction debt job should be worked

bool public shouldWorkAuctionDebt;

shouldWorkAuctionSurplus

Whether the auction surplus job should be worked

bool public shouldWorkAuctionSurplus;

shouldWorkTransferExtraSurplus

Whether the transfer extra surplus job should be worked

bool public shouldWorkTransferExtraSurplus;

accountingEngine

Address of the AccountingEngine contract

IAccountingEngine public accountingEngine;

Functions

constructor

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

Parameters

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

workPopDebtFromQueue

Rewarded method to pop debt from the AccountingEngine's queue

function workPopDebtFromQueue(uint256 _debtBlockTimestamp) external reward;

Parameters

NameTypeDescription
_debtBlockTimestampuint256Timestamp of the debt block to pop

workAuctionDebt

Rewarded method to auction debt from the AccountingEngine

function workAuctionDebt() external reward;

workAuctionSurplus

Rewarded method to auction surplus from the AccountingEngine

function workAuctionSurplus() external reward;

workTransferExtraSurplus

Rewarded method to transfer surplus from the AccountingEngine

function workTransferExtraSurplus() external reward;

_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;