MoC
Last updated
Last updated
View Source:
↗ Extends: , , , ,
MoC - version: 0.1.12
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
⤾ overrides IMoC.
Fallback function
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 BProx balance of an address
Returns
BProx 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 Docs 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 Doc redeem Request from the msg.sender
Arguments
docAmount
uint256
Amount of Docs 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
Mints BPRO and pays the comissions of the operation (retrocompatible function).
Arguments
btcToMint
uint256
Amount in BTC to mint
Mints BPRO and pays the comissions of the operation.
Arguments
btcToMint
uint256
Amount in BTC to mint
vendorAccount
address payable
Vendor address
Redeems Bpro Tokens and pays the comissions of the operation (retrocompatible function).
Arguments
bproAmount
uint256
Amount in Bpro
Redeems Bpro Tokens and pays the comissions of the operation
Arguments
bproAmount
uint256
Amount in Bpro
vendorAccount
address payable
Vendor address
Mint Doc tokens and pays the commisions of the operation (retrocompatible function).
Arguments
btcToMint
uint256
Amount in RBTC to mint
Mint Doc tokens and pays the commisions of the operation
Arguments
btcToMint
uint256
Amount in RBTC to mint
vendorAccount
address payable
Vendor address
Redeems Bprox Tokens and pays the comissions of the operation in RBTC (retrocompatible function).
Arguments
bucket
bytes32
Bucket to reedem, for example X2
bproxAmount
uint256
Amount in Bprox
Redeems Bprox Tokens and pays the comissions of the operation in RBTC
Arguments
bucket
bytes32
Bucket to reedem, for example X2
bproxAmount
uint256
Amount in Bprox
vendorAccount
address payable
Vendor address
BUCKET bprox minting (retrocompatible function).
Arguments
bucket
bytes32
Name of the bucket used
btcToMint
uint256
amount to mint on RBTC
BUCKET bprox minting
Arguments
bucket
bytes32
Name of the bucket used
btcToMint
uint256
amount to mint on RBTC
vendorAccount
address payable
Vendor address
Redeems the requested amount for the msg.sender, or the max amount of free docs possible (retrocompatible function).
Arguments
docAmount
uint256
Amount of Docs to redeem.
Redeems the requested amount for the msg.sender, or the max amount of free docs possible.
Arguments
docAmount
uint256
Amount of Docs to redeem.
vendorAccount
address payable
Vendor address
Allow redeem on liquidation state, user DoCs get burned and he receives the equivalent BTCs if can be covered, or the maximum available
Arguments
Moves the daily amount of interest rate to C0 bucket
Arguments
Pays the BitPro interest and transfers it to the address mocInrate.bitProInterestAddress BitPro interests = Nb (bucket 0) * bitProRate.
Arguments
Calculates BitPro holders holder interest by taking the total amount of RBTCs available on Bucket 0. BitPro interests = Nb (bucket 0) * bitProRate.
Arguments
Gets the target address to transfer BitPro Holders rate
Returns
Target address to transfer BitPro Holders interest
Arguments
Gets the rate for BitPro Holders
Returns
BitPro Rate
Arguments
Gets the blockspan of BPRO that represents the frecuency of BitPro 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
Send RBTC to a user and update RbtcInSystem in MoCState
Returns
result of the transaction
Arguments
receiver
address payable
address of receiver
btcAmount
uint256
amount to transfer
Arguments
Transfer mint operation fees (commissions + vendor markup)
Arguments
sender
address payable
address of msg.sender
value
uint256
amount of msg.value
totalBtcSpent
uint256
amount in RBTC spent
btcCommission
uint256
commission amount in RBTC
mocCommission
uint256
commission amount in MoC
vendorAccount
address payable
address of vendor
btcMarkup
uint256
vendor markup in RBTC
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 payable
address of msg.sender
btcAmount
uint256
btcCommission
uint256
commission amount in RBTC
mocCommission
uint256
commission amount in MoC
vendorAccount
address payable
address of vendor
btcMarkup
uint256
vendor markup in RBTC
mocMarkup
uint256
vendor markup in MoC
Transfer operation fees in RBTC (commissions + vendor markup)
Arguments
vendorAccount
address payable
address of vendor
btcCommission
uint256
commission amount in RBTC
btcMarkup
uint256
vendor markup in RBTC
Transfer using transfer function and updates global RBTC register in MoCState
Arguments
receiver
address payable
address of receiver
btcAmount
uint256
amount in RBTC
Transfer using send function and updates global RBTC register in MoCState
Returns
Execution result
Arguments
receiver
address payable
address of receiver
btcAmount
uint256
amount in RBTC
⚠ 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.