Functions
A contract which facilitates the exchange of synthetic assets for their underlying
Structs
Account
UpdateAccountParams
ExchangeCache
ExchangeState
UpdateAccountCache
UpdateAccountState
Functions
constructor
initialize
_onlyAdmin
setCollateralSource
setPause
deposit
Deposits tokens to be exchanged into an account.
Parameters:
withdraw
Withdraws tokens from the caller's account that were previously deposited to be exchanged.
Parameters:
claim
Claims exchanged tokens.
Parameters:
exchange
Exchanges amount
underlying tokens for amount
synthetic tokens staked in the system.
Parameters:
getUnexchangedBalance
Gets the unexchanged balance of an account.
Parameters:
Return Values:
getExchangedBalance
Gets the exchanged balance of an account, in units of debtToken
.
Parameters:
Return Values:
getClaimableBalance
_updateAccount
Updates an account.
Parameters:
_onlyWhitelisted
Reverts if msg.sender is not in the whitelist. Checks the whitelist for msg.sender.
_normalizeUnderlyingTokensToDebt
Normalize amount
of underlyingToken
to a value which is comparable to units of the debt token.
Parameters:
Return Values:
_normalizeDebtTokensToUnderlying
Normalize amount
of the debt token to a value which is comparable to units of underlyingToken
.
This operation will result in truncation of some of the least significant digits of amount
. This truncation amount will be the least significant N digits where N is the difference in decimals between the debt token and the underlying token.
Parameters:
Return Values:
_getExchangedBalance
Last updated