MoCBProxManager
⚠ 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.
View Source: contracts/MoCBProxManager.sol
↗ Extends: MoCBucketContainer
MoCBProxManager - version: 0.1.12
Contract Members
Constants & Variables
Functions
initialize
Initializes the contract
Arguments
Name | Type | Description |
---|---|---|
connectorAddress | address | MoCConnector contract address |
_governor | address | Governor contract address |
_c0Cobj | uint256 | Bucket C0 objective coverage |
_x2Cobj | uint256 | Bucket X2 objective coverage |
bproxBalanceOf
returns user balance
Returns
total balance for the userAddress
Arguments
Name | Type | Description |
---|---|---|
bucket | bytes32 | BProx corresponding bucket to get balance from |
userAddress | address | user address to get balance from |
hasValidBalance
verifies that this user has assigned balance for the given bucket
Returns
true if the user has assigned balance
Arguments
Name | Type | Description |
---|---|---|
bucket | bytes32 | corresponding Leveraged bucket to get balance from |
userAddress | address | user address to verify balance for |
index | uint256 | index, starting from 1, where the address of the user is being kept |
assignBProx
Assigns the amount of BProx
Arguments
Name | Type | Description |
---|---|---|
bucket | bytes32 | bucket from which the BProx will be removed |
account | address payable | user address to redeem for |
bproxAmount | uint256 | bprox amount to redeem [using mocPresicion] |
totalCost | uint256 | btc value of bproxAmount [using reservePrecision] |
removeBProx
Removes the amount of BProx and substract BTC cost from bucket
Arguments
Name | Type | Description |
---|---|---|
bucket | bytes32 | bucket from which the BProx will be removed |
userAddress | address payable | user address to redeem for |
bproxAmount | uint256 | bprox amount to redeem [using mocPresicion] |
totalCost | uint256 | btc value of bproxAmount [using reservePrecision] |
setBProxBalanceOf
Sets the amount of BProx
Arguments
Name | Type | Description |
---|---|---|
bucket | bytes32 | bucket from which the BProx will be setted |
userAddress | address payable | user address to redeem for |
value | uint256 | bprox amount to redeem [using mocPresicion] |
initializeValues
intializes values of the contract
Arguments
Name | Type | Description |
---|---|---|
_governor | address | Governor contract address |
Last updated