Skip to content

IExchanger

Description

Source: contracts/interfaces/IExchanger.sol

Structs

ExchangeEntry

Source

Field Type Description
sourceRate uint256 TBA
destinationRate uint256 TBA
destinationAmount uint256 TBA
exchangeFeeRate uint256 TBA
exchangeDynamicFeeRate uint256 TBA
roundIdForSrc uint256 TBA
roundIdForDest uint256 TBA
sourceAmountAfterSettlement uint256 TBA

ExchangeEntrySettlement

Source

Field Type Description
src bytes32 TBA
amount uint256 TBA
dest bytes32 TBA
reclaim uint256 TBA
rebate uint256 TBA
srcRoundIdAtPeriodEnd uint256 TBA
destRoundIdAtPeriodEnd uint256 TBA
timestamp uint256 TBA

Views

calculateAmountAfterSettlement

Source

Details

Signature

calculateAmountAfterSettlement(address from, bytes32 currencyKey, uint256 amount, uint256 refunded) view returns (uint256 amountAfterSettlement)

Visibility

external

State Mutability

view

dynamicFeeRateForExchange

Source

Details

Signature

dynamicFeeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) view returns (uint256 feeRate, bool tooVolatile)

Visibility

external

State Mutability

view

feeRateForExchange

Source

Details

Signature

feeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) view returns (uint256)

Visibility

external

State Mutability

view

getAmountsForExchange

Source

Details

Signature

getAmountsForExchange(uint256 sourceAmount, bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) view returns (uint256 amountReceived, uint256 fee, uint256 exchangeFeeRate)

Visibility

external

State Mutability

view

hasWaitingPeriodOrSettlementOwing

Source

Details

Signature

hasWaitingPeriodOrSettlementOwing(address account, bytes32 currencyKey) view returns (bool)

Visibility

external

State Mutability

view

isSynthRateInvalid

Source

Details

Signature

isSynthRateInvalid(bytes32 currencyKey) view returns (bool)

Visibility

external

State Mutability

view

lastExchangeRate

Source

Details

Signature

lastExchangeRate(bytes32 currencyKey) view returns (uint256)

Visibility

external

State Mutability

view

maxSecsLeftInWaitingPeriod

Source

Details

Signature

maxSecsLeftInWaitingPeriod(address account, bytes32 currencyKey) view returns (uint256)

Visibility

external

State Mutability

view

priceDeviationThresholdFactor

Source

Details

Signature

priceDeviationThresholdFactor() view returns (uint256)

Visibility

external

State Mutability

view

settlementOwing

Source

Details

Signature

settlementOwing(address account, bytes32 currencyKey) view returns (uint256 reclaimAmount, uint256 rebateAmount, uint256 numEntries)

Visibility

external

State Mutability

view

waitingPeriodSecs

Source

Details

Signature

waitingPeriodSecs() view returns (uint256)

Visibility

external

State Mutability

view

External Functions

exchange

Source

Details

Signature

exchange(address exchangeForAddress, address from, bytes32 sourceCurrencyKey, uint256 sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bool virtualSynth, address rewardAddress, bytes32 trackingCode) returns (uint256 amountReceived, contract IVirtualSynth vSynth)

Visibility

external

State Mutability

``

exchangeAtomically

Source

Details

Signature

exchangeAtomically(address from, bytes32 sourceCurrencyKey, uint256 sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress, bytes32 trackingCode, uint256 minAmount) returns (uint256 amountReceived)

Visibility

external

State Mutability

``

settle

Source

Details

Signature

settle(address from, bytes32 currencyKey) returns (uint256 reclaimed, uint256 refunded, uint256 numEntries)

Visibility

external

State Mutability

``