Skip to content

ExchangerWithFeeRecAlternatives

Description

Source: contracts/ExchangerWithFeeRecAlternatives.sol

Structs

ExchangeVolumeAtPeriod

Source

Field Type Description
time uint64 TBA
volume uint192 TBA

Variables

CONTRACT_NAME

Source

Type: bytes32

lastAtomicVolume

Source

Type: struct ExchangerWithFeeRecAlternatives.ExchangeVolumeAtPeriod

Constructor

constructor

Source

Details

Signature

constructor(address _owner, address _resolver)

Visibility

public

State Mutability

``

Views

atomicMaxVolumePerBlock

Source

Details

Signature

atomicMaxVolumePerBlock() view returns (uint256)

Visibility

external

State Mutability

view

feeRateForAtomicExchange

Source

Details

Signature

feeRateForAtomicExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) view returns (uint256 exchangeFeeRate)

Visibility

external

State Mutability

view

getAmountsForAtomicExchange

Source

Details

Signature

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

Visibility

external

State Mutability

view

resolverAddressesRequired

Source

Details

Signature

resolverAddressesRequired() view returns (bytes32[] addresses)

Visibility

public

State Mutability

view

Restricted Functions

exchangeAtomically

Source

Details

Signature

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

Visibility

external

State Mutability

``

Modifiers

Internal Functions

_checkAndUpdateAtomicVolume

Source

Details

Signature

_checkAndUpdateAtomicVolume(uint256 sourceSusdValue)

Visibility

internal

State Mutability

``

Requires

_createVirtualSynth

Source

Details

Signature

_createVirtualSynth(contract IERC20 synth, address recipient, uint256 amount, bytes32 currencyKey) returns (contract IVirtualSynth)

Visibility

internal

State Mutability

``

Requires

Emits

_exchangeAtomically

Source

Details

Signature

_exchangeAtomically(address from, bytes32 sourceCurrencyKey, uint256 sourceAmount, bytes32 destinationCurrencyKey, address destinationAddress) returns (uint256 amountReceived, uint256 fee)

Visibility

internal

State Mutability

``

Requires

_feeRateForAtomicExchange

Source

Details

Signature

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

Visibility

internal

State Mutability

view

_getAmountsForAtomicExchangeMinusFees

Source

Details

Signature

_getAmountsForAtomicExchangeMinusFees(uint256 sourceAmount, bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) view returns (uint256 amountReceived, uint256 fee, uint256 exchangeFeeRate, uint256 systemConvertedAmount, uint256 systemSourceRate, uint256 systemDestinationRate)

Visibility

internal

State Mutability

view

_virtualSynthMastercopy

Source

Details

Signature

_virtualSynthMastercopy() view returns (address)

Visibility

internal

State Mutability

view

Events

VirtualSynthCreated

Source

Signature: VirtualSynthCreated(address synth, address recipient, address vSynth, bytes32 currencyKey, uint256 amount)