Work In Progress
Performs all the heavy lifting internally of
Determine the effective fee rate for the exchange, taking into considering swing trading.
feeRateForExchange(bytes32 sourceCurrencyKey, bytes32 destinationCurrencyKey) public view returns (uint)
Returns the maximum number of seconds remaining in the waiting period for all exchanges into the given synth (
currencyKey) by the account.
This number must be
0 in order for
settle() to succeed.
maxSecsLeftInWaitingPeriod(address account, bytes32 currencyKey) public view returns (uint)
Returns the total amount to be reclaimed or rebated for the given account and synth (
currencyKey). Note: this function can be called at any time, even while the waiting period has not expired.
settlementOwing(address account, bytes32 currencyKey) public view returns (uint reclaimAmount, uint rebateAmount)
Settle processes all exchanges into the given synth, calculating any
refunded amounts via
settlementOwing and burning any reclaim and issuing any refund. This function may be called by anyone - the
msg.sender is irrelevant.
settle(address from, bytes32 currencyKey) external returns (uint reclaimed, uint refunded)
- That the waiting period for this synth is