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

ParameterRegistry

Git Source

Inherits: IParameterRegistry, Ownable

Stores hard caps and per-transaction relative ranges that bound keeper operations.

Only the Governor (admin role) can modify values. Each SPA has its own ParameterRegistry

State Variables

MIN_MULTIPLIER

uint256 private constant MIN_MULTIPLIER = 1e10;

MAX_A

uint256 private constant MAX_A = 10 ** 6;

MAX_DECREASE_PCT_A

uint64 private constant MAX_DECREASE_PCT_A = 0.9e10;

MAX_INCREASE_PCT_A

uint64 private constant MAX_INCREASE_PCT_A = 9e10;

spa

SPA this registry is connected

SelfPeggingAsset public spa;

bounds

mapping(ParamKey => Bounds) public bounds;

Functions

constructor

constructor(address _governor, address _spa) Ownable(_governor);

setBounds

Updates the bounds for a specific parameter.

Only callable by an authorized governor.

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

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