Skip to main content

IRiskCurve

Functions

changeWeights

function changeWeights() external

kick off a new weight change using the current leverage and weight change time

changeCurve

function changeCurve(
struct IRiskCurve.CurveParams curveParams
) external

change the risk curve parameters

Parameters

NameTypeDescription
curveParamsstruct IRiskCurve.CurveParams

isWeightChangeEligible

function isWeightChangeEligible() external returns (bool)

determine whether or not to kick off a new weight change

getCurveParams

function getCurveParams() external returns (struct IRiskCurve.CurveParams)

return the risk curve parameters

getCurrentLeverage

function getCurrentLeverage() external returns (uint256)

return the current leverage in the protocol, defined as PCV / protocol equity

getAssetWeight

function getAssetWeight(
address asset,
uint256 leverage
) external returns (uint256)

return the balancer weight of an asset at a given leverage

Parameters

NameTypeDescription
assetaddress
leverageuint256

getWeights

function getWeights(
uint256 leverage
) external returns (address[], uint256[])

return the set of assets and their corresponding weights at a given leverage

Parameters

NameTypeDescription
leverageuint256

getCurrentTargetAssetWeight

function getCurrentTargetAssetWeight(
address asset
) external returns (uint256)

return the target weight for an asset at current leverage

Parameters

NameTypeDescription
assetaddress

getCurrentTargetWeights

function getCurrentTargetWeights() external returns (address[], uint256[])

return the set of assets and their corresponding weights at a current leverage

getWeightChangeTime

function getWeightChangeTime(
uint256[] oldWeights,
uint256[] newWeights
) external returns (uint256)

get the number of seconds to transition weights given the old and new weights

Parameters

NameTypeDescription
oldWeightsuint256[]
newWeightsuint256[]