Skip to content

EtherCollateralsUSD

Description

Source: contracts/EtherCollateralsUSD.sol

Architecture

Libraries

Inheritance Graph

graph TD EtherCollateralsUSD[EtherCollateralsUSD] --> Pausable[Pausable] EtherCollateralsUSD[EtherCollateralsUSD] --> MixinResolver[MixinResolver] Pausable[Pausable] --> Owned[Owned] MixinResolver[MixinResolver] --> Owned[Owned]

Structs

SynthLoanStruct

Source

Field Type Description
account address payable TBA
collateralAmount uint256 TBA
loanAmount uint256 TBA
mintingFee uint256 TBA
timeCreated uint256 TBA
loanID uint256 TBA
timeClosed uint256 TBA
loanInterestRate uint256 TBA
accruedInterest uint256 TBA
lastInterestAccrued uint40 TBA

Constants

COLLATERAL

Source

Type: bytes32

Variables

accountLoanLimit

Source

Type: uint256

accountOpenLoanCounter

Source

Type: mapping(address => uint256)

accountsSynthLoans

Source

Type: mapping(address => struct EtherCollateralsUSD.SynthLoanStruct[])

collateralizationRatio

Source

Type: uint256

interestPerSecond

Source

Type: uint256

interestRate

Source

Type: uint256

issueFeeRate

Source

Type: uint256

issueLimit

Source

Type: uint256

liquidationDeadline

Source

Type: uint256

liquidationPenalty

Source

Type: uint256

liquidationRatio

Source

Type: uint256

loanLiquidationOpen

Source

Type: bool

minLoanCollateralSize

Source

Type: uint256

totalIssuedSynths

Source

Type: uint256

totalLoansCreated

Source

Type: uint256

totalOpenLoanCount

Source

Type: uint256

Constructor

constructor

Source

Details

Signature

(address _owner, address _resolver)

Visibility

public

State Mutability

nonpayable

Views

accruedInterestOnLoan

Source

Details

Signature

accruedInterestOnLoan(uint256 _loanAmount, uint256 _seconds) returns (uint256)

Visibility

public

State Mutability

view

calculateAmountToLiquidate

Source

Details

Signature

calculateAmountToLiquidate(uint256 debtBalance, uint256 collateral) returns (uint256)

Visibility

public

State Mutability

view

collateralAmountForLoan

Source

Details

Signature

collateralAmountForLoan(uint256 loanAmount) returns (uint256)

Visibility

external

State Mutability

view

currentInterestOnLoan

Source

Details

Signature

currentInterestOnLoan(address _account, uint256 _loanID) returns (uint256)

Visibility

external

State Mutability

view

getContractInfo

Source

Details

Signature

getContractInfo() returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, uint256, bool)

Visibility

external

State Mutability

view

getLoan

Source

Details

Signature

getLoan(address _account, uint256 _loanID) returns (address, uint256, uint256, uint256, uint256, uint256, uint256, uint256)

Visibility

external

State Mutability

view

getLoanCollateralRatio

Source

Details

Signature

getLoanCollateralRatio(address _account, uint256 _loanID) returns (uint256)

Visibility

external

State Mutability

view

getMintingFee

Source

Details

Signature

getMintingFee(address _account, uint256 _loanID) returns (uint256)

Visibility

external

State Mutability

view

issuanceRatio

Source

Details

Signature

issuanceRatio() returns (uint256)

Visibility

public

State Mutability

view

loanAmountFromCollateral

Source

Details

Signature

loanAmountFromCollateral(uint256 collateralAmount) returns (uint256)

Visibility

public

State Mutability

view

openLoanIDsByAccount

Source

Details

Signature

openLoanIDsByAccount(address _account) returns (uint256[])

Visibility

external

State Mutability

view

timeSinceInterestAccrualOnLoan

Source

Details

Signature

timeSinceInterestAccrualOnLoan(address _account, uint256 _loanID) returns (uint256)

Visibility

external

State Mutability

view

totalFeesOnLoan

Source

Details

Signature

totalFeesOnLoan(address _account, uint256 _loanID) returns (uint256, uint256)

Visibility

external

State Mutability

view

Restricted Functions

setAccountLoanLimit

Source

Details

Signature

setAccountLoanLimit(uint256 _loanLimit)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setCollateralizationRatio

Source

Details

Signature

setCollateralizationRatio(uint256 ratio)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setInterestRate

Source

Details

Signature

setInterestRate(uint256 _interestRate)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setIssueFeeRate

Source

Details

Signature

setIssueFeeRate(uint256 _issueFeeRate)

Visibility

external

State Mutability

nonpayable

Modifiers

Emits

setIssueLimit

Source

Details

Signature

setIssueLimit(uint256 _issueLimit)

Visibility

external

State Mutability

nonpayable

Modifiers

Emits

setLiquidationRatio

Source

Details

Signature

setLiquidationRatio(uint256 _liquidationRatio)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setLoanLiquidationOpen

Source

Details

Signature

setLoanLiquidationOpen(bool _loanLiquidationOpen)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

setMinLoanCollateralSize

Source

Details

Signature

setMinLoanCollateralSize(uint256 _minLoanCollateralSize)

Visibility

external

State Mutability

nonpayable

Modifiers

Emits

Internal Functions

_checkLoanIsOpen

Source

Details

Signature

_checkLoanIsOpen(struct EtherCollateralsUSD.SynthLoanStruct _synthLoan)

Visibility

internal

State Mutability

pure

Requires

_loanCollateralRatio

Source

Details

Signature

_loanCollateralRatio(struct EtherCollateralsUSD.SynthLoanStruct _loan) returns (uint256, uint256, uint256)

Visibility

internal

State Mutability

view

_processInterestAndLoanPayment

Source

Details

Signature

_processInterestAndLoanPayment(uint256 interestPaid, uint256 loanAmountPaid)

Visibility

internal

State Mutability

nonpayable

_splitInterestLoanPayment

Source

Details

Signature

_splitInterestLoanPayment(uint256 _paymentAmount, uint256 _accruedInterest, uint256 _loanAmount) returns (uint256, uint256, uint256, uint256)

Visibility

internal

State Mutability

pure

exchangeRates

Source

Details

Signature

exchangeRates() returns (contract IExchangeRates)

Visibility

internal

State Mutability

view

feePool

Source

Details

Signature

feePool() returns (contract IFeePool)

Visibility

internal

State Mutability

view

synthsUSD

Source

Details

Signature

synthsUSD() returns (contract ISynth)

Visibility

internal

State Mutability

view

systemStatus

Source

Details

Signature

systemStatus() returns (contract ISystemStatus)

Visibility

internal

State Mutability

view

External Functions

closeLoan

Source

Details

Signature

closeLoan(uint256 loanID)

Visibility

external

State Mutability

nonpayable

Modifiers

depositCollateral

Source

Details

Signature

depositCollateral(address account, uint256 loanID)

Visibility

external

State Mutability

payable

Requires

Modifiers

Emits

liquidateLoan

Source

Details

Signature

liquidateLoan(address _loanCreatorsAddress, uint256 _loanID, uint256 _debtToCover)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

liquidateUnclosedLoan

Source

Details

Signature

liquidateUnclosedLoan(address _loanCreatorsAddress, uint256 _loanID)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

openLoan

Source

Details

Signature

openLoan(uint256 _loanAmount) returns (uint256)

Visibility

external

State Mutability

payable

Requires

Modifiers

Emits

repayLoan

Source

Details

Signature

repayLoan(address _loanCreatorsAddress, uint256 _loanID, uint256 _repayAmount)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

withdrawCollateral

Source

Details

Signature

withdrawCollateral(uint256 loanID, uint256 withdrawAmount)

Visibility

external

State Mutability

nonpayable

Requires

Modifiers

Emits

Modifiers

ETHRateNotInvalid

Source

Events

AccountLoanLimitUpdated

Source

Signature: AccountLoanLimitUpdated(uint256 loanLimit)

CollateralDeposited

Source

Signature: CollateralDeposited(address account, uint256 loanID, uint256 collateralAmount, uint256 collateralAfter)

CollateralWithdrawn

Source

Signature: CollateralWithdrawn(address account, uint256 loanID, uint256 amountWithdrawn, uint256 collateralAfter)

CollateralizationRatioUpdated

Source

Signature: CollateralizationRatioUpdated(uint256 ratio)

InterestRateUpdated

Source

Signature: InterestRateUpdated(uint256 interestRate)

IssueFeeRateUpdated

Source

Signature: IssueFeeRateUpdated(uint256 issueFeeRate)

IssueLimitUpdated

Source

Signature: IssueLimitUpdated(uint256 issueLimit)

LiquidationRatioUpdated

Source

Signature: LiquidationRatioUpdated(uint256 ratio)

LoanClosed

Source

Signature: LoanClosed(address account, uint256 loanID, uint256 feesPaid)

LoanCreated

Source

Signature: LoanCreated(address account, uint256 loanID, uint256 amount)

LoanLiquidated

Source

Signature: LoanLiquidated(address account, uint256 loanID, address liquidator)

LoanLiquidationOpenUpdated

Source

Signature: LoanLiquidationOpenUpdated(bool loanLiquidationOpen)

LoanPartiallyLiquidated

Source

Signature: LoanPartiallyLiquidated(address account, uint256 loanID, address liquidator, uint256 liquidatedAmount, uint256 liquidatedCollateral)

LoanRepaid

Source

Signature: LoanRepaid(address account, uint256 loanID, uint256 repaidAmount, uint256 newLoanAmount)

MinLoanCollateralSizeUpdated

Source

Signature: MinLoanCollateralSizeUpdated(uint256 minLoanCollateralSize)