Functions
A contract which facilitates the exchange of synthetic assets for their underlying
Structs
Account
Field | Type |
---|---|
| uint256 |
| uint256 |
| uint256 |
UpdateAccountParams
Field | Type |
---|---|
| address |
| int256 |
| int256 |
ExchangeCache
Field | Type |
---|---|
| uint256 |
| uint256 |
| uint256 |
ExchangeState
Field | Type |
---|---|
| uint256 |
| uint256 |
| uint256 |
| uint256 |
| struct FixedPointMath.Number |
| struct FixedPointMath.Number |
| struct FixedPointMath.Number |
UpdateAccountCache
Field | Type |
---|---|
| uint256 |
| uint256 |
| uint256 |
| uint256 |
| uint256 |
UpdateAccountState
Field | Type |
---|---|
| uint256 |
| uint256 |
| uint256 |
Functions
constructor
initialize
_onlyAdmin
setCollateralSource
setPause
deposit
Deposits tokens to be exchanged into an account.
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | The amount of tokens to deposit. |
| address | The owner of the account to deposit the tokens into. |
withdraw
Withdraws tokens from the caller's account that were previously deposited to be exchanged.
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | The amount of tokens to withdraw. |
| address | The address which will receive the withdrawn tokens. |
claim
Claims exchanged tokens.
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | The amount of tokens to claim. |
| address | The address which will receive the claimed tokens. |
exchange
Exchanges amount
underlying tokens for amount
synthetic tokens staked in the system.
Parameters:
Name | Type | Description |
---|---|---|
| uint256 | The amount of tokens to exchange. |
getUnexchangedBalance
Gets the unexchanged balance of an account.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the account owner. |
Return Values:
Name | Type | Description |
---|---|---|
| uint256 | unexchanged balance. |
getExchangedBalance
Gets the exchanged balance of an account, in units of debtToken
.
Parameters:
Name | Type | Description |
---|---|---|
| address | The address of the account owner. |
Return Values:
Name | Type | Description |
---|---|---|
| uint256 | exchanged balance. |
getClaimableBalance
_updateAccount
Updates an account.
Parameters:
Name | Type | Description |
---|---|---|
| struct TransmuterV2.UpdateAccountParams | The call 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:
Name | Type | Description |
---|---|---|
| uint256 | The amount of the debt token. |
Return Values:
Name | Type | Description |
---|---|---|
| uint256 | normalized amount. |
_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:
Name | Type | Description |
---|---|---|
| uint256 | The amount of the debt token. |
Return Values:
Name | Type | Description |
---|---|---|
| uint256 | normalized amount. |
_getExchangedBalance
Last updated