MoCHelperLibMock
MoCHelperLibMock - version: 0.1.12
Constants & Variables
struct MoCHelperLib.MocLibConfig internal mocLibConfig;
Parameters
Name | Type | Description |
---|---|---|
name | bytes32 | |
Constructor
function () public nonpayable
Arguments
function spotInrate(uint256 tMin, uint256 tMax, uint256 doc0, uint256 doct) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tMin | uint256 | |
tMax | uint256 | |
doc0 | uint256 | |
doct | uint256 | |
function maxBProWithDiscount(uint256 nB, uint256 nDoc, uint256 utpdu, uint256 peg, uint256 btcPrice, uint256 bproUsdPrice, uint256 spotDiscount) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nB | uint256 | |
nDoc | uint256 | |
utpdu | uint256 | |
peg | uint256 | |
btcPrice | uint256 | |
bproUsdPrice | uint256 | |
spotDiscount | uint256 | |
function inrateAvg(uint256 tMax, uint256 fact, uint256 tMin, uint256 abRat1, uint256 abRat2) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tMax | uint256 | |
fact | uint256 | |
tMin | uint256 | |
abRat1 | uint256 | |
abRat2 | uint256 | |
function avgInt(uint256 tMax, uint256 fact, uint256 tMin, uint256 abRat1, uint256 abRat2) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tMax | uint256 | |
fact | uint256 | |
tMin | uint256 | |
abRat1 | uint256 | |
abRat2 | uint256 | |
function potential(uint256 tMax, uint256 fact, uint256 tMin, uint256 abRat) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tMax | uint256 | |
fact | uint256 | |
tMin | uint256 | |
abRat | uint256 | |
function integral(uint256 tMax, uint256 fact, uint256 tMin, uint256 abRat) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
tMax | uint256 | |
fact | uint256 | |
tMin | uint256 | |
abRat | uint256 | |
function bproSpotDiscountRate(uint256 bproLiqDiscountRate, uint256 liq, uint256 utpdu, uint256 cov) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
bproLiqDiscountRate | uint256 | |
liq | uint256 | |
utpdu | uint256 | |
cov | uint256 | |
function bucketTransferAmountInfiniteLeverage(uint256 nB, uint256 delta) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nB | uint256 | |
delta | uint256 | |
function bucketTransferAmount(uint256 nB, uint256 lev) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nB | uint256 | |
lev | uint256 | |
function coverage(uint256 nB, uint256 lB) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nB | uint256 | |
lB | uint256 | |
function leverageFromCoverage(uint256 cov) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
cov | uint256 | |
function leverage(uint256 nB, uint256 lB) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nB | uint256 | |
lB | uint256 | |
⚠ 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.
function maxBProxBtcValue(uint256 nDoc, uint256 peg, uint256 btcPrice, uint256 lev) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nDoc | uint256 | |
peg | uint256 | |
btcPrice | uint256 | |
lev | uint256 | |
⚠ 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.
function maxBProxBtcValueInfiniteLeverage(uint256 nDoc, uint256 peg, uint256 btcPrice, uint256 delta) public view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
nDoc | uint256 | |
peg | uint256 | |
btcPrice | uint256 | |
delta | uint256 | |
Last modified 5mo ago