MoCHelperLibMock

View Source: contracts/mocks/MoCHelperLibMock.sol

MoCHelperLibMock - version: 0.1.12

Contract Members

Constants & Variables

struct MoCHelperLib.MocLibConfig internal mocLibConfig;

MethodCalled

Parameters

Name
Type
Description

name

bytes32

Functions

Constructor

function () public nonpayable

Arguments

spotInrate

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

maxBProWithDiscount

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

inrateAvg

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

avgInt

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

potential

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

integral

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

bproSpotDiscountRate

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

bucketTransferAmountInfiniteLeverage

function bucketTransferAmountInfiniteLeverage(uint256 nB, uint256 delta) public view
returns(uint256)

Arguments

Name
Type
Description

nB

uint256

delta

uint256

bucketTransferAmount

function bucketTransferAmount(uint256 nB, uint256 lev) public view
returns(uint256)

Arguments

Name
Type
Description

nB

uint256

lev

uint256

coverage

function coverage(uint256 nB, uint256 lB) public view
returns(uint256)

Arguments

Name
Type
Description

nB

uint256

lB

uint256

leverageFromCoverage

function leverageFromCoverage(uint256 cov) public view
returns(uint256)

Arguments

Name
Type
Description

cov

uint256

leverage

function leverage(uint256 nB, uint256 lB) public view
returns(uint256)

Arguments

Name
Type
Description

nB

uint256

lB

uint256

maxBProxBtcValue

⚠ 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

maxBProxBtcValueInfiniteLeverage

⚠ 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 updated