Depot

Depot

new Depot(contractSettings)

Source:
Parameters:
Name Type Description
contractSettings ContractSettings

Methods

acceptOwnership(txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
txParams TxParams

depositEndIndex()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

deposits(uint256)

Source:
Call (no gas consumed, doesn't require signer)
Parameters:
Name Type Description
uint256 BigNumber
Returns:
Object

depositStartIndex()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

depositSynths(amount, txParams)

Source:
DepositSynths: Allows users to deposit synths via the approve / transferFrom workflow if they'd like. You can equally just transfer synths to this contract and it will work exactly the same way but with one less call (and therefore cheaper transaction fees).
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
amount BigNumber
txParams TxParams

exchangeEtherForSynthetix(txParams)

Source:
Exchange ETH to SNX.
Transaction (consumes gas, requires signer)
Payable (to enter ETH amount set txParams.value)
Parameters:
Name Type Description
txParams TxParams
Returns:
BigNumber

exchangeEtherForSynthetixAtRate(guaranteedEtherRate, guaranteedSynthetixRate, txParams)

Source:
Exchange ETH to SNX while insisting on a particular set of rates. This allows a user to exchange while protecting against frontrunning by the contract owner on the exchange rates.
Transaction (consumes gas, requires signer)
Payable (to enter ETH amount set txParams.value)
Parameters:
Name Type Description
guaranteedEtherRate BigNumber
guaranteedSynthetixRate BigNumber
txParams TxParams
Returns:
BigNumber

exchangeEtherForSynths(txParams)

Source:
Exchange ETH to sUSD.
Transaction (consumes gas, requires signer)
Payable (to enter ETH amount set txParams.value)
Parameters:
Name Type Description
txParams TxParams
Returns:
BigNumber

exchangeEtherForSynthsAtRate(guaranteedRate, txParams)

Source:
Exchange ETH to sUSD while insisting on a particular rate. This allows a user to exchange while protecting against frontrunning by the contract owner on the exchange rate.
Transaction (consumes gas, requires signer)
Payable (to enter ETH amount set txParams.value)
Parameters:
Name Type Description
guaranteedRate BigNumber
txParams TxParams
Returns:
BigNumber

exchangeSynthsForSynthetix(synthAmount, txParams)

Source:
Exchange sUSD for SNX.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
synthAmount BigNumber
txParams TxParams
Returns:
BigNumber

exchangeSynthsForSynthetixAtRate(synthAmount, guaranteedRate, txParams)

Source:
Exchange sUSD for SNX while insisting on a particular rate. This allows a user to exchange while protecting against frontrunning by the contract owner on the exchange rate.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
synthAmount BigNumber
guaranteedRate BigNumber
txParams TxParams
Returns:
BigNumber

feePool()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

fundsWallet()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

initiateSelfDestruct(txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
txParams TxParams

initiationTime()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

lastPauseTime()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

lastPriceUpdateTime()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

minimumDepositAmount()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

nominatedOwner()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

nominateNewOwner(_owner, txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_owner String.<EthAddress>
txParams TxParams

oracle()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

ORACLE_FUTURE_LIMIT()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

owner()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

paused()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
boolean

pricesAreStale()

Source:
Check if the prices haven't been updated for longer than the stale period.
Call (no gas consumed, doesn't require signer)
Returns:
boolean

priceStalePeriod()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

selfDestruct(txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
txParams TxParams

SELFDESTRUCT_DELAY()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

selfDestructBeneficiary()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

selfDestructInitiated()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
boolean

setFundsWallet(_fundsWallet, txParams)

Source:
Set the funds wallet where ETH raised is held.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_fundsWallet String.<EthAddress>
txParams TxParams

setMinimumDepositAmount(_amount, txParams)

Source:
Set the minimum deposit amount required to depoist sUSD into the FIFO queue.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_amount BigNumber
txParams TxParams

setOracle(_oracle, txParams)

Source:
Set the Oracle that pushes the synthetix price to this contract.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_oracle String.<EthAddress>
txParams TxParams

setPaused(_paused, txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_paused boolean
txParams TxParams

setPriceStalePeriod(_time, txParams)

Source:
Set the stale period on the updated price variables.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_time BigNumber
txParams TxParams

setSelfDestructBeneficiary(_beneficiary, txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_beneficiary String.<EthAddress>
txParams TxParams

setSynth(_synth, txParams)

Source:
Set the Synth contract that the issuance controller uses to issue Synths.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_synth String.<EthAddress>
txParams TxParams

setSynthetix(_synthetix, txParams)

Source:
Set the Synthetix contract that the issuance controller uses to issue SNX.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
_synthetix String.<EthAddress>
txParams TxParams

smallDeposits(address)

Source:
Call (no gas consumed, doesn't require signer)
Parameters:
Name Type Description
address String.<EthAddress>
Returns:
BigNumber

synth()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

synthetix()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
String

synthetixReceivedForEther(amount)

Source:
Calculate how many SNX you will receive if you transfer an amount of ether.
Call (no gas consumed, doesn't require signer)
Parameters:
Name Type Description
amount BigNumber
Returns:
BigNumber

synthetixReceivedForSynths(amount)

Source:
Calculate how many SNX you will receive if you transfer an amount of synths.
Call (no gas consumed, doesn't require signer)
Parameters:
Name Type Description
amount BigNumber
Returns:
BigNumber

synthsReceivedForEther(amount)

Source:
Calculate how many synths you will receive if you transfer an amount of ether.
Call (no gas consumed, doesn't require signer)
Parameters:
Name Type Description
amount BigNumber
Returns:
BigNumber

terminateSelfDestruct(txParams)

Source:
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
txParams TxParams

tokenFallback(from, amount, data, txParams)

Source:
Triggers when users send us SNX or sUSD, but the modifier only allows sUSD calls to proceed.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
from String.<EthAddress>
amount BigNumber
data bytes
txParams TxParams
Returns:
boolean

totalSellableDeposits()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

updatePrices(newEthPrice, newSynthetixPrice, timeSent, txParams)

Source:
Access point for the oracle to update the prices of SNX / eth.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
newEthPrice BigNumber
newSynthetixPrice BigNumber
timeSent BigNumber
txParams TxParams

usdToEthPrice()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

usdToSnxPrice()

Source:
Call (no gas consumed, doesn't require signer)
Returns:
BigNumber

withdrawMyDepositedSynths(txParams)

Source:
Allows a user to withdraw all of their previously deposited synths from this contract if needed. Developer note: We could keep an index of address to deposits to make this operation more efficient but then all the other operations on the queue become less efficient. It's expected that this function will be very rarely used, so placing the inefficiency here is intentional. The usual use case does not involve a withdrawal.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
txParams TxParams

withdrawSynthetix(amount, txParams)

Source:
Allows the owner to withdraw SNX from this contract if needed.
Transaction (consumes gas, requires signer)
Parameters:
Name Type Description
amount BigNumber
txParams TxParams