Settings
The settings directory contains facets and libraries that pull necessary information needed from multiple assets, platform and modifiers.
assets
assets
Asset settings are stored using the Cache Lib, so they don't have their own library. Each asset used as a lending token has a set of settings assigned to them which are used in various functions.
libraries
The libraries
directory contains information about multiple assets, including:
aToken
found inAssetATokenLib
cToken
found inAssetCTokenLib
yVault
found inAssetYVaultLib
pPool
found inAssetPPoolLib
The information pulled from these assets relate to their MaxDebtRatio
, MaxLoanAmount
and
MaxTVLLib
, which are all in their respective solidity files.
**AssetSettingsDataFacet**
The Data Facet uses the libraries to pull necessary information (MaxTVL
& MaxLoanAmount
) of different assets.
**AssetSettingsFacet**
Perhaps the most used file in the entire directory, the Asset Settings Facet contains functions that do the following:
isAssetSettingsInitialized
digs in theCacheLib
to check if it's respective asset settings existsgetMaxTVLAmount
gets the max total value locked of an assetcreateAssetSetting
creates settings for an asset in theCacheLib
updateAssetSetting
updates an asset with the given parameter
pausable
pausable
Contains files that help pause and un-pause facets
PausableMods
Has the modifier
paused
which is used by multiple files in the protocol to check if a facet is paused or not
PausableFacet
Has the function
pause
, which is required to be called by thePAUSER
role. It pauses the entire facet when passed true, un-pauses the asset when passed false
platform
platform
Contains files to modify the platform settings. All the platform settings are stored in the AppStorageLib
PlatformSettingsLib
contains functions that retrieve the percentage value for submissions, maximum tolerance value, safety interval value, response expiry length and morePlatformSettingsFacet
contains functions that create, update and get platform settings valuenames.sol
contains all the variables of platform settings names that are hashed
SettingsFacet
SettingsFacet
Contains multiple functions that:
addAuthorizedAddress
adds a wallet address to the list of authorized walletsaddAuthorizedAddressList
adds a list of wallet addresses to the list of authorized walletsremoveAuthorizedAddress
revokes the role of a wallet address from the list of authorized wallets by removing ithasAuthorization
checks whether an account has authorization by checking if it has theAUTHORIZED
rolesetNFTLiquidationController
sets a new address to which NFTs should be sent to when liquidating an NFTgetNFTLiquidationController
gets the new address where the NFTs are sent to be liquidated
Last updated