MoCSettlement
Last updated
Last updated
View Source:
↗ Extends: , , , , ↘ Derived Contracts:
MoCSettlement - version: 0.1.12
Constants & Variables
Parameters
redeemer
address
isAddition
bool
delta
uint256
Parameters
redeemer
address
commission
uint256
amount
uint256
Parameters
queueSize
uint256
accumCommissions
uint256
reservePrice
uint256
Parameters
leverage
uint256
riskProxPrice
uint256
reservePrice
uint256
startBlockNumber
uint256
Parameters
stableTokenRedeemCount
uint256
deleveragingCount
uint256
riskProxPrice
uint256
reservePrice
uint256
Parameters
commissionsPayed
uint256
Verify that the index is smaller than the length of the redeem request queue
Arguments
_index
uint256
queue position to get
Arguments
Initializes the contract
Arguments
connectorAddress
address
MoCConnector contract address
_governor
address
Governor contract address
_blockSpan
uint256
Blockspan configuration blockspan of settlement
Set the blockspan configuration blockspan of settlement
Arguments
bSpan
uint256
Set Settlement to be kept in finnished state after all execution is completed.
Arguments
Set Settlement state to Ready
Arguments
⤾ overrides IMoCSettlement.getRedeemRequestAt
Gets the RedeemRequest at the queue index position
Returns
redeemer's address and amount he submitted
Arguments
_index
uint256
queue position to get
Gets the number of blocks the settlemnet will be allowed to run
Arguments
⤾ overrides IMoCSettlement.redeemQueueSize
Returns the current redeem request queue's length
Arguments
⤾ overrides IMoCSettlement.isSettlementEnabled
Returns true if blockSpan number of blocks has pass since last execution
Arguments
Returns true if the settlment is running
Arguments
⤾ overrides IMoCSettlement.isSettlementReady
Returns true if the settlment is ready
Arguments
⤾ overrides IMoCSettlement.nextSettlementBlock
Returns the next block from which settlement is possible
Arguments
⤾ overrides IMoCSettlement.docAmountToRedeem
returns the total amount of Docs in the redeem queue for _who
Returns
total amount of Docs in the redeem queue for _who [using mocPrecision]
Arguments
_who
address
address for which ^ is computed
⤾ overrides IMoCSettlement.addRedeemRequest
push a new redeem request to the queue for the sender or updates the amount if the user has a redeem request
Arguments
amount
uint256
amount he is willing to redeem [using mocPrecision]
redeemer
address payable
redeemer address
empty the queue
Arguments
⤾ overrides IMoCSettlement.alterRedeemRequestAmount
Alters the redeem amount position for the redeemer
Returns
the filled amount [using mocPrecision]
Arguments
isAddition
bool
true if adding amount to redeem, false to substract.
delta
uint256
the amount to add/substract to current position [using mocPrecision]
redeemer
address
address to alter amount for
⤾ overrides IMoCSettlement.runSettlement
Runs settlement process in steps
Returns
The commissions collected in the executed steps
Arguments
steps
uint256
Amount of steps to run
Create Task structures for Settlement execution
Arguments
Arguments
Arguments
_governor
address
_blockSpan
uint256
Returns the amount of steps for the Deleveraging task which is the amount of active BProx addresses
Arguments
Returns the amount of steps for the Doc Redemption task which is the amount of redeem requests in the queue
Arguments
Freezes state for Settlement execution
Arguments
Execute final step of Settlement task group
Arguments
Execute final step of Deleveraging task
Arguments
Execute final step of DocRedemption task
Arguments
Individual Deleveraging step to be executed in partial execution uint256 parameter needed for PartialExecution
Arguments
uint256
Individual DocRedemption step to be executed in partial execution
Arguments
index
uint256
Step number currently in execution
Create Task structures for Settlement execution
Arguments
⤿ Overridden Implementation(s):