Skip to content

Issuer

Description

This contract does all the heavy lifting of issuing and burning sUSD. It's used primarily to reduce the size of the Synthetix contract

Source: contracts/Issuer.sol

Architecture

Libraries

Inheritance Graph

graph TD Issuer[Issuer] --> MixinResolver[MixinResolver] MixinResolver[MixinResolver] --> Owned[Owned]

Synthetix architture graph

Details
  • FeePool: The Synthetix contract remits exchange fees as sUSD to the fee pool, and also uses it to keep track of historical issuance records for each issuer.
  • SynthetixState: This state contract stores the debt ledger and the current issuance information for synth issuers.

Constants

LAST_ISSUE_EVENT

Source

Type: bytes32

MAX_MINIMUM_STAKING_TIME

Source

Type: uint256

Variables

availableSynths

Source

Type: contract ISynth[]

minimumStakeTime

Source

Type: uint256

synths

Source

Type: mapping(bytes32 => contract ISynth)

synthsByAddress

Source

Type: mapping(address => bytes32)

Constructor

constructor

Source

Details

Signature

(address _owner, address _resolver)

Visibility

public

State Mutability

nonpayable

Views

anySynthOrSNXRateIsStale

Source

Details

Signature

anySynthOrSNXRateIsStale() returns (bool)

Visibility

external

State Mutability

view

availableCurrencyKeys

Source

Details

Signature

availableCurrencyKeys() returns (bytes32[])

Visibility

external

State Mutability

view

availableSynthCount

Source

Details

Signature

availableSynthCount() returns (uint256)

Visibility

external

State Mutability

view

canBurnSynths

Source

Details

Signature

canBurnSynths(address account) returns (bool)

Visibility

external

State Mutability

view

collateral

Source

Details

Signature

collateral(address account) returns (uint256)

Visibility

external

State Mutability

view

collateralisationRatio

Source

Details

Signature

collateralisationRatio(address _issuer) returns (uint256)

Visibility

external

State Mutability

view

collateralisationRatioAndAnyRatesStale

Source

Details

Signature

collateralisationRatioAndAnyRatesStale(address _issuer) returns (uint256, bool)

Visibility

external

State Mutability

view

debtBalanceOf

Source

Details

Signature

debtBalanceOf(address _issuer, bytes32 currencyKey) returns (uint256)

Visibility

external

State Mutability

view

lastIssueEvent

Source

Details

Signature

lastIssueEvent(address account) returns (uint256)

Visibility

external

State Mutability

view

maxIssuableSynths

Source

Details

Signature

maxIssuableSynths(address _issuer) returns (uint256)

Visibility

external

State Mutability

view

remainingIssuableSynths

Source

Details

Signature

remainingIssuableSynths(address _issuer) returns (uint256, uint256, uint256)

Visibility

external

State Mutability

view

totalIssuedSynths

Source

Details

Signature

totalIssuedSynths(bytes32 currencyKey, bool excludeEtherCollateral) returns (uint256)

Visibility

external

State Mutability

view

transferableSynthetixAndAnyRateIsStale

Source

Details

Signature

transferableSynthetixAndAnyRateIsStale(address account, uint256 balance) returns (uint256, bool)

Visibility

external

State Mutability

view

Restricted Functions

addSynth

Source

Details

Signature

addSynth(contract ISynth synth)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

burnSynths

Source

Details

Signature

burnSynths(address from, uint256 amount)

Visibility

external

State Mutability

nonpayable

Modifiers

burnSynthsOnBehalf

Source

Details

Signature

burnSynthsOnBehalf(address burnForAddress, address from, uint256 amount)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

burnSynthsToTarget

Source

Details

Signature

burnSynthsToTarget(address from)

Visibility

external

State Mutability

nonpayable

Modifiers

burnSynthsToTargetOnBehalf

Source

Details

Signature

burnSynthsToTargetOnBehalf(address burnForAddress, address from)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

issueMaxSynths

Source

Details

Signature

issueMaxSynths(address from)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

issueMaxSynthsOnBehalf

Source

Details

Signature

issueMaxSynthsOnBehalf(address issueForAddress, address from)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

issueSynths

Source

Details

Signature

issueSynths(address from, uint256 amount)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

issueSynthsOnBehalf

Source

Details

Signature

issueSynthsOnBehalf(address issueForAddress, address from, uint256 amount)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

liquidateDelinquentAccount

Source

Details

Signature

liquidateDelinquentAccount(address account, uint256 susdAmount, address liquidator) returns (uint256, uint256)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

removeSynth

Source

Details

Signature

removeSynth(bytes32 currencyKey)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setMinimumStakeTime

Source

Details

Signature

setMinimumStakeTime(uint256 _seconds)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

Internal Functions

_addToDebtRegister

Source

Details

Signature

_addToDebtRegister(address from, uint256 amount, uint256 existingDebt, uint256 totalDebtIssued)

Visibility

internal

State Mutability

nonpayable

_appendAccountIssuanceRecord

Source

Details

Signature

_appendAccountIssuanceRecord(address from)

Visibility

internal

State Mutability

nonpayable

_availableCurrencyKeysWithOptionalSNX

Source

Details

Signature

_availableCurrencyKeysWithOptionalSNX(bool withSNX) returns (bytes32[])

Visibility

internal

State Mutability

view

_burnSynths

Source

Details

Signature

_burnSynths(address from, uint256 amount)

Visibility

internal

State Mutability

nonpayable

Requires

_burnSynthsForLiquidation

Source

Details

Signature

_burnSynthsForLiquidation(address burnForAddress, address liquidator, uint256 amount, uint256 existingDebt, uint256 totalDebtIssued)

Visibility

internal

State Mutability

nonpayable

_burnSynthsToTarget

Source

Details

Signature

_burnSynthsToTarget(address from)

Visibility

internal

State Mutability

nonpayable

Requires

_canBurnSynths

Source

Details

Signature

_canBurnSynths(address account) returns (bool)

Visibility

internal

State Mutability

view

_collateral

Source

Details

Signature

_collateral(address account) returns (uint256)

Visibility

internal

State Mutability

view

_collateralisationRatio

Source

Details

Signature

_collateralisationRatio(address _issuer) returns (uint256, bool)

Visibility

internal

State Mutability

view

_debtBalanceOfAndTotalDebt

Source

Details

Signature

_debtBalanceOfAndTotalDebt(address _issuer, bytes32 currencyKey) returns (uint256, uint256, bool)

Visibility

internal

State Mutability

view

_internalBurnSynths

Source

Details

Signature

_internalBurnSynths(address from, uint256 amount, uint256 existingDebt, uint256 totalSystemValue, uint256 maxIssuableSynthsForAccount)

Visibility

internal

State Mutability

nonpayable

_internalIssueSynths

Source

Details

Signature

_internalIssueSynths(address from, uint256 amount, uint256 existingDebt, uint256 totalSystemDebt)

Visibility

internal

State Mutability

nonpayable

_lastIssueEvent

Source

Details

Signature

_lastIssueEvent(address account) returns (uint256)

Visibility

internal

State Mutability

view

_maxIssuableSynths

Source

Details

Signature

_maxIssuableSynths(address _issuer) returns (uint256)

Visibility

internal

State Mutability

view

_remainingIssuableSynths

Source

Details

Signature

_remainingIssuableSynths(address _issuer) returns (uint256, uint256, uint256, bool)

Visibility

internal

State Mutability

view

_removeFromDebtRegister

Source

Details

Signature

_removeFromDebtRegister(address from, uint256 amount, uint256 existingDebt, uint256 totalDebtIssued)

Visibility

internal

State Mutability

nonpayable

_setLastIssueEvent

Source

Details

Signature

_setLastIssueEvent(address account)

Visibility

internal

State Mutability

nonpayable

_totalIssuedSynths

Source

Details

Signature

_totalIssuedSynths(bytes32 currencyKey, bool excludeEtherCollateral) returns (uint256, bool)

Visibility

internal

State Mutability

view

delegateApprovals

Source

Details

Signature

delegateApprovals() returns (contract IDelegateApprovals)

Visibility

internal

State Mutability

view

etherCollateral

Source

Details

Signature

etherCollateral() returns (contract IEtherCollateral)

Visibility

internal

State Mutability

view

exchangeRates

Source

Details

Signature

exchangeRates() returns (contract IExchangeRates)

Visibility

internal

State Mutability

view

exchanger

Source

Details

Signature

exchanger() returns (contract IExchanger)

Visibility

internal

State Mutability

view

feePool

Source

Details

Signature

feePool() returns (contract IFeePool)

Visibility

internal

State Mutability

view

issuanceEternalStorage

Source

Details

Signature

issuanceEternalStorage() returns (contract IssuanceEternalStorage)

Visibility

internal

State Mutability

view

liquidations

Source

Details

Signature

liquidations() returns (contract ILiquidations)

Visibility

internal

State Mutability

view

rewardEscrow

Source

Details

Signature

rewardEscrow() returns (contract IRewardEscrow)

Visibility

internal

State Mutability

view

synthetix

Source

Details

Signature

synthetix() returns (contract ISynthetix)

Visibility

internal

State Mutability

view

synthetixERC20

Source

Details

Signature

synthetixERC20() returns (contract IERC20)

Visibility

internal

State Mutability

view

synthetixEscrow

Source

Details

Signature

synthetixEscrow() returns (contract IHasBalance)

Visibility

internal

State Mutability

view

synthetixState

Source

Details

Signature

synthetixState() returns (contract ISynthetixState)

Visibility

internal

State Mutability

view

Modifiers

onlySynthetix

Source

Events

MinimumStakeTimeUpdated

Source

Signature: MinimumStakeTimeUpdated(uint256 minimumStakeTime)

SynthAdded

Source

Signature: SynthAdded(bytes32 currencyKey, address synth)

SynthRemoved

Source

Signature: SynthRemoved(bytes32 currencyKey, address synth)