MoCHelperLibMock

View Source: contracts/mocks/MoCHelperLibMock.sol

MoCHelperLibMock - version: 0.1.10

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 stableToken0, uint256 stableTokent) public view
returns(uint256)

Arguments

Name
Type
Description

tMin

uint256

tMax

uint256

stableToken0

uint256

stableTokent

uint256

maxRiskProWithDiscount

function maxRiskProWithDiscount(uint256 nReserve, uint256 nStableToken, uint256 utpdu, uint256 peg, uint256 reservePrice, uint256 riskProUsdPrice, uint256 spotDiscount) public view
returns(uint256)

Arguments

Name
Type
Description

nReserve

uint256

nStableToken

uint256

utpdu

uint256

peg

uint256

reservePrice

uint256

riskProUsdPrice

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

riskProSpotDiscountRate

function riskProSpotDiscountRate(uint256 riskProLiqDiscountRate, uint256 liq, uint256 utpdu, uint256 cov) public view
returns(uint256)

Arguments

Name
Type
Description

riskProLiqDiscountRate

uint256

liq

uint256

utpdu

uint256

cov

uint256

bucketTransferAmountInfiniteLeverage

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

Arguments

Name
Type
Description

nReserve

uint256

delta

uint256

bucketTransferAmount

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

Arguments

Name
Type
Description

nReserve

uint256

lev

uint256

coverage

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

Arguments

Name
Type
Description

nReserve

uint256

lB

uint256

leverageFromCoverage

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

Arguments

Name
Type
Description

cov

uint256

leverage

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

Arguments

Name
Type
Description

nReserve

uint256

lB

uint256

maxRiskProxResTokenValue

âš  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 maxRiskProxResTokenValue(uint256 nStableToken, uint256 peg, uint256 reservePrice, uint256 lev) public view
returns(uint256)

Arguments

Name
Type
Description

nStableToken

uint256

peg

uint256

reservePrice

uint256

lev

uint256

maxRiskProxReserveValueInfiniteLeverage

function maxRiskProxReserveValueInfiniteLeverage(uint256 nStableToken, uint256 peg, uint256 reservePrice, uint256 delta) public view
returns(uint256)

Arguments

Name
Type
Description

nStableToken

uint256

peg

uint256

reservePrice

uint256

delta

uint256

Last updated