IParamRegistry
Author: luoyhang003
Interface for the protocol parameter registry contract.
- Defines key protocol configuration parameters such as fee rates, deposit caps, price tolerances, and critical role-restricted settings.
- Provides events for tracking parameter updates to ensure transparency and auditability.
- Exposes getter functions for external contracts to query configuration values, and (in the implementing contract) setter functions protected by timelock roles.
- Used as the central source of truth for system-wide configuration and policy enforcement.*
Functions
getExchangeRateMaxUpperToleranceBps
Returns the current upper tolerance for exchange rate deviation.
function getExchangeRateMaxUpperToleranceBps() external view returns (uint256);
getExchangeRateMaxLowerToleranceBps
Returns the current lower tolerance for exchange rate deviation.
function getExchangeRateMaxLowerToleranceBps() external view returns (uint256);
getStablecoinPriceToleranceBps
Returns the current stablecoin price tolerance in bps.
function getStablecoinPriceToleranceBps() external view returns (uint256);
getVolatileAssetPriceToleranceBps
Returns the current volatile asset price tolerance in bps.
function getVolatileAssetPriceToleranceBps() external view returns (uint256);
getPriceUpdateInterval
Returns the minimum interval between price updates.
function getPriceUpdateInterval() external view returns (uint256);
getPriceValidityDuration
Returns the maximum validity duration of cached prices.
function getPriceValidityDuration() external view returns (uint256);
getMintFeeRate
Returns the configured mint fee rate for a given asset.
function getMintFeeRate(address _asset) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
_asset | address | The address of the asset. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The mint fee rate in basis points. |
getRedeemFeeRate
Returns the configured redeem fee rate for a given asset.
function getRedeemFeeRate(address _asset) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
_asset | address | The address of the asset. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint256 | The redeem fee rate in basis points. |
getDepositEnabled
Returns whether deposits are enabled for a given asset.
function getDepositEnabled(address _asset) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
_asset | address | The address of the asset. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | True if deposits are enabled, false otherwise. |
getRedeemEnabled
Returns whether redemptions are enabled for a given asset.
function getRedeemEnabled(address _asset) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
_asset | address | The address of the asset. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | True if redemptions are enabled, false otherwise. |
getTotalDepositCap
Returns the global deposit cap.
function getTotalDepositCap() external view returns (uint256);
getTokenDepositCap
Returns the deposit cap for a specific asset.
function getTokenDepositCap(address _asset) external view returns (uint256);
Parameters
| Name | Type | Description |
|---|---|---|
_asset | address | The address of the asset. |
getFeeRecipient
Returns the address of the fee recipient.
function getFeeRecipient() external view returns (address);
getForfeitTreasury
Returns the address of the forfeited assets treasury.
function getForfeitTreasury() external view returns (address);
Events
SetExchangeRateMaxUpperToleranceBps
Emitted when the maximum upper tolerance for exchange rate deviation is updated.
event SetExchangeRateMaxUpperToleranceBps(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous tolerance value in basis points. |
newVal | uint256 | New tolerance value in basis points. |
SetExchangeRateMaxLowerToleranceBps
Emitted when the maximum lower tolerance for exchange rate deviation is updated.
event SetExchangeRateMaxLowerToleranceBps(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous tolerance value in basis points. |
newVal | uint256 | New tolerance value in basis points. |
SetStablecoinPriceToleranceBps
Emitted when the stablecoin price tolerance is updated.
event SetStablecoinPriceToleranceBps(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous tolerance value in basis points. |
newVal | uint256 | New tolerance value in basis points. |
SetVolatileAssetPriceToleranceBps
Emitted when the volatile asset price tolerance is updated.
event SetVolatileAssetPriceToleranceBps(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous tolerance value in basis points. |
newVal | uint256 | New tolerance value in basis points. |
SetPriceUpdateInterval
Emitted when the minimum price update interval is updated.
event SetPriceUpdateInterval(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous interval value in seconds. |
newVal | uint256 | New interval value in seconds. |
SetPriceValidityDuration
Emitted when the maximum price validity duration is updated.
event SetPriceValidityDuration(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous duration value in seconds. |
newVal | uint256 | New duration value in seconds. |
SetMintFeeRate
Emitted when the mint fee rate for a specific asset is updated.
event SetMintFeeRate(address indexed asset, uint256 oldRate, uint256 newRate);
Parameters
| Name | Type | Description |
|---|---|---|
asset | address | The address of the asset. |
oldRate | uint256 | Previous mint fee rate in basis points. |
newRate | uint256 | New mint fee rate in basis points. |
SetRedeemFeeRate
Emitted when the redeem fee rate for a specific asset is updated.
event SetRedeemFeeRate(address indexed asset, uint256 oldRate, uint256 newRate);
Parameters
| Name | Type | Description |
|---|---|---|
asset | address | The address of the asset. |
oldRate | uint256 | Previous redeem fee rate in basis points. |
newRate | uint256 | New redeem fee rate in basis points. |
SetDepositEnabled
Emitted when deposit enablement is updated for a specific asset.
event SetDepositEnabled(address indexed asset, bool enabled);
Parameters
| Name | Type | Description |
|---|---|---|
asset | address | The address of the asset. |
enabled | bool | True if deposits are enabled, false otherwise. |
SetRedeemEnabled
Emitted when redemption enablement is updated for a specific asset.
event SetRedeemEnabled(address indexed asset, bool enabled);
Parameters
| Name | Type | Description |
|---|---|---|
asset | address | The address of the asset. |
enabled | bool | True if redemptions are enabled, false otherwise. |
SetTotalDepositCap
Emitted when the global deposit cap is updated.
event SetTotalDepositCap(uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | uint256 | Previous global deposit cap. |
newVal | uint256 | New global deposit cap. |
SetTokenDepositCap
Emitted when the deposit cap for a specific asset is updated.
event SetTokenDepositCap(address indexed asset, uint256 oldVal, uint256 newVal);
Parameters
| Name | Type | Description |
|---|---|---|
asset | address | The address of the asset. |
oldVal | uint256 | Previous cap value. |
newVal | uint256 | New cap value. |
SetFeeRecipient
Emitted when the fee recipient address is updated.
event SetFeeRecipient(address oldVal, address newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | address | Previous fee recipient address. |
newVal | address | New fee recipient address. |
SetForfeitTreasury
Emitted when the forfeited assets treasury address is updated.
event SetForfeitTreasury(address oldVal, address newVal);
Parameters
| Name | Type | Description |
|---|---|---|
oldVal | address | Previous treasury address. |
newVal | address | New treasury address. |