MoC
View Source: contracts/MoC.sol
↗ Extends: MoCEvents, MoCLibConnection, MoCBase, Stoppable, IMoC
MoC - version: 0.1.12
Contract Members
Constants & Variables
BucketLiquidation
Parameters
ContractLiquidated
Parameters
Modifiers
whenSettlementReady
Arguments
atState
Arguments
atLeastState
Arguments
atMostState
Arguments
notInProtectionMode
Arguments
bucketStateTransition
Arguments
availableBucket
Arguments
notBaseBucket
Arguments
transitionState
Arguments
Functions
⤾ overrides IMoC.
Fallback function
Arguments
initialize
Initializes the contract
Arguments
bproxBalanceOf
⚠ 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.
Gets the BProx balance of an address
Returns
BProx balance of the address
Arguments
getRedeemRequestAt
Gets the RedeemRequest at the queue index position
Returns
redeemer's address and amount he submitted
Arguments
redeemQueueSize
Returns current redeem queue size
Returns
redeem queue size
Arguments
docAmountToRedeem
Returns the total amount of Docs in the redeem queue for redeemer
Returns
total amount of Docs in the redeem queue for redeemer
Arguments
redeemDocRequest
Creates or updates the amount of a Doc redeem Request from the msg.sender
Arguments
alterRedeemRequestAmount
Alters the redeem amount position for the redeemer
Arguments
mintBPro
Mints BPRO and pays the comissions of the operation (retrocompatible function).
Arguments
mintBProVendors
Mints BPRO and pays the comissions of the operation.
Arguments
redeemBPro
Redeems Bpro Tokens and pays the comissions of the operation (retrocompatible function).
Arguments
redeemBProVendors
Redeems Bpro Tokens and pays the comissions of the operation
Arguments
mintDoc
Mint Doc tokens and pays the commisions of the operation (retrocompatible function).
Arguments
mintDocVendors
Mint Doc tokens and pays the commisions of the operation
Arguments
redeemBProx
⚠ 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.
Redeems Bprox Tokens and pays the comissions of the operation in RBTC (retrocompatible function).
Arguments
redeemBProxVendors
⚠ 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.
Redeems Bprox Tokens and pays the comissions of the operation in RBTC
Arguments
mintBProx
⚠ 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.
⚠ See the approved technical proposal to understand how the behavior of this function has changed.
BUCKET bprox minting (retrocompatible function).
Arguments
mintBProxVendors
⚠ 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.
⚠ See the approved technical proposal to understand how the behavior of this function has changed.
BUCKET bprox minting
Arguments
redeemFreeDoc
Redeems the requested amount for the msg.sender, or the max amount of free docs possible (retrocompatible function).
Arguments
redeemFreeDocVendors
Redeems the requested amount for the msg.sender, or the max amount of free docs possible.
Arguments
redeemAllDoc
Allow redeem on liquidation state, user DoCs get burned and he receives the equivalent BTCs if can be covered, or the maximum available
Arguments
dailyInratePayment
Moves the daily amount of interest rate to C0 bucket
Arguments
payBitProHoldersInterestPayment
Pays the BitPro interest and transfers it to the address mocInrate.bitProInterestAddress BitPro interests = Nb (bucket 0) * bitProRate.
Arguments
calculateBitProHoldersInterest
Calculates BitPro holders holder interest by taking the total amount of RBTCs available on Bucket 0. BitPro interests = Nb (bucket 0) * bitProRate.
Arguments
getBitProInterestAddress
Gets the target address to transfer BitPro Holders rate
Returns
Target address to transfer BitPro Holders interest
Arguments
getBitProRate
Gets the rate for BitPro Holders
Returns
BitPro Rate
Arguments
getBitProInterestBlockSpan
Gets the blockspan of BPRO that represents the frecuency of BitPro holders interest payment
Returns
returns power of bitProInterestBlockSpan
Arguments
isDailyEnabled
Arguments
isBitProInterestEnabled
Arguments
isSettlementEnabled
Indicates if settlement is enabled
Returns
Returns true if blockSpan number of blocks has passed since last execution; otherwise false
Arguments
isBucketLiquidationReached
Checks if bucket liquidation is reached.
Returns
true if bucket liquidation is reached, false otherwise
Arguments
evalBucketLiquidation
Arguments
evalLiquidation
Evaluates if liquidation state has been reached and runs liq if that's the case
Arguments
runSettlement
Runs all settlement process
Arguments
sendToAddress
⤾ overrides IMoC.sendToAddress
Send RBTC to a user and update RbtcInSystem in MoCState
Returns
result of the transaction
Arguments
liquidate
Arguments
transferCommissions
Transfer mint operation fees (commissions + vendor markup)
Arguments
transferMocCommission
Transfer operation fees in MoC (commissions + vendor markup)
Arguments
redeemWithCommission
Transfer redeem operation fees (commissions + vendor markup)
Arguments
transferBtcCommission
Transfer operation fees in RBTC (commissions + vendor markup)
Arguments
doTransfer
Transfer using transfer function and updates global RBTC register in MoCState
Arguments
doSend
Transfer using send function and updates global RBTC register in MoCState
Returns
Execution result
Arguments
Last updated