IParamRegistry

Git Source

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

NameTypeDescription
_assetaddressThe address of the asset.

Returns

NameTypeDescription
<none>uint256The 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

NameTypeDescription
_assetaddressThe address of the asset.

Returns

NameTypeDescription
<none>uint256The 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

NameTypeDescription
_assetaddressThe address of the asset.

Returns

NameTypeDescription
<none>boolTrue 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

NameTypeDescription
_assetaddressThe address of the asset.

Returns

NameTypeDescription
<none>boolTrue 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

NameTypeDescription
_assetaddressThe 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

NameTypeDescription
oldValuint256Previous tolerance value in basis points.
newValuint256New 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

NameTypeDescription
oldValuint256Previous tolerance value in basis points.
newValuint256New tolerance value in basis points.

SetStablecoinPriceToleranceBps

Emitted when the stablecoin price tolerance is updated.

event SetStablecoinPriceToleranceBps(uint256 oldVal, uint256 newVal);

Parameters

NameTypeDescription
oldValuint256Previous tolerance value in basis points.
newValuint256New tolerance value in basis points.

SetVolatileAssetPriceToleranceBps

Emitted when the volatile asset price tolerance is updated.

event SetVolatileAssetPriceToleranceBps(uint256 oldVal, uint256 newVal);

Parameters

NameTypeDescription
oldValuint256Previous tolerance value in basis points.
newValuint256New tolerance value in basis points.

SetPriceUpdateInterval

Emitted when the minimum price update interval is updated.

event SetPriceUpdateInterval(uint256 oldVal, uint256 newVal);

Parameters

NameTypeDescription
oldValuint256Previous interval value in seconds.
newValuint256New interval value in seconds.

SetPriceValidityDuration

Emitted when the maximum price validity duration is updated.

event SetPriceValidityDuration(uint256 oldVal, uint256 newVal);

Parameters

NameTypeDescription
oldValuint256Previous duration value in seconds.
newValuint256New 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

NameTypeDescription
assetaddressThe address of the asset.
oldRateuint256Previous mint fee rate in basis points.
newRateuint256New 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

NameTypeDescription
assetaddressThe address of the asset.
oldRateuint256Previous redeem fee rate in basis points.
newRateuint256New 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

NameTypeDescription
assetaddressThe address of the asset.
enabledboolTrue 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

NameTypeDescription
assetaddressThe address of the asset.
enabledboolTrue if redemptions are enabled, false otherwise.

SetTotalDepositCap

Emitted when the global deposit cap is updated.

event SetTotalDepositCap(uint256 oldVal, uint256 newVal);

Parameters

NameTypeDescription
oldValuint256Previous global deposit cap.
newValuint256New 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

NameTypeDescription
assetaddressThe address of the asset.
oldValuint256Previous cap value.
newValuint256New cap value.

SetFeeRecipient

Emitted when the fee recipient address is updated.

event SetFeeRecipient(address oldVal, address newVal);

Parameters

NameTypeDescription
oldValaddressPrevious fee recipient address.
newValaddressNew fee recipient address.

SetForfeitTreasury

Emitted when the forfeited assets treasury address is updated.

event SetForfeitTreasury(address oldVal, address newVal);

Parameters

NameTypeDescription
oldValaddressPrevious treasury address.
newValaddressNew treasury address.