Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IParameterRegistry

Git Source

Functions

setBounds

Updates the bounds for a specific parameter.

Only callable by an authorized governor.

function setBounds(ParamKey key, Bounds calldata newBounds) external;

Parameters

NameTypeDescription
keyParamKeyThe parameter key to update.
newBoundsBoundsThe new bounds structure to apply.

aParams

function aParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the 'A' coefficient parameter

swapFeeParams

function swapFeeParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the swap fee

mintFeeParams

function mintFeeParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the mint fee

redeemFeeParams

function redeemFeeParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the redeem fee

offPegParams

function offPegParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the off-peg multiplier

exchangeRateFeeParams

function exchangeRateFeeParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for exchange rate fee changes

decayPeriodParams

function decayPeriodParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for decay period

rateChangeSkipPeriodParams

function rateChangeSkipPeriodParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the rate change skip period

feeErrorMarginParams

function feeErrorMarginParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the fee error margin

yieldErrorMarginParams

function yieldErrorMarginParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the yield error margin

minRampTimeParams

function minRampTimeParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the minimum ramp time

bufferPercentParams

function bufferPercentParams() external view returns (Bounds memory);

Returns

NameTypeDescription
<none>BoundsBounds for the buffer percentage

Events

BoundsUpdated

Emitted when parameter bounds are updated.

event BoundsUpdated(ParamKey key, Bounds oldParams, Bounds newParams);

Parameters

NameTypeDescription
keyParamKeyThe parameter key that was updated.
oldParamsBoundsThe old bounds before the update.
newParamsBoundsThe new bounds after the update.

Errors

ZeroAddress

error ZeroAddress();

Structs

Bounds

Structure representing bounds for a given parameter.

All percentages are expressed in parts-per-million (ppm), i.e., 1e6 = 100%.

struct Bounds {
    uint256 max;
    uint256 min;
    uint64 maxDecreasePct;
    uint64 maxIncreasePct;
}

Properties

NameTypeDescription
maxuint256The maximum hard cap for the parameter value in parameter format.
minuint256The minimum hard cap for the parameter value in parameter format.
maxDecreasePctuint64The maximum decrease allowed per transaction with 1e10 decimal, e.g., 9e9 = -90%.
maxIncreasePctuint64The maximum increase allowed per transaction with 1e10 decimal, e.g., 9e9 = +90%.

Enums

ParamKey

Unique keys identifying different parameter types.

enum ParamKey {
    A,
    SwapFee,
    MintFee,
    RedeemFee,
    OffPeg,
    ExchangeRateFee,
    DecayPeriod,
    RateChangeSkipPeriod,
    FeeErrorMargin,
    YieldErrorMargin,
    MinRampTime,
    BufferPercent
}