Skip to content

Liquidator

Description

Source: contracts/Liquidator.sol

Structs

LiquidationEntry

Source

Field Type Description
deadline uint256 TBA
caller address TBA

Variables

CONTRACT_NAME

Source

Type: bytes32

LIQUIDATION_CALLER

Source

Type: bytes32

LIQUIDATION_DEADLINE

Source

Type: bytes32

Constructor

constructor

Source

Details

Signature

constructor(address _owner, address _resolver)

Visibility

public

State Mutability

``

Views

calculateAmountToFixCollateral

Source

Details

Signature

calculateAmountToFixCollateral(uint256 debtBalance, uint256 collateral, uint256 penalty) view returns (uint256)

Visibility

external

State Mutability

view

flagReward

Source

Details

Signature

flagReward() view returns (uint256)

Visibility

external

State Mutability

view

getLiquidationCallerForAccount

Source

Details

Signature

getLiquidationCallerForAccount(address account) view returns (address)

Visibility

external

State Mutability

view

getLiquidationDeadlineForAccount

Source

Details

Signature

getLiquidationDeadlineForAccount(address account) view returns (uint256)

Visibility

external

State Mutability

view

isLiquidationDeadlinePassed

Source

Details

Signature

isLiquidationDeadlinePassed(address account) view returns (bool)

Visibility

external

State Mutability

view

isLiquidationOpen

Source

Details

Signature

isLiquidationOpen(address account, bool isSelfLiquidation) view returns (bool)

Visibility

external

State Mutability

view

issuanceRatio

Source

Details

Signature

issuanceRatio() view returns (uint256)

Visibility

external

State Mutability

view

liquidateReward

Source

Details

Signature

liquidateReward() view returns (uint256)

Visibility

external

State Mutability

view

liquidationCollateralRatio

Source

Details

Signature

liquidationCollateralRatio() view returns (uint256)

Visibility

external

State Mutability

view

liquidationDelay

Source

Details

Signature

liquidationDelay() view returns (uint256)

Visibility

external

State Mutability

view

liquidationEscrowDuration

Source

Details

Signature

liquidationEscrowDuration() view returns (uint256)

Visibility

external

State Mutability

view

liquidationPenalty

Source

Details

Signature

liquidationPenalty() view returns (uint256)

Visibility

external

State Mutability

view

liquidationRatio

Source

Details

Signature

liquidationRatio() view returns (uint256)

Visibility

external

State Mutability

view

resolverAddressesRequired

Source

Details

Signature

resolverAddressesRequired() view returns (bytes32[] addresses)

Visibility

public

State Mutability

view

selfLiquidationPenalty

Source

Details

Signature

selfLiquidationPenalty() view returns (uint256)

Visibility

external

State Mutability

view

Restricted Functions

removeAccountInLiquidation

Source

Details

Signature

removeAccountInLiquidation(address account)

Visibility

external

State Mutability

``

Modifiers

Internal Functions

_deadlinePassed

Source

Details

Signature

_deadlinePassed(uint256 deadline) view returns (bool)

Visibility

internal

State Mutability

view

_getKey

Source

Details

Signature

_getKey(bytes32 _scope, address _account) pure returns (bytes32)

Visibility

internal

State Mutability

pure

_getLiquidationEntryForAccount

Source

Details

Signature

_getLiquidationEntryForAccount(address account) view returns (struct Liquidator.LiquidationEntry _liquidation)

Visibility

internal

State Mutability

view

_hasEnoughSNX

Source

Details

Signature

_hasEnoughSNX(address account) view returns (bool)

Visibility

internal

State Mutability

view

_removeLiquidationEntry

Source

Details

Signature

_removeLiquidationEntry(address _account)

Visibility

internal

State Mutability

``

Emits

_storeLiquidationEntry

Source

Details

Signature

_storeLiquidationEntry(address _account, uint256 _deadline, address _caller)

Visibility

internal

State Mutability

``

exchangeRates

Source

Details

Signature

exchangeRates() view returns (contract IExchangeRates)

Visibility

internal

State Mutability

view

issuer

Source

Details

Signature

issuer() view returns (contract IIssuer)

Visibility

internal

State Mutability

view

synthetix

Source

Details

Signature

synthetix() view returns (contract ISynthetix)

Visibility

internal

State Mutability

view

systemStatus

Source

Details

Signature

systemStatus() view returns (contract ISystemStatus)

Visibility

internal

State Mutability

view

External Functions

checkAndRemoveAccountInLiquidation

Source

Details

Signature

checkAndRemoveAccountInLiquidation(address account)

Visibility

external

State Mutability

``

Requires

Modifiers

flagAccountForLiquidation

Source

Details

Signature

flagAccountForLiquidation(address account)

Visibility

external

State Mutability

``

Requires

Modifiers

Emits

Modifiers

onlyIssuer

Source

rateNotInvalid

Source

Signature: rateNotInvalid(bytes32 currencyKey)

Events

AccountFlaggedForLiquidation

Source

Signature: AccountFlaggedForLiquidation(address account, uint256 deadline)

AccountRemovedFromLiquidation

Source

Signature: AccountRemovedFromLiquidation(address account, uint256 time)