MoC
Last updated
Last updated
View Source:
↗ Extends: , , , , ,
MoC - version: 0.1.10
Constants & Variables
Parameters
bucket
bytes32
Parameters
mocAddress
address
Arguments
Arguments
_state
enum IMoCState.States
Arguments
_state
enum IMoCState.States
Arguments
_state
enum IMoCState.States
Arguments
Arguments
bucket
bytes32
Arguments
bucket
bytes32
Arguments
bucket
bytes32
Arguments
Initializes the contract
Arguments
connectorAddress
address
MoCConnector contract address
governorAddress
address
Governor contract address
stopperAddress
address
Stopper contract address
startStoppable
bool
Indicates if the contract starts being unstoppable or not
Gets the RiskProx balance of an address
Returns
RiskProx balance of the address
Arguments
bucket
bytes32
Name of the bucket
account
address
Address
Gets the RedeemRequest at the queue index position
Returns
redeemer's address and amount he submitted
Arguments
index
uint256
queue position to get
Returns current redeem queue size
Returns
redeem queue size
Arguments
Returns the total amount of StableTokens in the redeem queue for redeemer
Returns
total amount of Docs in the redeem queue for redeemer
Arguments
redeemer
address
address for which ^ is computed
Creates or updates the amount of a StableToken redeem Request from the msg.sender
Arguments
stableTokenAmount
uint256
Amount of StableTokens to redeem on settlement [using mocPrecision]
Alters the redeem amount position for the redeemer
Arguments
isAddition
bool
true if adding amount to redeem, false to substract.
delta
uint256
the amount to add/substract to current position
⤾ overrides IMoC.addReserves
Adding tokens to the token reserve and C0 Bucket without minting any token. Could revert.
Arguments
tokenAmount
uint256
Amount to deposit.
Mints RiskPro and pays the comissions of the operation (retrocompatible function).
Arguments
resTokensToMint
uint256
Amount in ReserveToken to mint
Mints RiskPro and pays the comissions of the operation.
Arguments
resTokensToMint
uint256
Amount Reserve Tokens to spend in minting
vendorAccount
address
Vendor address
Redeems RiskPro Tokens and pays the comissions of the operation (retrocompatible function).
Arguments
riskProAmount
uint256
Amout in RiskPro
Redeems RiskPro Tokens and pays the comissions of the operation in ReserveTokens
Arguments
riskProAmount
uint256
Amout in RiskPro
vendorAccount
address
Vendor address
StableToken Doc tokens and pays the commisions of the operation (retrocompatible function).
Arguments
resTokensToMint
uint256
Amount in ReserveToken to mint
Mint StableToken tokens and pays the commisions of the operation
Arguments
resTokensToMint
uint256
Amount in ReserveTokens to mint
vendorAccount
address
Vendor address
Redeems RiskProx Tokens and pays the comissions of the operation in ReserveToken (retrocompatible function).
Arguments
bucket
bytes32
Bucket to reedem, for example X2
riskProxAmount
uint256
Amount in RiskProx
Redeems RiskProx Tokens and pays the comissions of the operation in ReserveTokens
Arguments
bucket
bytes32
Bucket to reedem, for example X2
riskProxAmount
uint256
Amount in RiskProx
vendorAccount
address
Vendor address
BUCKET riskProx riskProx (retrocompatible function).
Arguments
bucket
bytes32
Name of the bucket used
resTokensToMint
uint256
amount to mint on ReserveToken
BUCKET riskProx minting
Arguments
bucket
bytes32
Name of the bucket used
resTokensToMint
uint256
amount to mint on ReserveToken
vendorAccount
address
Vendor address
Redeems the requested amount for the msg.sender, or the max amount of free stableTokens possible (retrocompatible function).
Arguments
stableTokenAmount
uint256
Amount of StableTokens to redeem.
Redeems the requested amount for the msg.sender, or the max amount of free stableTokens possible.
Arguments
stableTokenAmount
uint256
Amount of StableTokens to redeem.
vendorAccount
address
Vendor address
Allow redeem on liquidation state, user StableTokens get burned and he receives the equivalent ReserveTokens if can be covered, or the maximum available*
Arguments
Moves the daily amount of interest rate to C0 bucket
Arguments
Pays the RiskPro interest and transfers it to the address mocInrate.riskProInterestAddress RiskPro interests = Nb (bucket 0) * riskProRate.
Arguments
Calculates RiskPro holders holder interest by taking the total amount of RBCs available on Bucket 0. RiskPro interests = Nb (bucket 0) * riskProRate.
Arguments
Gets the target address to transfer RiskPro Holders rate
Returns
Target address to transfer RiskPro Holders interest
Arguments
Gets the rate for RiskPro Holders
Returns
RiskPro Rate
Arguments
Gets the blockspan of RiskPro that represents the frecuency of RiskPro holders interest payment
Returns
returns power of bitProInterestBlockSpan
Arguments
Arguments
Arguments
Indicates if settlement is enabled
Returns
Returns true if blockSpan number of blocks has passed since last execution; otherwise false
Arguments
Checks if bucket liquidation is reached.
Returns
true if bucket liquidation is reached, false otherwise
Arguments
bucket
bytes32
Name of bucket.
Arguments
bucket
bytes32
Evaluates if liquidation state has been reached and runs liq if that's the case
Arguments
Runs all settlement process
Arguments
steps
uint256
Number of steps
⤾ overrides IMoC.sendToAddress
Public function to extract and send tokens from the reserve. Will return false if transfer reverts or fails.
Returns
False if RRC20 transfer fails or revert and true if succeeds*
Arguments
receiver
address
Account to which the tokens will be send
tokenAmount
uint256
Amount of tokens to send
Arguments
Transfer mint operation fees (commissions + vendor markup)
Arguments
sender
address
address of msg.sender
totalResTokensSpent
uint256
amount in ReserveToken spent
reserveTokenCommission
uint256
commission amount in ReserveToken
mocCommission
uint256
commission amount in MoC
vendorAccount
address
address of vendor
reserveTokenMarkup
uint256
vendor markup in ReserveToken
mocMarkup
uint256
vendor markup in MoC
Transfer operation fees in MoC (commissions + vendor markup)
Arguments
sender
address
address of msg.sender
mocCommission
uint256
commission amount in MoC
vendorAccount
address
address of vendor
mocMarkup
uint256
vendor markup in MoC
Transfer redeem operation fees (commissions + vendor markup)
Arguments
sender
address
address of msg.sender
reserveTokenCommission
uint256
commission amount in ReserveToken
mocCommission
uint256
commission amount in MoC
vendorAccount
address
address of vendor
reserveTokenMarkup
uint256
vendor markup in ReserveToken
mocMarkup
uint256
vendor markup in MoC
reserveTokenAmount
uint256
Transfer operation fees in ReserveToken (commissions + vendor markup)
Arguments
vendorAccount
address
address of vendor
reserveTokenCommission
uint256
commission amount in ReserveToken
reserveTokenMarkup
uint256
vendor markup in ReserveToken
Extracts tokens from the reserve and update mocState but reverts if token transfer fails
Arguments
receiver
address
Account to which the tokens will be send
tokenAmount
uint256
Amount to extract from reserve
Extracts tokens from the reserve
Arguments
receiver
address
Account from which the tokens will be taken
tokenAmount
uint256
Amount to deposit
Extracts tokens from the reserve and update mocState
Arguments
receiver
address
Account from which the tokens will be taken
tokenAmount
uint256
Amount to deposit
⚠ This has been deprecated since the from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⚠ This has been deprecated since the from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⚠ This has been deprecated since the from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⚠ This has been deprecated since the from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⚠ See the to understand how the behavior of this function has changed.
⚠ This has been deprecated since the from the protocol was approved, however it is necessary to maintain the contracts and their documentation for legacy support.
⚠ See the to understand how the behavior of this function has changed.