Gets ReserveTokens in RiskPro within specified bucket
Returns
ReserveToken amount of RiskPro in Bucket [using reservePrecision].
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
getReservesRemainder
⤾ overrides IMoCState.getReservesRemainder
Gets the ReserveTokens in the contract that not corresponds to StableToken collateral
Returns
ReserveTokens remainder [using reservePrecision].
Arguments
coverage
⤾ overrides IMoCState.coverage
BUCKET Coverage
Returns
coverage [using mocPrecision]
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
abundanceRatio
⤾ overrides IMoCState.abundanceRatio
Abundance ratio, receives tha amount of stableToken to use the value of stableToken0 and StableToken total supply
Returns
abundance ratio [using mocPrecision]
Arguments
Name
Type
Description
stableToken0
uint256
currentAbundanceRatio
⤾ overrides IMoCState.currentAbundanceRatio
Relation between stableTokens in bucket 0 and StableToken total supply
Returns
abundance ratio [using mocPrecision]
Arguments
leverage
⤾ overrides IMoCState.leverage
BUCKET Leverage
Returns
leverage [using mocPrecision]
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
globalMaxStableToken
GLOBAL maxStableToken
Returns
maxStableToken to issue [using mocPrecision]
Arguments
freeStableToken
⤾ overrides IMoCState.freeStableToken
Returns the amount of stableTokens in bucket 0, that can be redeemed outside of settlement
Returns
amount of stableTokens in bucket 0, that can be redeemed outside of settlement [using mocPrecision]
Arguments
maxStableToken
BUCKET maxStableToken
Returns
maxStableToken to issue [using mocPrecision]
Arguments
Name
Type
Description
bucket
bytes32
globalMaxRiskPro
GLOBAL maxRiskPro
Returns
maxRiskPro for redeem [using mocPrecision].
Arguments
absoluteMaxStableToken
⤾ overrides IMoCState.absoluteMaxStableToken
ABSOLUTE maxStableToken
Returns
maxStableToken to issue [using mocPrecision]
Arguments
maxRiskPro
BUCKET maxRiskPro to redeem / mint
Returns
maxRiskPro for redeem [using mocPrecision].
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
maxRiskProx
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
GLOBAL max riskProx to mint
Returns
maxRiskProx [using mocPrecision]
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
maxRiskProxResTokenValue
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⤾ overrides IMoCState.maxRiskProxResTokenValue
GLOBAL max riskProx to mint
Returns
maxRiskProx ReserveTokens value to mint [using reservePrecision]
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
absoluteMaxRiskPro
⤾ overrides IMoCState.absoluteMaxRiskPro
ABSOLUTE maxRiskPro
Returns
maxStableToken to issue [using mocPrecision].
Arguments
maxRiskProWithDiscount
⤾ overrides IMoCState.maxRiskProWithDiscount
DISCOUNT maxRiskPro
Returns
maxRiskPro for mint with discount [using mocPrecision]
ReserveTokens price of RiskPro with spot discount applied
Returns
the RiskPro Tec Price [using reservePrecision].
Arguments
riskProUsdPrice
RiskPro USD PRICE
Returns
the RiskPro USD Price [using mocPrecision]
Arguments
maxRiskProxRiskProValue
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
GLOBAL max riskProx to mint
Returns
max RiskPro allowed to be spent to mint RiskProx [using reservePrecision]
Arguments
Name
Type
Description
bucket
bytes32
Name of the bucket used
riskProxRiskProPrice
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
sets the value of the utpdu threshold configuration param
Arguments
Name
Type
Description
_utpdu
uint256
Universal TPro discount sales coverage threshold
getPeg
returns the relation between StableToken and dollar. By default it is 1.
Returns
peg relation between StableToken and dollar
Arguments
setPeg
sets the relation between StableToken and dollar. By default it is 1.
Arguments
Name
Type
Description
_peg
uint256
relation between StableToken and dollar
getProtected
⤾ overrides IMoCState.getProtected
return the value of the protected threshold configuration param
Returns
protected threshold, currently 1.5
Arguments
setProtected
sets the value of the protected threshold configuration param
Arguments
Name
Type
Description
_protected
uint256
protected threshold
getLiquidationEnabled
returns if is liquidation enabled.
Returns
liquidationEnabled is liquidation enabled
Arguments
setLiquidationEnabled
returns if is liquidation enabled.
Arguments
Name
Type
Description
_liquidationEnabled
bool
is liquidation enabled
nextState
⤾ overrides IMoCState.nextState
Transitions to next state.
Arguments
setMaxMintRiskPro
Sets max mint RiskPro value
Arguments
Name
Type
Description
_maxMintRiskPro
uint256
[using mocPrecision]
getMaxMintRiskPro
return Max value posible to mint of RiskPro
Returns
maxMintRiskPro
Arguments
setMoCPriceProvider
Sets a new MoCProvider contract
Arguments
Name
Type
Description
mocProviderAddress
address
MoC price provider address
getMoCPriceProvider
Gets the MoCPriceProviderAddress
Returns
MoC price provider address
Arguments
getMoCPrice
⤾ overrides IMoCState.getMoCPrice
Gets the MoCPrice
Returns
MoC price
Arguments
setMoCToken
Sets the MoC token contract address
Arguments
Name
Type
Description
mocTokenAddress
address
MoC token contract address
getMoCToken
⤾ overrides IMoCState.getMoCToken
Gets the MoC token contract address
Returns
MoC token contract address
Arguments
setMoCVendors
Sets the MoCVendors contract address
Arguments
Name
Type
Description
mocVendorsAddress
address
MoCVendors contract address
getMoCVendors
⤾ overrides IMoCState.getMoCVendors
Gets the MoCVendors contract addfress
Returns
MoCVendors contract address
Arguments
stableTokensToResToken
⤾ overrides IMoCState.stableTokensToResToken
Arguments
Name
Type
Description
stableTokenAmount
uint256
resTokenToStableToken
⤾ overrides IMoCState.resTokenToStableToken
Arguments
Name
Type
Description
resTokensAmount
uint256
riskProxToResToken
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⤾ overrides IMoCState.riskProxToResToken
Arguments
Name
Type
Description
riskProxAmount
uint256
bucket
bytes32
riskProxToResTokenHelper
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
Arguments
Name
Type
Description
riskProxAmount
uint256
bucket
bytes32
resTokenToRiskProx
⚠ This has been deprecated since the Proposal to remove leveraged positions from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⤾ overrides IMoCState.resTokenToRiskProx
Arguments
Name
Type
Description
resTokensAmount
uint256
bucket
bytes32
setMoCTokenInternal
Sets the MoC token contract address (internal function)
Arguments
Name
Type
Description
mocTokenAddress
address
MoC token contract address
setMoCVendorsInternal
Sets the MoCVendors contract address (internal function)
Arguments
Name
Type
Description
mocVendorsAddress
address
MoCVendors contract address
setLiquidationPrice
Calculates price at liquidation event as the relation between the stableToken total supply and the amount of ReserveTokens available to distribute